From b8af3810420a67d419914e41d1702d953e88a170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Mon, 31 May 2021 11:32:58 +0200 Subject: [PATCH] Fixed autocomplete --- server/src/uds/static/admin/main.js | 2 +- server/src/uds/templates/uds/admin/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/uds/static/admin/main.js b/server/src/uds/static/admin/main.js index 64e9d1a3..b4366925 100644 --- a/server/src/uds/static/admin/main.js +++ b/server/src/uds/static/admin/main.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},KcLy:function(t,e,n){var i,r,o;r=[e,n("MT78")],void 0===(o="function"==typeof(i=function(t,e){if(e){var n="#eee",i=function(){return{axisLine:{lineStyle:{color:n}},axisTick:{lineStyle:{color:n}},axisLabel:{color:n},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:n}}}},r=["#52656b","#ff3b77","#a3cc00","#ffffff","#b8b89f","#ffccdb","#e5ff80","#f4f4f0"],o={color:r,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:n},crossStyle:{color:n}}},legend:{textStyle:{color:n}},title:{textStyle:{color:n}},toolbox:{iconStyle:{borderColor:n}},dataZoom:{dataBackgroundColor:"#eee",fillerColor:"rgba(200,200,200,0.2)",handleColor:"#52656b"},timeline:{itemStyle:{color:r[1]},lineStyle:{color:n},controlStyle:{color:n,borderColor:n},label:{color:n}},timeAxis:i(),logAxis:i(),valueAxis:i(),categoryAxis:i(),line:{symbol:"circle"},graph:{color:r},gauge:{axisLine:{lineStyle:{color:[[.2,"#ff3b77"],[.8,"#52656b"],[1,"#b8b89f"]],width:8}}}};o.categoryAxis.splitLine.show=!1,e.registerTheme("dark-digerati",o)}else"ECharts is not Loaded","undefined"!=typeof console&&console&&console.error&&console.error("ECharts is not Loaded")})?i.apply(e,r):i)||(t.exports=o)},MT78:function(t,e,n){"use strict";n.r(e),n.d(e,"version",function(){return oy}),n.d(e,"dependencies",function(){return ay}),n.d(e,"PRIORITY",function(){return uy}),n.d(e,"init",function(){return e_}),n.d(e,"connect",function(){return n_}),n.d(e,"disConnect",function(){return i_}),n.d(e,"disconnect",function(){return r_}),n.d(e,"dispose",function(){return o_}),n.d(e,"getInstanceByDom",function(){return a_}),n.d(e,"getInstanceById",function(){return s_}),n.d(e,"registerTheme",function(){return l_}),n.d(e,"registerPreprocessor",function(){return u_}),n.d(e,"registerProcessor",function(){return c_}),n.d(e,"registerPostInit",function(){return h_}),n.d(e,"registerPostUpdate",function(){return d_}),n.d(e,"registerAction",function(){return f_}),n.d(e,"registerCoordinateSystem",function(){return p_}),n.d(e,"getCoordinateSystemDimensions",function(){return g_}),n.d(e,"registerLocale",function(){return hh}),n.d(e,"registerLayout",function(){return m_}),n.d(e,"registerVisual",function(){return v_}),n.d(e,"registerLoading",function(){return b_}),n.d(e,"setCanvasCreator",function(){return w_}),n.d(e,"registerMap",function(){return x_}),n.d(e,"getMap",function(){return k_}),n.d(e,"registerTransform",function(){return S_}),n.d(e,"dataTool",function(){return C_}),n.d(e,"zrender",function(){return s}),n.d(e,"matrix",function(){return o}),n.d(e,"vector",function(){return r}),n.d(e,"zrUtil",function(){return i}),n.d(e,"color",function(){return a}),n.d(e,"throttle",function(){return ig}),n.d(e,"helper",function(){return u}),n.d(e,"use",function(){return I_}),n.d(e,"parseGeoJSON",function(){return Bv}),n.d(e,"parseGeoJson",function(){return Bv}),n.d(e,"number",function(){return c}),n.d(e,"time",function(){return h}),n.d(e,"graphic",function(){return d}),n.d(e,"format",function(){return f}),n.d(e,"util",function(){return p}),n.d(e,"env",function(){return w}),n.d(e,"List",function(){return ob}),n.d(e,"Model",function(){return ih}),n.d(e,"Axis",function(){return zw}),n.d(e,"ComponentModel",function(){return dd}),n.d(e,"ComponentView",function(){return Gp}),n.d(e,"SeriesModel",function(){return Hp}),n.d(e,"ChartView",function(){return Jp}),n.d(e,"innerDrawElementOnCanvas",function(){return ev}),n.d(e,"extendComponentModel",function(){return Bw}),n.d(e,"extendComponentView",function(){return Hw}),n.d(e,"extendSeriesModel",function(){return jw}),n.d(e,"extendChartView",function(){return Gw});var i={};n.r(i),n.d(i,"$override",function(){return P}),n.d(i,"guid",function(){return L}),n.d(i,"logError",function(){return N}),n.d(i,"clone",function(){return F}),n.d(i,"merge",function(){return V}),n.d(i,"mergeAll",function(){return z}),n.d(i,"extend",function(){return B}),n.d(i,"defaults",function(){return H}),n.d(i,"createCanvas",function(){return j}),n.d(i,"indexOf",function(){return G}),n.d(i,"inherits",function(){return U}),n.d(i,"mixin",function(){return W}),n.d(i,"isArrayLike",function(){return Y}),n.d(i,"each",function(){return q}),n.d(i,"map",function(){return X}),n.d(i,"reduce",function(){return Z}),n.d(i,"filter",function(){return K}),n.d(i,"find",function(){return $}),n.d(i,"keys",function(){return Q}),n.d(i,"bind",function(){return J}),n.d(i,"curry",function(){return tt}),n.d(i,"isArray",function(){return et}),n.d(i,"isFunction",function(){return nt}),n.d(i,"isString",function(){return it}),n.d(i,"isStringSafe",function(){return rt}),n.d(i,"isNumber",function(){return ot}),n.d(i,"isObject",function(){return at}),n.d(i,"isBuiltInObject",function(){return st}),n.d(i,"isTypedArray",function(){return lt}),n.d(i,"isDom",function(){return ut}),n.d(i,"isGradientObject",function(){return ct}),n.d(i,"isPatternObject",function(){return ht}),n.d(i,"isRegExp",function(){return dt}),n.d(i,"eqNaN",function(){return ft}),n.d(i,"retrieve",function(){return pt}),n.d(i,"retrieve2",function(){return gt}),n.d(i,"retrieve3",function(){return mt}),n.d(i,"slice",function(){return vt}),n.d(i,"normalizeCssArray",function(){return yt}),n.d(i,"assert",function(){return _t}),n.d(i,"trim",function(){return bt}),n.d(i,"setAsPrimitive",function(){return xt}),n.d(i,"isPrimitive",function(){return kt}),n.d(i,"HashMap",function(){return St}),n.d(i,"createHashMap",function(){return Ct}),n.d(i,"concatArray",function(){return At}),n.d(i,"createObject",function(){return Mt}),n.d(i,"hasOwn",function(){return It}),n.d(i,"noop",function(){return Tt});var r={};n.r(r),n.d(r,"create",function(){return Dt}),n.d(r,"copy",function(){return Et}),n.d(r,"clone",function(){return Ot}),n.d(r,"set",function(){return Pt}),n.d(r,"add",function(){return Rt}),n.d(r,"scaleAndAdd",function(){return Lt}),n.d(r,"sub",function(){return Nt}),n.d(r,"len",function(){return Ft}),n.d(r,"length",function(){return Vt}),n.d(r,"lenSquare",function(){return zt}),n.d(r,"lengthSquare",function(){return Bt}),n.d(r,"mul",function(){return Ht}),n.d(r,"div",function(){return jt}),n.d(r,"dot",function(){return Gt}),n.d(r,"scale",function(){return Ut}),n.d(r,"normalize",function(){return Wt}),n.d(r,"distance",function(){return Yt}),n.d(r,"dist",function(){return qt}),n.d(r,"distanceSquare",function(){return Xt}),n.d(r,"distSquare",function(){return Zt}),n.d(r,"negate",function(){return Kt}),n.d(r,"lerp",function(){return $t}),n.d(r,"applyTransform",function(){return Qt}),n.d(r,"min",function(){return Jt}),n.d(r,"max",function(){return te});var o={};n.r(o),n.d(o,"create",function(){return Oe}),n.d(o,"identity",function(){return Pe}),n.d(o,"copy",function(){return Re}),n.d(o,"mul",function(){return Le}),n.d(o,"translate",function(){return Ne}),n.d(o,"rotate",function(){return Fe}),n.d(o,"scale",function(){return Ve}),n.d(o,"invert",function(){return ze}),n.d(o,"clone",function(){return Be});var a={};n.r(a),n.d(a,"parse",function(){return fn}),n.d(a,"lift",function(){return gn}),n.d(a,"toHex",function(){return mn}),n.d(a,"fastLerp",function(){return vn}),n.d(a,"fastMapToColor",function(){return yn}),n.d(a,"lerp",function(){return _n}),n.d(a,"mapToColor",function(){return bn}),n.d(a,"modifyHSL",function(){return wn}),n.d(a,"modifyAlpha",function(){return xn}),n.d(a,"stringify",function(){return kn}),n.d(a,"lum",function(){return Sn}),n.d(a,"random",function(){return Cn});var s={};n.r(s),n.d(s,"init",function(){return ir}),n.d(s,"dispose",function(){return rr}),n.d(s,"disposeAll",function(){return or}),n.d(s,"getInstance",function(){return ar}),n.d(s,"registerPainter",function(){return sr}),n.d(s,"version",function(){return lr});var l={};n.r(l),n.d(l,"extendShape",function(){return Ju}),n.d(l,"extendPath",function(){return tc}),n.d(l,"registerShape",function(){return ec}),n.d(l,"getShapeClass",function(){return nc}),n.d(l,"makePath",function(){return ic}),n.d(l,"makeImage",function(){return rc}),n.d(l,"mergePath",function(){return ac}),n.d(l,"resizePath",function(){return sc}),n.d(l,"subPixelOptimizeLine",function(){return lc}),n.d(l,"subPixelOptimizeRect",function(){return uc}),n.d(l,"subPixelOptimize",function(){return cc}),n.d(l,"updateProps",function(){return dc}),n.d(l,"initProps",function(){return fc}),n.d(l,"removeElement",function(){return pc}),n.d(l,"removeElementWithFadeOut",function(){return mc}),n.d(l,"isElementRemoved",function(){return vc}),n.d(l,"getTransform",function(){return yc}),n.d(l,"applyTransform",function(){return _c}),n.d(l,"transformDirection",function(){return bc}),n.d(l,"groupTransition",function(){return xc}),n.d(l,"clipPointsByRect",function(){return kc}),n.d(l,"clipRectByRect",function(){return Sc}),n.d(l,"createIcon",function(){return Cc}),n.d(l,"linePolygonIntersect",function(){return Ac}),n.d(l,"lineLineIntersect",function(){return Mc}),n.d(l,"setTooltipConfig",function(){return Tc}),n.d(l,"Group",function(){return Qi}),n.d(l,"Image",function(){return gs}),n.d(l,"Text",function(){return Rs}),n.d(l,"Circle",function(){return $l}),n.d(l,"Ellipse",function(){return tu}),n.d(l,"Sector",function(){return gu}),n.d(l,"Ring",function(){return yu}),n.d(l,"Polygon",function(){return ku}),n.d(l,"Polyline",function(){return Au}),n.d(l,"Rect",function(){return ks}),n.d(l,"Line",function(){return Du}),n.d(l,"BezierCurve",function(){return Lu}),n.d(l,"Arc",function(){return Vu}),n.d(l,"IncrementalDisplayable",function(){return Zu}),n.d(l,"CompoundPath",function(){return zu}),n.d(l,"LinearGradient",function(){return Hu}),n.d(l,"RadialGradient",function(){return ju}),n.d(l,"BoundingRect",function(){return $n}),n.d(l,"OrientedBoundingRect",function(){return qu}),n.d(l,"Point",function(){return jn}),n.d(l,"Path",function(){return ls});var u={};n.r(u),n.d(u,"createList",function(){return Sw}),n.d(u,"getLayoutRect",function(){return rd}),n.d(u,"createDimensions",function(){return sb}),n.d(u,"dataStack",function(){return Cw}),n.d(u,"createSymbol",function(){return Vm}),n.d(u,"createScale",function(){return Aw}),n.d(u,"mixinAxisModelCommonMethods",function(){return Mw}),n.d(u,"getECData",function(){return Ls}),n.d(u,"enableHoverEmphasis",function(){return xl}),n.d(u,"createTextStyle",function(){return Iw});var c={};n.r(c),n.d(c,"linearMap",function(){return ur}),n.d(c,"round",function(){return hr}),n.d(c,"asc",function(){return dr}),n.d(c,"getPrecision",function(){return fr}),n.d(c,"getPrecisionSafe",function(){return pr}),n.d(c,"getPixelPrecision",function(){return gr}),n.d(c,"getPercentWithPrecision",function(){return mr}),n.d(c,"MAX_SAFE_INTEGER",function(){return vr}),n.d(c,"remRadian",function(){return yr}),n.d(c,"isRadianAroundZero",function(){return _r}),n.d(c,"parseDate",function(){return wr}),n.d(c,"quantity",function(){return xr}),n.d(c,"quantityExponent",function(){return kr}),n.d(c,"nice",function(){return Sr}),n.d(c,"quantile",function(){return Cr}),n.d(c,"reformIntervals",function(){return Ar}),n.d(c,"isNumeric",function(){return Ir}),n.d(c,"numericToNumber",function(){return Mr});var h={};n.r(h),n.d(h,"parse",function(){return wr}),n.d(h,"format",function(){return wh});var d={};n.r(d),n.d(d,"extendShape",function(){return Ju}),n.d(d,"extendPath",function(){return tc}),n.d(d,"makePath",function(){return ic}),n.d(d,"makeImage",function(){return rc}),n.d(d,"mergePath",function(){return ac}),n.d(d,"resizePath",function(){return sc}),n.d(d,"createIcon",function(){return Cc}),n.d(d,"updateProps",function(){return dc}),n.d(d,"initProps",function(){return fc}),n.d(d,"getTransform",function(){return yc}),n.d(d,"clipPointsByRect",function(){return kc}),n.d(d,"clipRectByRect",function(){return Sc}),n.d(d,"registerShape",function(){return ec}),n.d(d,"getShapeClass",function(){return nc}),n.d(d,"Group",function(){return Qi}),n.d(d,"Image",function(){return gs}),n.d(d,"Text",function(){return Rs}),n.d(d,"Circle",function(){return $l}),n.d(d,"Ellipse",function(){return tu}),n.d(d,"Sector",function(){return gu}),n.d(d,"Ring",function(){return yu}),n.d(d,"Polygon",function(){return ku}),n.d(d,"Polyline",function(){return Au}),n.d(d,"Rect",function(){return ks}),n.d(d,"Line",function(){return Du}),n.d(d,"BezierCurve",function(){return Lu}),n.d(d,"Arc",function(){return Vu}),n.d(d,"IncrementalDisplayable",function(){return Zu}),n.d(d,"CompoundPath",function(){return zu}),n.d(d,"LinearGradient",function(){return Hu}),n.d(d,"RadialGradient",function(){return ju}),n.d(d,"BoundingRect",function(){return $n});var f={};n.r(f),n.d(f,"addCommas",function(){return Vh}),n.d(f,"toCamelCase",function(){return zh}),n.d(f,"normalizeCssArray",function(){return Bh}),n.d(f,"encodeHTML",function(){return Gh}),n.d(f,"formatTpl",function(){return qh}),n.d(f,"getTooltipMarker",function(){return Xh}),n.d(f,"formatTime",function(){return Zh}),n.d(f,"capitalFirst",function(){return Kh}),n.d(f,"truncateText",function(){return bo}),n.d(f,"getTextRect",function(){return Tw});var p={};n.r(p),n.d(p,"map",function(){return X}),n.d(p,"each",function(){return q}),n.d(p,"indexOf",function(){return G}),n.d(p,"inherits",function(){return U}),n.d(p,"reduce",function(){return Z}),n.d(p,"filter",function(){return K}),n.d(p,"bind",function(){return J}),n.d(p,"curry",function(){return tt}),n.d(p,"isArray",function(){return et}),n.d(p,"isString",function(){return it}),n.d(p,"isObject",function(){return at}),n.d(p,"isFunction",function(){return nt}),n.d(p,"extend",function(){return B}),n.d(p,"defaults",function(){return H}),n.d(p,"clone",function(){return F}),n.d(p,"merge",function(){return V});var g=function(t,e){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function m(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,i=arguments.length;n18),a&&(n.weChat=!0),e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,b);var w=b,x={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},k={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},S=Object.prototype.toString,C=Array.prototype,A=C.forEach,M=C.filter,I=C.slice,T=C.map,D=(function(){}).constructor,E=D?D.prototype:null,O={};function P(t,e){O[t]=e}var R=2311;function L(){return R++}function N(){for(var t=[],e=0;e>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(a)return a(t,n,i),!0}return!1}function ue(t){return"CANVAS"===t.nodeName.toUpperCase()}var ce="undefined"!=typeof window&&!!window.addEventListener,he=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,de=[];function fe(t,e,n,i){return n=n||{},i||!w.canvasSupported?pe(t,e,n):w.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):pe(t,e,n),n}function pe(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(ue(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(le(de,t,i,r))return n.zrX=de[0],void(n.zrY=de[1])}n.zrX=n.zrY=0}function ge(t){return t||window.event}function me(t,e,n){if(null!=(e=ge(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&fe(t,r,e,n)}else{fe(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&he.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ve(t,e,n,i){ce?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ye=ce?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function _e(t){return 2===t.which||3===t.which}var be=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=we(r)/we(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ke="silent";function Se(){ye(this.event)}var Ce=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return m(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ie),Ae=function(t,e){this.x=t,this.y=e},Me=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ie=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new Ae(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new Ce,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new ne(o),o}return m(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(q(Me,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=De(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new Ae(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ae(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Se}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new Ae(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=Te(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==ke)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new be);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new Ae;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(ie);function Te(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}i=i.__hostTarget||i.parent}return!r||ke}return!1}function De(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}q(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Ie.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=De(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||qt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});var Ee=Ie;function Oe(){return[1,0,0,1,0,0]}function Pe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Re(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Le(t,e,n){var i=e[1]*n[0]+e[3]*n[1],r=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],a=e[0]*n[4]+e[2]*n[5]+e[4],s=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=e[0]*n[0]+e[2]*n[1],t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t}function Ne(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Fe(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),c=Math.cos(n);return t[0]=i*c+a*u,t[1]=-i*u+a*c,t[2]=r*c+s*u,t[3]=-r*u+c*s,t[4]=c*o+u*l,t[5]=c*l-u*o,t}function Ve(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function ze(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(t[0]=a*(l=1/l),t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function Be(t){var e=[1,0,0,1,0,0];return Re(e,t),e}var He=Pe;function je(t){return t>5e-5||t<-5e-5}var Ge=[],Ue=[],We=[1,0,0,1,0,0],Ye=Math.abs,qe=function(){function t(){}var e;return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return je(this.rotation)||je(this.x)||je(this.y)||je(this.scaleX-1)||je(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):He(i),e&&(n?Le(i,t.transform,i):Re(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&He(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Ge);var n=Ge[0]<0?-1:1,i=Ge[1]<0?-1:1,r=((Ge[0]-n)*e+n)/Ge[0]||0,o=((Ge[1]-i)*e+i)/Ge[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],ze(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3];je(e-1)&&(e=Math.sqrt(e)),je(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Le(Ue,t.invTransform,e),e=Ue);var n=this.originX,i=this.originY;(n||i)&&(We[4]=n,We[5]=i,Le(Ue,e,We),Ue[4]-=n,Ue[5]-=i,e=Ue),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Qt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Qt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Ye(t[0]-1)>1e-10&&Ye(t[3]-1)>1e-10?Math.sqrt(Ye(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){He(e=e||[]);var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,l=t.y;return e[4]-=n,e[5]-=i,e[0]*=r,e[1]*=o,e[2]*=r,e[3]*=o,e[4]*=r,e[5]*=o,a&&Fe(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=l,e},t.initDefaultProps=((e=t.prototype).x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.rotation=0,void(e.globalScaleRatio=1)),t}(),Xe={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Xe.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Xe.bounceIn(2*t):.5*Xe.bounceOut(2*t-1)+.5}},Ze=Xe,Ke=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Ze[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){this._startTime=t-(t-this._startTime-this._pausedTime)%this._life+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),$e=function(t){this.value=t},Qe=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new $e(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Je=function(){function t(t){this._list=new Qe,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new $e(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),tn={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 en(t){return(t=Math.round(t))<0?0:t>255?255:t}function nn(t){return t<0?0:t>1?1:t}function rn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?en(parseFloat(e)/100*255):en(parseInt(e,10))}function on(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?nn(parseFloat(e)/100):nn(parseFloat(e))}function an(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function sn(t,e,n){return t+(e-t)*n}function ln(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function un(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var cn=new Je(20),hn=null;function dn(t,e){hn&&un(hn,e),hn=cn.put(t,hn||e.slice())}function fn(t,e){if(t){e=e||[];var n=cn.get(t);if(n)return un(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in tn)return un(e,tn[i]),dn(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(ln(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),dn(t,e),e):void ln(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(ln(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),dn(t,e),e):void ln(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?ln(e,+u[0],+u[1],+u[2],1):ln(e,0,0,0,1);c=on(u.pop());case"rgb":return 3!==u.length?void ln(e,0,0,0,1):(ln(e,rn(u[0]),rn(u[1]),rn(u[2]),c),dn(t,e),e);case"hsla":return 4!==u.length?void ln(e,0,0,0,1):(u[3]=on(u[3]),pn(u,e),dn(t,e),e);case"hsl":return 3!==u.length?void ln(e,0,0,0,1):(pn(u,e),dn(t,e),e);default:return}}ln(e,0,0,0,1)}}function pn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=on(t[1]),r=on(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return ln(e=e||[],en(255*an(a,o,n+1/3)),en(255*an(a,o,n)),en(255*an(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function gn(t,e){var n=fn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return kn(n,4===n.length?"rgba":"rgb")}}function mn(t){var e=fn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function vn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=en(sn(a[0],s[0],l)),n[1]=en(sn(a[1],s[1],l)),n[2]=en(sn(a[2],s[2],l)),n[3]=nn(sn(a[3],s[3],l)),n}}var yn=vn;function _n(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=fn(e[r]),s=fn(e[o]),l=i-r,u=kn([en(sn(a[0],s[0],l)),en(sn(a[1],s[1],l)),en(sn(a[2],s[2],l)),nn(sn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var bn=_n;function wn(t,e,n,i){var r,o=fn(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-h:r===s?e=1/3+c-d:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=on(n)),null!=i&&(o[2]=on(i)),kn(pn(o),"rgba")}function xn(t,e){var n=fn(t);if(n&&null!=e)return n[3]=nn(e),kn(n,"rgba")}function kn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Sn(t,e){var n=fn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function Cn(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}var An=Array.prototype.slice;function Mn(t,e,n){return(e-t)*n+t}function In(t,e,n,i){for(var r=e.length,o=0;oa)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(Y(e)){var r=function(t){return Y(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&On(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=fn(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!On(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort(function(t,e){return t.time-e.time});for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&En(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var c=o[n+1],h=o[n];if(h&&c){this._lastFrame=n,this._lastFramePercent=e;var d=c.percent-h.percent;if(0!==d){var f=(e-h.percent)/d,p=i?this._additiveValue:u?zn:t[s];if((l>0||u)&&!p&&(p=this._additiveValue=[]),this.useSpline){var g=o[n][r],m=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],y=o[n>a-3?a-1:n+2][r];if(l>0)1===l?Rn(p,m,g,v,y,f,f*f,f*f*f):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,c=0;c0?1===l?In(p,h[r],c[r],f):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(h[r],c[r],f),i?this._additiveValue=_:t[s]=_);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(fn(t[n],zn),Tn(zn,zn,i,1),t[n]=Nn(zn)):t[n]=t[n]+i:1===e?Tn(t[n],t[n],i,1):2===e&&Dn(t[n],t[n],i,1)},t}(),Hn=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?N("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,Q(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),jn=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Gn=Math.min,Un=Math.max,Wn=new jn,Yn=new jn,qn=new jn,Xn=new jn,Zn=new jn,Kn=new jn,$n=function(){function t(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Gn(t.x,this.x),n=Gn(t.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?Un(t.x+t.width,this.x+this.width)-e:t.width,this.height=isFinite(this.y)&&isFinite(this.height)?Un(t.y+t.height,this.y+this.height)-n:t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return Ne(r,r,[-e.x,-e.y]),Ve(r,r,[n,i]),Ne(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,h=e.y+e.height,d=!(op&&(p=_,jn.set(Kn,gp&&(p=b,jn.set(Kn,0,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[5];return e.x=n.x*r+i[4],e.y=n.y*o+a,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Wn.x=qn.x=n.x,Wn.y=Xn.y=n.y,Yn.x=Xn.x=n.x+n.width,Yn.y=qn.y=n.y+n.height,Wn.transform(i),Xn.transform(i),Yn.transform(i),qn.transform(i),e.x=Gn(Wn.x,Yn.x,qn.x,Xn.x),e.y=Gn(Wn.y,Yn.y,qn.y,Xn.y);var s=Un(Wn.x,Yn.x,qn.x,Xn.x),l=Un(Wn.y,Yn.y,qn.y,Xn.y);e.width=s-e.x,e.height=l-e.y}else e!==n&&t.copy(e,n)},t}(),Qn={},Jn="12px sans-serif";function ti(t,e){var n=Qn[e=e||Jn];n||(n=Qn[e]=new Je(500));var i=n.get(t);return null==i&&(i=function(t,e){return Fn||(Fn=j().getContext("2d")),Vn!==e&&(Vn=Fn.font=e||Jn),Fn.measureText(t)}(t,e).width,n.put(t,i)),i}function ei(t,e,n,i){var r=ti(t,e),o=oi(e),a=ii(0,r,n),s=ri(0,o,i);return new $n(a,s,r,o)}function ni(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return ei(r[0],e,n,i);for(var o=new $n(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function si(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(i instanceof Array)l+=ai(i[0],n.width),u+=ai(i[1],n.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var li=1;"undefined"!=typeof window&&(li=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ui=li,ci="#333",hi="#ccc",di="__zr_normal__",fi=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],pi={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},gi={},mi=new $n(0,0,0,0),vi=function(){function t(t){this.id=L(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var u=mi;u.copy(n.layoutRect?n.layoutRect:this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(gi,n,u):si(gi,n,u),r.x=gi.x,r.y=gi.y,o=gi.align,a=gi.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var h=void 0,d=void 0;"center"===c?(h=.5*u.width,d=.5*u.height):(h=ai(c[0],u.width),d=ai(c[1],u.height)),l=!0,r.originX=-r.x+h+(i?0:u.x),r.originY=-r.y+d+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var f=n.offset;f&&(r.x+=f[0],r.y+=f[1],l||(r.originX=-f[0],r.originY=-f[1]));var p=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;p&&this.canBeInsideText()?(v=n.insideStroke,null!=(m=n.insideFill)&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(v=n.outsideStroke,null!=(m=n.outsideFill)&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),s&&e.dirtyStyle(),e.markRedraw()}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?hi:ci},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&fn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,kn(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(at(t))for(var n=Q(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(di,!1,t)},t.prototype.useState=function(e,n,i){var r=e===di;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(G(o,e)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var l=!(!s||!s.hoverLayer);return l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(e,n),this._textGuide&&this._textGuide.useState(e,n),r?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT),s}N("State "+e+" not exists.")}}},t.prototype.useStates=function(e,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s0,d),this._textContent&&this._textContent.useStates(e),this._textGuide&&this._textGuide.useStates(e),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=G(i,t),o=G(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function yi(t,e,n,i,r){var o=[];wi(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},h=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var d=0;d0||r.force&&!a.length){for(var y=t.animators,_=[],b=0;b=0;)r++;return r-e}function Si(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Ci(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function Ai(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function Mi(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<32)Si(t,n,i,n+(o=ki(t,n,i,e)),e);else{var a=function(t,e){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var d=Ai(t[c],t,l,u,0,e);l+=d,0!=(u-=d)&&0!==(h=Ci(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,i,o,s){var l=0;for(l=0;l=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[f+l]=t[d+l];if(0===i){v=!0;break}}if(t[h--]=a[c--],1==--s){v=!0;break}if(0!=(m=s-Ci(t[u],a,0,s,s-1,e))){for(s-=m,f=1+(h-=m),d=1+(c-=m),l=0;l=7||m>=7);if(v)break;p<0&&(p=0),p+=2}if((r=p)<1&&(r=1),1===s){for(f=1+(h-=i),d=1+(u-=i),l=i-1;l>=0;l--)t[f+l]=t[d+l];t[h]=a[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l=0;l--)t[f+l]=t[d+l];t[h]=a[c]}else for(d=h-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=ki(t,n,i,e))s&&(l=s),Si(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var Ii=!1;function Ti(){Ii||(Ii=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Di(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Ei,Oi,Pi=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Di}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(Ti(),u.z=0),isNaN(u.z2)&&(Ti(),u.z2=0),isNaN(u.zlevel)&&(Ti(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,n);var h=t.getTextGuideLine();h&&this._updateAndAddDisplayable(h,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Ri="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Li=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,n.stage=(e=e||{}).stage||{},n.onframe=e.onframe||function(){},n}return m(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,Ri(function e(){t._running&&(Ri(e),!t._paused&&t.update())})},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Hn(t,e.loop);return this.addAnimator(n),n},e}(ie),Ni=w.domSupported,Fi=(Oi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Ei=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:X(Ei,function(t){var e=t.replace("mouse","pointer");return Oi.hasOwnProperty(e)?e:t})}),Vi=["mousemove","mouseup"],zi=["pointermove","pointerup"],Bi=!1;function Hi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function ji(t){t&&(t.zrByTouch=!0)}function Gi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Ui=function(t,e){this.stopPropagation=Tt,this.stopImmediatePropagation=Tt,this.preventDefault=Tt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Wi={mousedown:function(t){t=me(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=me(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=me(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Gi(this,(t=me(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Bi=!0,t=me(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Bi||(t=me(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){ji(t=me(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Wi.mousemove.call(this,t),Wi.mousedown.call(this,t)},touchmove:function(t){ji(t=me(this.dom,t)),this.handler.processGesture(t,"change"),Wi.mousemove.call(this,t)},touchend:function(t){ji(t=me(this.dom,t)),this.handler.processGesture(t,"end"),Wi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Wi.click.call(this,t)},pointerdown:function(t){Wi.mousedown.call(this,t)},pointermove:function(t){Hi(t)||Wi.mousemove.call(this,t)},pointerup:function(t){Wi.mouseup.call(this,t)},pointerout:function(t){Hi(t)||Wi.mouseout.call(this,t)}};q(["click","dblclick","contextmenu"],function(t){Wi[t]=function(e){e=me(this.dom,e),this.trigger(t,e)}});var Yi={pointermove:function(t){Hi(t)||Yi.mousemove.call(this,t)},pointerup:function(t){Yi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function qi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,ve(t.domTarget,e,n,i)}function Xi(t){var e,n,i,r=t.mounted;for(var o in r)r.hasOwnProperty(o)&&(e=t.domTarget,n=o,i=r[o],ce?e.removeEventListener(n,i,t.listenerOpts[o]):e.detachEvent("on"+n,i));t.mounted={}}var Zi=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Ki=function(t){function e(e,n){var i,r,o,a=t.call(this)||this;return a.__pointerCapturing=!1,a.dom=e,a.painterRoot=n,a._localHandlerScope=new Zi(e,Wi),Ni&&(a._globalHandlerScope=new Zi(document,Yi)),i=a,o=(r=a._localHandlerScope).domHandlers,w.pointerEventsSupported?q(Fi.pointer,function(t){qi(r,t,function(e){o[t].call(i,e)})}):(w.touchEventsSupported&&q(Fi.touch,function(t){qi(r,t,function(e){o[t].call(i,e),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}(r)})}),q(Fi.mouse,function(t){qi(r,t,function(e){e=ge(e),r.touching||o[t].call(i,e)})})),a}return m(e,t),e.prototype.dispose=function(){Xi(this._localHandlerScope),Ni&&Xi(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Ni&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?function(t,e){function n(n){qi(e,n,function(i){i=ge(i),Gi(t,i.target)||(i=function(t,e){return me(t.dom,new Ui(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))},{capture:!0})}w.pointerEventsSupported?q(zi,n):w.touchEventsSupported||q(Vi,n)}(this,e):Xi(e)}},e}(ie),$i=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return m(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=G(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function cr(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function hr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function dr(t){return t.sort(function(t,e){return t-e}),t}function fr(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function pr(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function gr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function mr(t,e,n){if(!t[e])return 0;var i=Z(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),o=X(t,function(t){return(isNaN(t)?0:t)/i*r*100}),a=100*r,s=X(o,function(t){return Math.floor(t)}),l=Z(s,function(t,e){return t+e},0),u=X(o,function(t,e){return t-s[e]});lc&&(c=u[d],h=d);++s[h],u[h]=0,++l}return s[e]/r}var vr=9007199254740991;function yr(t){var e=2*Math.PI;return(t%e+e)%e}function _r(t){return t>-1e-4&&t<1e-4}var br=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function wr(t){if(t instanceof Date)return t;if("string"==typeof t){var e=br.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function xr(t){return Math.pow(10,kr(t))}function kr(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Sr(t,e){var n=kr(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function Cr(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function Ar(t){t.sort(function(t,e){return s(t,e,0)?-1:1});for(var e=-1/0,n=1,i=0;i=0||r&&G(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var ho=co([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),fo=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return ho(this,t,e)},t}(),po=new Je(50);function go(t){if("string"==typeof t){var e=po.get(t);return e&&e.image}return t}function mo(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=po.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!yo(e=o.image)&&o.pending.push(a):((e=new Image).onload=e.onerror=vo,po.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function vo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=ti(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function xo(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=ti(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ko(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=ti(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function ko(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&p+i.accumWidth>i.width&&(o=e.split("\n"),h=!0),i.accumWidth=p}else{var g=Do(e,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+f,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var m=0;m=33&&e<=255}(t)||!!Io[t]}function Do(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,c=0,h=0;hn:r+c+f>n)?c?(s||l)&&(p?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=d,s="",c=u+=f):(l&&(s+=l,c+=u,l="",u=0),o.push(s),a.push(c),s=d,c=f)):p?(o.push(l),a.push(u),l=d,u=f):(o.push(d),a.push(f)):(c+=f,p?(l+=d,u+=f):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=r),{accumWidth:c,lines:o,linesWidths:a}}var Eo="__zr_style_"+Math.round(10*Math.random()),Oo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Po={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Oo[Eo]=!0;var Ro=["z","z2","invisible"],Lo=function(t){function e(e){return t.call(this,e)||this}var n;return m(e,t),e.prototype._init=function(e){for(var n=Q(e),i=0;i-1e-8&&t<1e-8}function Xo(t){return t>1e-8||t<-1e-8}function Zo(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Ko(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function $o(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,c=s*s-3*a*l,h=s*l-9*a*u,d=l*l-3*s*u,f=0;if(qo(c)&&qo(h))qo(s)?o[0]=0:(S=-l/s)>=0&&S<=1&&(o[f++]=S);else{var p=h*h-4*c*d;if(qo(p)){var g=h/c,m=-g/2;(S=-s/a+g)>=0&&S<=1&&(o[f++]=S),m>=0&&m<=1&&(o[f++]=m)}else if(p>0){var v=Bo(p),y=c*s+1.5*a*(-h+v),_=c*s+1.5*a*(-h-v);(S=(-s-((y=y<0?-zo(-y,Go):zo(y,Go))+(_=_<0?-zo(-_,Go):zo(_,Go))))/(3*a))>=0&&S<=1&&(o[f++]=S)}else{var b=(2*c*s-3*a*h)/(2*Bo(c*c*c)),w=Math.acos(b)/3,x=Bo(c),k=Math.cos(w),S=(-s-2*x*k)/(3*a),C=(m=(-s+x*(k+jo*Math.sin(w)))/(3*a),(-s+x*(k-jo*Math.sin(w)))/(3*a));S>=0&&S<=1&&(o[f++]=S),m>=0&&m<=1&&(o[f++]=m),C>=0&&C<=1&&(o[f++]=C)}}return f}function Qo(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(qo(a))Xo(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var u=o*o-4*a*s;if(qo(u))r[0]=-o/(2*a);else if(u>0){var c,h=Bo(u),d=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function Jo(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,c=(l-s)*r+s,h=(c-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function ta(t,e,n,i,r,o,a,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;Uo[0]=l,Uo[1]=u;for(var y=0;y<1;y+=.05)Wo[0]=Zo(t,n,r,a,y),Wo[1]=Zo(e,i,o,s,y),(p=Zt(Uo,Wo))=0&&p=0&&m1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(fa[0]=ha(r)*n+t,fa[1]=ca(r)*i+e,pa[0]=ha(o)*n+t,pa[1]=ca(o)*i+e,u(s,fa,pa),c(l,fa,pa),(r%=da)<0&&(r+=da),(o%=da)<0&&(o+=da),r>o&&!a?o+=da:rr&&(ga[0]=ha(f)*n+t,ga[1]=ca(f)*i+e,u(s,ga,s),c(l,ga,l))}var ka={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Sa=[],Ca=[],Aa=[],Ma=[],Ia=[],Ta=[],Da=Math.min,Ea=Math.max,Oa=Math.cos,Pa=Math.sin,Ra=Math.sqrt,La=Math.abs,Na=Math.PI,Fa=2*Na,Va="undefined"!=typeof Float32Array,za=[];function Ba(t){return Math.round(t/Na*1e8)/1e8%2*Na}function Ha(t,e){var n=Ba(t[0]);n<0&&(n+=Fa);var i=t[1];i+=n-t[0],!e&&i-n>=Fa?i=n+Fa:e&&n-i>=Fa?i=n-Fa:!e&&n>i?i=n+(Fa-Ba(n-i)):e&&n0&&(this._ux=La(n/ui/t)||0,this._uy=La(n/ui/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this.addData(ka.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=La(t-this._xi)>this._ux||La(e-this._yi)>this._uy||this._len<5;return this.addData(ka.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(ka.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(ka.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){return za[0]=i,za[1]=r,Ha(za,o),this.addData(ka.A,t,e,n,n,i=za[0],(r=za[1])-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Oa(r)*n+t,this._yi=Pa(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(ka.R,t,e,n,i),this},t.prototype.closePath=function(){this.addData(ka.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&f<=t||c<0&&f>=t||0===c&&(h>0&&p<=e||h<0&&p>=e);)f+=c*(n=o[i=this._dashIdx]),p+=h*n,this._dashIdx=(i+1)%g,c>0&&fl||h>0&&pu||a[i%2?"moveTo":"lineTo"](c>=0?Da(f,t):Ea(f,t),h>=0?Da(p,e):Ea(p,e));this._dashOffset=-Ra((c=f-t)*c+(h=p-e)*h)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var a,s,l,u,c,h=this._ctx,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._xi,m=this._yi,v=0,y=this._dashIdx,_=p.length,b=0;for(f<0&&(f=d+f),f%=d,a=0;a<1;a+=.1)s=Zo(g,t,n,r,a+.1)-Zo(g,t,n,r,a),l=Zo(m,e,i,o,a+.1)-Zo(m,e,i,o,a),v+=Ra(s*s+l*l);for(;y<_&&!((b+=p[y])>f);y++);for(a=(b-f)/v;a<=1;)u=Zo(g,t,n,r,a),c=Zo(m,e,i,o,a),y%2?h.moveTo(u,c):h.lineTo(u,c),a+=p[y]/v,y=(y+1)%_;y%2!=0&&h.lineTo(r,o),this._dashOffset=-Ra((s=r-u)*s+(l=o-c)*l)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,this._dashedBezierTo(t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,n,i,r,o)},t.prototype.toStatic=function(){if(this._saveData){var t=this.data;t instanceof Array&&(t.length=this._len,Va&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Aa[0]=Aa[1]=Ia[0]=Ia[1]=Number.MAX_VALUE,Ma[0]=Ma[1]=Ta[0]=Ta[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||La(m)>i||h===e-1)&&(p=Math.sqrt(T*T+m*m),r=g,o=_);break;case ka.C:var v=t[h++],y=t[h++],_=(g=t[h++],t[h++]),b=t[h++],w=t[h++];p=ea(r,o,v,y,g,_,b,w,10),r=b,o=w;break;case ka.Q:p=sa(r,o,v=t[h++],y=t[h++],g=t[h++],_=t[h++],10),r=g,o=_;break;case ka.A:var x=t[h++],k=t[h++],S=t[h++],C=t[h++],A=t[h++],M=t[h++],I=M+A;h+=1,h++,f&&(a=Oa(A)*S+x,s=Pa(A)*C+k),p=Ea(S,C)*Da(Fa,Math.abs(M)),r=Oa(I)*S+x,o=Pa(I)*C+k;break;case ka.R:a=r=t[h++],s=o=t[h++],p=2*t[h++]+2*t[h++];break;case ka.Z:var T=a-r;m=s-o,p=Math.sqrt(T*T+m*m),r=a,o=s}p>=0&&(l[c++]=p,u+=p)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,c=this.data,h=this._ux,d=this._uy,f=this._len,p=e<1,g=0,m=0;if(!p||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var v=0;vh||La(s-o)>d||v===f-1){if(p){if(g+(H=l[m++])>u){t.lineTo(r*(1-(j=(u-g)/H))+a*j,o*(1-j)+s*j);break t}g+=H}t.lineTo(a,s),r=a,o=s}break;case ka.C:var b=c[v++],w=c[v++],x=c[v++],k=c[v++],S=c[v++],C=c[v++];if(p){if(g+(H=l[m++])>u){Jo(r,b,x,S,j=(u-g)/H,Sa),Jo(o,w,k,C,j,Ca),t.bezierCurveTo(Sa[1],Ca[1],Sa[2],Ca[2],Sa[3],Ca[3]);break t}g+=H}t.bezierCurveTo(b,w,x,k,S,C),r=S,o=C;break;case ka.Q:if(b=c[v++],w=c[v++],x=c[v++],k=c[v++],p){if(g+(H=l[m++])>u){oa(r,b,x,j=(u-g)/H,Sa),oa(o,w,k,j,Ca),t.quadraticCurveTo(Sa[1],Ca[1],Sa[2],Ca[2]);break t}g+=H}t.quadraticCurveTo(b,w,x,k),r=x,o=k;break;case ka.A:var A=c[v++],M=c[v++],I=c[v++],T=c[v++],D=c[v++],E=c[v++],O=c[v++],P=!c[v++],R=I>T?I:T,L=La(I-T)>.001,N=D+E,F=!1;if(p&&(g+(H=l[m++])>u&&(N=D+E*(u-g)/H,F=!0),g+=H),L&&t.ellipse?t.ellipse(A,M,I,T,O,D,N,P):t.arc(A,M,R,D,N,P),F)break t;_&&(n=Oa(D)*I+A,i=Pa(D)*T+M),r=Oa(N)*I+A,o=Pa(N)*T+M;break;case ka.R:n=r=c[v],i=o=c[v+1],a=c[v++],s=c[v++];var V=c[v++],z=c[v++];if(p){if(g+(H=l[m++])>u){var B=u-g;t.moveTo(a,s),t.lineTo(a+Da(B,V),s),(B-=V)>0&&t.lineTo(a+V,s+Da(B,z)),(B-=z)>0&&t.lineTo(a+Ea(V-B,0),s+z),(B-=V)>0&&t.lineTo(a,s+Ea(z-B,0));break t}g+=H}t.rect(a,s,V,z);break;case ka.Z:if(p){var H;if(g+(H=l[m++])>u){var j;t.lineTo(r*(1-(j=(u-g)/H))+n*j,o*(1-j)+i*j);break t}g+=H}t.closePath(),r=n,o=i}}},t.CMD=ka,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,void(e._uy=0)),t}();function Ga(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||at+l&&o>n+l||oe+h&&c>i+h&&c>o+h&&c>s+h||ct+h&&u>n+h&&u>r+h&&u>a+h||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||c+ur&&(r+=Xa);var d=Math.atan2(l,s);return d<0&&(d+=Xa),d>=i&&d<=r||d+Xa>=i&&d+Xa<=r}function Ka(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var $a=ja.CMD,Qa=2*Math.PI,Ja=[-1,-1,-1],ts=[-1,-1];function es(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(c=ts[0],ts[0]=ts[1],ts[1]=c),p=Zo(e,i,o,s,ts[0]),f>1&&(g=Zo(e,i,o,s,ts[1]))),d+=2===f?ve&&s>i&&s>o||s=0&&c<=1&&(r[l++]=c);else{var u=a*a-4*o*s;if(qo(u))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,h=Bo(u),d=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,i,o,s,Ja);if(0===l)return 0;var u=ra(e,i,o);if(u>=0&&u<=1){for(var c=0,h=na(e,i,o,u),d=0;dn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Ja[0]=-l,Ja[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Qa-1e-4){i=0,r=Qa;var c=o?1:-1;return a>=Ja[0]+t&&a<=Ja[1]+t?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=Qa,r+=Qa);for(var d=0,f=0;f<2;f++){var p=Ja[f];if(p+t>a){var g=Math.atan2(s,p);c=o?1:-1,g<0&&(g=Qa+g),(g>=i&&g<=r||g+Qa>=i&&g+Qa<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),d+=c)}}return d}function rs(t,e,n,i,r){for(var o,a,s=t.data,l=t.len(),u=0,c=0,h=0,d=0,f=0,p=0;p1&&(n||(u+=Ka(c,h,d,f,i,r))),m&&(d=c=s[p],f=h=s[p+1]),g){case $a.M:c=d=s[p++],h=f=s[p++];break;case $a.L:if(n){if(Ga(c,h,s[p],s[p+1],e,i,r))return!0}else u+=Ka(c,h,s[p],s[p+1],i,r)||0;c=s[p++],h=s[p++];break;case $a.C:if(n){if(Ua(c,h,s[p++],s[p++],s[p++],s[p++],s[p],s[p+1],e,i,r))return!0}else u+=es(c,h,s[p++],s[p++],s[p++],s[p++],s[p],s[p+1],i,r)||0;c=s[p++],h=s[p++];break;case $a.Q:if(n){if(Wa(c,h,s[p++],s[p++],s[p],s[p+1],e,i,r))return!0}else u+=ns(c,h,s[p++],s[p++],s[p],s[p+1],i,r)||0;c=s[p++],h=s[p++];break;case $a.A:var v=s[p++],y=s[p++],_=s[p++],b=s[p++],w=s[p++],x=s[p++];p+=1;var k=!!(1-s[p++]);o=Math.cos(w)*_+v,a=Math.sin(w)*b+y,m?(d=o,f=a):u+=Ka(c,h,o,a,i,r);var S=(i-v)*b/_+v;if(n){if(Za(v,y,b,w,w+x,k,e,S,r))return!0}else u+=is(v,y,b,w,w+x,k,S,r);c=Math.cos(w+x)*_+v,h=Math.sin(w+x)*b+y;break;case $a.R:if(d=c=s[p++],f=h=s[p++],o=d+s[p++],a=f+s[p++],n){if(Ga(d,f,o,f,e,i,r)||Ga(o,f,o,a,e,i,r)||Ga(o,a,d,a,e,i,r)||Ga(d,a,d,f,e,i,r))return!0}else u+=Ka(o,f,o,a,i,r),u+=Ka(d,a,d,f,i,r);break;case $a.Z:if(n){if(Ga(c,h,d,f,e,i,r))return!0}else u+=Ka(c,h,d,f,i,r);c=d,h=f}}return n||Math.abs(h-f)<1e-4||(u+=Ka(c,h,d,f,i,r)||0),0!==u}var os=H({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Oo),as={style:H({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Po.style)},ss=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],ls=function(t){function e(e){return t.call(this,e)||this}var n;return m(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?ci:e>.2?"#eee":hi}if(t)return hi}return ci},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(it(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==Sn(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~e.SHAPE_CHANGED_BIT},e.prototype.createPathProxy=function(){this.path=new ja(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&e.SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var s=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;l=Math.max(l,null==u?4:u)}s>1e-10&&(a.width+=l/s,a.height+=l/s,a.x-=l/s/2,a.y-=l/s/2)}return a}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(i.contain(t=n[0],e=n[1])){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return rs(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return rs(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=e.SHAPE_CHANGED_BIT,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){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:B(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&e.SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return Mt(os,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=B({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=B({},i.shape),B(s,n.shape)):(s=B({},r?this.shape:i.shape),B(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=B({},this.shape);for(var u={},c=Q(s),h=0;h0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return Mt(us,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=ni(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Vo);cs.prototype.type="tspan";var hs=cs,ds=H({x:0,y:0},Oo),fs={style:H({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Po.style)},ps=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.createStyle=function(t){return Mt(ds,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return fs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new $n(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Vo);ps.prototype.type="image";var gs=ps,ms=Math.round;function vs(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(ms(2*i)===ms(2*r)&&(t.x1=t.x2=_s(i,s,!0)),ms(2*o)===ms(2*a)&&(t.y1=t.y2=_s(o,s,!0)),t):t}}function ys(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=_s(i,s,!0),t.y=_s(r,s,!0),t.width=Math.max(_s(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(_s(r+a,s,!1)-t.y,0===a?0:1),t):t}}function _s(t,e,n){if(!e)return t;var i=ms(2*t);return(i+ms(e))%2==0?i/2:(i+(n?1:-1))/2}var bs=function(){this.x=0,this.y=0,this.width=0,this.height=0},ws={},xs=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new bs},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=ys(ws,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>c&&(i*=c/(a=i+r),r*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+c-r),0!==r&&t.arc(s+u-r,l+c-r,r,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ls);xs.prototype.type="rect";var ks=xs,Ss={fill:"#000"},Cs={style:H({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},Po.style)},As=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ss,n.attr(e),n}return m(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;ed&&u){var f=Math.floor(d/l);n=n.slice(0,f)}var p=d,g=c;if(r&&(p+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var m=wo(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,C=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),A=i.calculatedLineHeight,M=0;Ml&&Mo(n,t.substring(l,u),e,s),Mo(n,i[2],e,s,i[1]),l=_o.lastIndex}lo){w>0?(y.tokens=y.tokens.slice(0,w),m(y,b,_),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var M=x.width,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))O.percentWidth=M,c.push(O),O.contentWidth=ti(O.text,C);else{if(I){var T=x.backgroundColor,D=T&&T.image;D&&yo(D=go(D))&&(O.width=Math.max(O.width,D.width*A/D.height))}var E=p&&null!=r?r-b:null;null!=E&&E=0&&"right"===(C=v[S]).align;)this._placeToken(C,t,_,d,k,"right",p),b-=C.width,k-=C.width,S--;for(x+=(n-(x-h)-(f-k)-b)/2;w<=S;)this._placeToken(C=v[w],t,_,d,x+C.width/2,"center",p),x+=C.width,w++;d+=_}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&Ps(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var c=!!s.backgroundColor,h=t.textPadding;h&&(r=Es(r,o,h),u-=t.height/2-h[0]-t.innerHeight/2);var d=this._getOrCreateChild(hs),f=d.createStyle();d.useStyle(f);var p=this._defaultStyle,g=!1,m=0,v=Ds("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,p.fill)),y=Ds("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||a||p.autoStroke&&!g?null:(m=2,p.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=u,_&&(f.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,f.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||Jn,f.opacity=mt(s.opacity,e.opacity,1),y&&(f.lineWidth=mt(s.lineWidth,e.lineWidth,m),f.lineDash=gt(s.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=y),v&&(f.fill=v);var b=t.contentWidth,w=t.contentHeight;d.setBoundingRect(new $n(ii(f.x,b,f.textAlign),ri(f.y,w,f.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,c=t.borderWidth,h=t.borderColor,d=it(u),f=t.borderRadius,p=this;if(d||c&&h){(a=this._getOrCreateChild(ks)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=f,a.dirtyShape()}if(d)(l=a.style).fill=u||null,l.fillOpacity=gt(t.fillOpacity,1);else if(u&&u.image){(s=this._getOrCreateChild(gs)).onload=function(){p.dirtyStyle()};var m=s.style;m.image=u.image,m.x=n,m.y=i,m.width=r,m.height=o}c&&h&&((l=a.style).lineWidth=c,l.stroke=h,l.strokeOpacity=gt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var v=(a||s).style;v.shadowBlur=t.shadowBlur||0,v.shadowColor=t.shadowColor||"transparent",v.shadowOffsetX=t.shadowOffsetX||0,v.shadowOffsetY=t.shadowOffsetY||0,v.opacity=mt(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&bt(e)||t.textFont||t.font},e}(Vo),Ms={left:!0,right:1,center:1},Is={top:1,bottom:1,middle:1};function Ts(t){if(t){t.font=As.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||Ms[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||Is[n]?n:"top",t.padding&&(t.padding=yt(t.padding))}}function Ds(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Es(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Os(t){var e=t.text;return null!=e&&(e+=""),e}function Ps(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var Rs=As,Ls=Ur(),Ns=1,Fs={},Vs=Ur(),zs=["emphasis","blur","select"],Bs=["normal","emphasis","blur","select"],Hs="highlight",js="downplay",Gs="select",Us="unselect",Ws="toggleSelect";function Ys(t){return null!=t&&"none"!==t}var qs=new Je(100);function Xs(t){if("string"!=typeof t)return t;var e=qs.get(t);return e||(e=gn(t,-.1),qs.put(t,e)),e}function Zs(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function Ks(t){Zs(t,"emphasis",2)}function $s(t){2===t.hoverState&&Zs(t,"normal",0)}function Qs(t){Zs(t,"blur",1)}function Js(t){1===t.hoverState&&Zs(t,"normal",0)}function tl(t){t.selected=!0}function el(t){t.selected=!1}function nl(t,e,n){e(t,n)}function il(t,e,n){nl(t,e,n),t.isGroup&&t.traverse(function(t){nl(t,e,n)})}function rl(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function ol(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var r=n&&G(n,"select")>=0,o=!1;if(t instanceof ls){var a=Vs(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Ys(s)||Ys(l)){var u=(i=i||{}).style||{};!Ys(u.fill)&&Ys(s)?(o=!0,i=B({},i),(u=B({},u)).fill=Xs(s)):!Ys(u.stroke)&&Ys(l)&&(o||(i=B({},i),u=B({},u)),u.stroke=Xs(l)),i.style=u}}if(i&&null==i.z2){o||(i=B({},i));var c=t.z2EmphasisLift;i.z2=t.z2+(null!=c?c:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=G(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}})}),e}function xl(t,e,n){Ml(t,!0),il(t,al),kl(t,e,n)}function kl(t,e,n){var i=Ls(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var Sl=["emphasis","blur","select"],Cl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Al(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=Ll(p),s*=Ll(p));var g=(r===o?-1:1)*Ll((a*a*(s*s)-a*a*(f*f)-s*s*(d*d))/(a*a*(f*f)+s*s*(d*d)))||0,m=g*a*f/s,v=g*-s*d/a,y=(t+n)/2+Fl(h)*m-Nl(h)*v,_=(e+i)/2+Nl(h)*m+Fl(h)*v,b=Hl([1,0],[(d-m)/a,(f-v)/s]),w=[(d-m)/a,(f-v)/s],x=[(-1*d-m)/a,(-1*f-v)/s],k=Hl(w,x);if(Bl(w,x)<=-1&&(k=Vl),Bl(w,x)>=1&&(k=0),k<0){var S=Math.round(k/Vl*1e6)/1e6;k=2*Vl+S%2*Vl}c.addData(u,y,_,a,s,b,k,h,o)}var Gl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Ul=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Wl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.applyTransform=function(t){},e}(ls);function Yl(t){return null!=t.setData}function ql(t,e){var n=function(t){var e=new ja;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=ja.CMD,l=t.match(Gl);if(!l)return e;for(var u=0;uD*D+E*E&&(S=A,C=M),{cx:S,cy:C,x01:-c,y01:-h,x11:S*(r/w-1),y11:C*(r/w-1)}}var fu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},pu=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new fu},e.prototype.buildPath=function(t,e){!function(t,e){var n=uu(e.r,0),i=uu(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var o=n;n=i,i=o}var a,s=!!e.clockwise,l=e.startAngle,u=e.endAngle;if(l===u)a=0;else{var c=[l,u];Ha(c,!s),a=su(c[0]-c[1])}var h=e.cx,d=e.cy,f=e.cornerRadius||0,p=e.innerCornerRadius||0;if(n>hu)if(a>nu-hu)t.moveTo(h+n*ru(l),d+n*iu(l)),t.arc(h,d,n,l,u,!s),i>hu&&(t.moveTo(h+i*ru(u),d+i*iu(u)),t.arc(h,d,i,u,l,s));else{var g=su(n-i)/2,m=cu(g,f),v=cu(g,p),y=v,_=m,b=n*ru(l),w=n*iu(l),x=i*ru(u),k=i*iu(u),S=void 0,C=void 0,A=void 0,M=void 0;if((m>hu||v>hu)&&(S=n*ru(u),C=n*iu(u),A=i*ru(l),M=i*iu(l),ahu)if(_>hu){var L=du(A,M,b,w,n,_,s),N=du(S,C,x,k,n,_,s);t.moveTo(h+L.cx+L.x01,d+L.cy+L.y01),_hu&&a>hu?y>hu?(L=du(x,k,S,C,i,-y,s),N=du(b,w,A,M,i,-y,s),t.lineTo(h+L.cx+L.x01,d+L.cy+L.y01),y=2){if(i&&"spline"!==i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],c=[],h=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;dn-2?n-1:l+1],f=t[l>n-3?n-1:l+2]);var p=u*u,g=u*p;i.push([_u(c[0],h[0],d[0],f[0],u,p,g),_u(c[1],h[1],d[1],f[1],u,p,g)])}return i}(r,n)),t.moveTo(r[0][0],r[0][1]),s=1;for(var h=r.length;sUu[1]){if(a=!1,r)return a;var u=Math.abs(Uu[0]-Gu[1]),c=Math.abs(Gu[0]-Uu[1]);Math.min(u,c)>i.len()&&jn.scale(i,l,u0?l?e.animateFrom(n,{duration:p,delay:m||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:p,delay:m||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function dc(t,e,n,i,r,o){hc("update",t,e,n,i,r,o)}function fc(t,e,n,i,r,o){hc("init",t,e,n,i,r,o)}function pc(t,e,n,i,r,o){vc(t)||hc("remove",t,e,n,i,r,o)}function gc(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),pc(t,{style:{opacity:0}},e,n,i)}function mc(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||gc(t,e,n,i)}):gc(t,e,n,i)}function vc(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function wc(t){return!t.isGroup}function xc(t,e,n){if(t&&e){var i,r=(i={},t.traverse(function(t){wc(t)&&t.anid&&(i[t.anid]=t)}),i);e.traverse(function(t){if(wc(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),dc(t,i,n,Ls(t).dataIndex)}}})}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=B({},t.shape)),e}}function kc(t,e){return X(t,function(t){var n=t[0];n=Ku(n,e.x),n=$u(n,e.x+e.width);var i=t[1];return i=Ku(i,e.y),[n,i=$u(i,e.y+e.height)]})}function Sc(t,e){var n=Ku(t.x,e.x),i=$u(t.x+t.width,e.x+e.width),r=Ku(t.y,e.y),o=$u(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Cc(t,e,n){var i=B({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),H(r,n),new gs(i)):ic(t.replace("path://",""),i,n,"center")}function Ac(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var p=t-r,g=e-o,m=Ic(p,g,u,c)/f;if(m<0||m>1)return!1;var v=Ic(p,g,h,d)/f;return!(v<0||v>1)}function Ic(t,e,n,i){return t*i-n*e}function Tc(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=it(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&q(Q(l),function(t){It(s,t)||(s[t]=l[t],s.$vars.push(t))});var u=Ls(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:H({content:i,formatterParams:s},r)}}ec("circle",$l),ec("ellipse",tu),ec("sector",gu),ec("ring",yu),ec("polygon",ku),ec("polyline",Au),ec("rect",ks),ec("line",Du),ec("bezierCurve",Lu),ec("arc",Vu);var Dc={};function Ec(t,e){for(var n=0;n-1?sh:"EN";function hh(t,e){t=t.toUpperCase(),uh[t]=new ih(e),lh[t]=e}hh("EN",{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:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},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:". "}}}}),hh(sh,{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"}},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 dh=36e5,fh=864e5,ph=31536e6,gh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},mh={year:"{yyyy}",month:"{yyyy}-{MM}",day:"{yyyy}-{MM}-{dd}",hour:"{yyyy}-{MM}-{dd} "+gh.hour,minute:"{yyyy}-{MM}-{dd} "+gh.minute,second:"{yyyy}-{MM}-{dd} "+gh.second,millisecond:gh.none},vh=["year","month","day","hour","minute","second","millisecond"],yh=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function _h(t,e){return"0000".substr(0,e-(t+="").length)+t}function bh(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function wh(t,e,n,i){var r=wr(t),o=r[Sh(n)](),a=r[Ch(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[Ah(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[Mh(n)](),h=(c-1)%12+1,d=r[Ih(n)](),f=r[Th(n)](),p=r[Dh(n)](),g=(i instanceof ih?i:function(t){return uh[t]}(i||ch)||uh.EN).getModel("time"),m=g.get("month"),v=g.get("monthAbbr"),y=g.get("dayOfWeek"),_=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,_h(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,_h(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,y[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,_h(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,_h(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,_h(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,_h(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,_h(p,3)).replace(/{S}/g,p+"")}function xh(t,e){var n=wr(t),i=n[Ch(e)]()+1,r=n[Ah(e)](),o=n[Mh(e)](),a=n[Ih(e)](),s=n[Th(e)](),l=0===n[Dh(e)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,d=h&&1===r;return d&&1===i?"year":d?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function kh(t,e,n){var i="number"==typeof t?wr(t):t;switch(e=e||xh(t,n)){case"year":return i[Sh(n)]();case"half-year":return i[Ch(n)]()>=6?1:0;case"quarter":return Math.floor((i[Ch(n)]()+1)/4);case"month":return i[Ch(n)]();case"day":return i[Ah(n)]();case"half-day":return i[Mh(n)]()/24;case"hour":return i[Mh(n)]();case"minute":return i[Ih(n)]();case"second":return i[Th(n)]();case"millisecond":return i[Dh(n)]()}}function Sh(t){return t?"getUTCFullYear":"getFullYear"}function Ch(t){return t?"getUTCMonth":"getMonth"}function Ah(t){return t?"getUTCDate":"getDate"}function Mh(t){return t?"getUTCHours":"getHours"}function Ih(t){return t?"getUTCMinutes":"getMinutes"}function Th(t){return t?"getUTCSeconds":"getSeconds"}function Dh(t){return t?"getUTCSeconds":"getSeconds"}function Eh(t){return t?"setUTCFullYear":"setFullYear"}function Oh(t){return t?"setUTCMonth":"setMonth"}function Ph(t){return t?"setUTCDate":"setDate"}function Rh(t){return t?"setUTCHours":"setHours"}function Lh(t){return t?"setUTCMinutes":"setMinutes"}function Nh(t){return t?"setUTCSeconds":"setSeconds"}function Fh(t){return t?"setUTCSeconds":"setSeconds"}function Vh(t){if(!Ir(t))return it(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function zh(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Bh=yt,Hh=/([&<>"'])/g,jh={"&":"&","<":"<",">":">",'"':""","'":"'"};function Gh(t){return null==t?"":(t+"").replace(Hh,function(t,e){return jh[e]})}function Uh(t,e,n){function i(t){return t&&bt(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?wr(t):t;if(!isNaN(+s))return wh(s,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return rt(t)?i(t):ot(t)&&r(t)?t+"":"-";var l=Mr(t);return r(l)?Vh(l):rt(t)?i(t):"-"}var Wh=["a","b","c","d","e","f","g"],Yh=function(t,e){return"{"+t+(null==e?"":e)+"}"};function qh(t,e,n){et(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Zh(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=wr(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),c=i["get"+r+"Seconds"](),h=i["get"+r+"Milliseconds"]();return t.replace("MM",_h(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100+"").replace("dd",_h(s,2)).replace("d",s).replace("hh",_h(l,2)).replace("h",l).replace("mm",_h(u,2)).replace("m",u).replace("ss",_h(c,2)).replace("s",c).replace("SSS",_h(h,3))}function Kh(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function $h(t,e){return e=e||"transparent",it(t)?t:at(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Qh(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Jh=q,td=["left","right","top","bottom","width","height"],ed=[["width","left","right"],["height","top","bottom"]];function nd(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var c,h,d=l.getBoundingRect(),f=e.childAt(u+1),p=f&&f.getBoundingRect();if("horizontal"===t){var g=d.width+(p?-p.x+d.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(p?-p.y+d.y:0);(h=a+m)>r||l.newline?(o+=s+n,a=0,h=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)})}var id=nd;function rd(t,e,n){n=Bh(n||0);var i=e.width,r=e.height,o=cr(t.left,i),a=cr(t.top,r),s=cr(t.right,i),l=cr(t.bottom,r),u=cr(t.width,i),c=cr(t.height,r),h=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(c)&&(c=r-l-h-a),null!=f&&(isNaN(u)&&isNaN(c)&&(f>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-c-h),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-c/2-n[0];break;case"bottom":a=r-c-h}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(c)&&(c=r-h-a-(l||0));var p=new $n(o+n[3],a+n[0],u,c);return p.margin=n,p}function od(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new $n(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}var c=rd(H({width:l.width,height:l.height},e),n,i),h=o?c.x-l.x:0,d=a?c.y-l.y:0;"raw"===s?(t.x=h,t.y=d):(t.x+=h,t.y+=d),t.markRedraw()}}function ad(t){var e=t.layoutMode||t.constructor.layoutMode;return at(e)?e:e?{type:e}:null}function sd(t,e,n){var i=n&&n.ignoreSize;!et(i)&&(i=[i,i]);var r=a(ed[0],0),o=a(ed[1],1);function a(n,r){var o={},a=0,u={},c=0;if(Jh(n,function(e){u[e]=t[e]}),Jh(n,function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&c++}),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var h=0;h=0;a--)o=V(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Id";return Kr(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(n,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(ih);oo(hd,ih),uo(hd),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=no(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=no(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(hd),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,e,i,r){if(t.length){var o=function(t){var e={},i=[];return q(t,function(r){var o,a,s=n(e,r),l=function(t,e){var n=[];return q(t,function(t){G(e,t)>=0&&n.push(t)}),n}(s.originalDeps=(a=[],q(hd.getClassesByMainType(o=r),function(t){a=a.concat(t.dependencies||t.prototype.dependencies||[])}),a=X(a,function(t){return no(t).main}),"dataset"!==o&&G(a,"dataset")<=0&&a.unshift("dataset"),a),t);s.entryCount=l.length,0===s.entryCount&&i.push(r),q(l,function(t){G(s.predecessor,t)<0&&s.predecessor.push(t);var i=n(e,t);G(i.successor,t)<0&&i.successor.push(r)})}),{graph:e,noEntryList:i}}(e),a=o.graph,s=o.noEntryList,l={};for(q(t,function(t){l[t]=!0});s.length;){var u=s.pop(),c=a[u],h=!!l[u];h&&(i.call(r,u,c.originalDeps.slice()),delete l[u]),q(c.successor,h?f:d)}q(l,function(){throw new Error("")})}function d(t){a[t].entryCount--,0===a[t].entryCount&&s.push(t)}function f(t){l[t]=!0,d(t)}}}(hd);var dd=hd,fd="";"undefined"!=typeof navigator&&(fd=navigator.platform||"");var pd="rgba(0, 0, 0, 0.2)",gd={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:pd,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:pd,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:pd,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:pd,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:pd,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:pd,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:fd.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},md=Ct(["tooltip","label","itemName","itemId","seriesName"]),vd="original",yd="arrayRows",_d="objectRows",bd="keyedColumns",wd="typedArray",xd="unknown",kd="column",Sd="row",Cd=Ur();function Ad(t,e,n){var i={},r=Id(e);if(!r||!t)return i;var o,a,s=[],l=[],u=Cd(e.ecModel).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;q(t=t.slice(),function(e,n){var r=at(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]});var h=u.get(c)||u.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((c=c||n)&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}var Bd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new ih(i),this._locale=new ih(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=Gd(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Gd(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):Pd(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&q(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=Ct(),s=e&&e.replaceMergeMainTypeMap;Cd(this).datasetMap=Ct(),q(t,function(t,e){null!=t&&(dd.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?F(t):V(n[e],t,!0))}),s&&s.each(function(t,e){dd.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))}),dd.topologicalTravel(o,dd.getAllClassMainTypes(),function(e){var o=function(t,e,n){var i=Rd.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,Pr(t[e])),a=i.get(e),l=Fr(a,o,a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll");(function(t,e,n){q(t,function(t){var i=t.newOption;at(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))})})(l,e,dd),n[e]=null,i.set(e,null),r.set(e,0);var u=[],c=[],h=0;q(l,function(t,n){var i=t.existing,r=t.newOption;if(r){var o=dd.getClass(e,t.keyInfo.subType,!("series"===e));if(!o)return;if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var a=B({componentIndex:n},t.keyInfo);B(i=new o(r,this,this,a),a),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(u.push(i.option),c.push(i),h++):(u.push(void 0),c.push(void 0))},this),n[e]=u,i.set(e,c),r.set(e,h),"series"===e&&Ed(this)},this),this._seriesIndices||Ed(this)},e.prototype.getOption=function(){var t=F(this.option);return q(t,function(e,n){if(dd.hasClass(n)){for(var i=Pr(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!jr(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}}),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}}),r}var $d=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&(q(Pr(t.series),function(t){t&&t.data&<(t.data)&&xt(t.data)}),q(Pr(t.dataset),function(t){t&&t.source&<(t.source)&&xt(t.source)})),t=F(t);var i=this._optionBackup,r=function(t,e,n){var i,r,o=[],a=t.baseOption,s=t.timeline,l=t.options,u=t.media,c=!!t.media,h=!!(l||s||a&&a.timeline);function d(t){q(e,function(e){e(t,n)})}return a?(r=a).timeline||(r.timeline=s):((h||c)&&(t.options=t.media=null),r=t),c&&et(u)&&q(u,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))}),d(r),q(l,function(t){return d(t)}),q(o,function(t){return d(t.option)}),{baseOption:r,timelineOptions:l||[],mediaDefault:i,mediaList:o}}(t,e,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],F(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=F(n[i.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,n=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,a=[],s=[];if(!r.length&&!o)return s;for(var l=0,u=r.length;l=0;p--){var g=t[p];if(a||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var m=g.data.getByRawIndex(g.stackResultDimension,h);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return i[0]=d,i[1]=f,i});o.hostModel.setData(s),e.data=s})}var _f,bf,wf,xf,kf,Sf=function(t){this.data=t.data||(t.sourceFormat===bd?{}:[]),this.sourceFormat=t.sourceFormat||xd,this.seriesLayoutBy=t.seriesLayoutBy||kd,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function Cf(t){return t instanceof Sf}function Af(t,e,n,i){n=n||Tf(t);var r=e.seriesLayoutBy,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:Df(r),startIndex:a,dimensionsDetectedCount:o};if(e===yd){var s=t;"auto"===i||null==i?Ef(function(t){null!=t&&"-"!==t&&(it(t)?null==a&&(a=1):a=0)},n,s,10):a=ot(i)?i:i?1:0,r||1!==a||(r=[],Ef(function(t,e){r[e]=null!=t?t+"":""},n,s,1/0)),o=r?r.length:n===Sd?s.length:s[0]?s[0].length:null}else if(e===_d)r||(r=function(t){for(var e,n=0;nu&&(u=f)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(o||d1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},ep=function(){function t(t,e){"number"!=typeof e&&Kf(""),this._opFn=tp[t],this._rvalFloat=Mr(e)}return t.prototype.evaluate=function(t){return this._opFn("number"==typeof t?t:Mr(t),this._rvalFloat)},t}(),np=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,r="number"===n?t:Mr(t),o="number"===i?e:Mr(e),a=isNaN(r),s=isNaN(o);if(a&&(r=this._incomparable),s&&(o=this._incomparable),a&&s){var l="string"===n,u="string"===i;l&&(r=u?t:0),u&&(o=l?e:0)}return ro?-this._resultLT:0},t}(),ip=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Mr(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=Mr(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function rp(t,e){return"eq"===t||"ne"===t?new ip("eq"===t,e):It(tp,t)?new ep(t,e):null}var op=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return $f(t,e)},t}();function ap(t){return dp(t.sourceFormat)||Kf(""),t.data}function sp(t){var e=t.sourceFormat,n=t.data;if(dp(e)||Kf(""),e===yd){for(var i=[],r=0,o=n.length;r9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(gp(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=lt(a=o.get("data",!0))?wd:vd,e=[];var c=this._getSourceMetaRawOption(),h=l?l.metaRawOption:null;t=[Af(a,{seriesLayoutBy:gt(c.seriesLayoutBy,h?h.seriesLayoutBy:null),sourceHeader:gt(c.sourceHeader,h?h.sourceHeader:null),dimensions:gt(c.dimensions,h?h.dimensions:null)},s,o.get("encode",!0))]}else{var d=n;if(r){var f=this._applyTransform(i);t=f.sourceList,e=f.upstreamSignList}else t=[Af(d.get("source",!0),this._getSourceMetaRawOption(),null,null)],e=[]}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);null!=r&&1!==t.length&&mp("");var o,a=[],s=[];return q(t,function(t){t.prepareSource();var e=t.getSource(r||0);null==r||e||mp(""),a.push(e),s.push(t._getVersionSign())}),i?e=function(t,e,n){var i=Pr(t),r=i.length;r||Kf("");for(var o=0,a=r;o1||e>0&&!t.noHeader,i=0;q(t.blocks,function(t){wp(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))}),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var r=e.noHeader,o=Sp(e),a=function(t,e,n,i){var r=[],o=e.blocks||[];_t(!o||et(o)),o=o||[];var a=t.orderMode;if(e.sortBlocks&&a){o=o.slice();var s={valueAsc:"asc",valueDesc:"desc"};if(It(s,a)){var l=new np(s[a],null);o.sort(function(t,e){return l.evaluate(t.sortParam,e.sortParam)})}else"seriesDesc"===a&&o.reverse()}var u=Sp(e);if(q(o,function(e,n){var o=wp(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)}),r.length)return"richText"===t.renderMode?r.join(u.richText):Cp(r.join(""),n)}(t,e,r?n:o.html,i);if(r)return a;var s=Uh(e.header,"ordinal",t.useUTC),l=vp(i,t.renderMode).nameStyle;return"richText"===t.renderMode?Ap(t,s,l)+o.richText+a:Cp('
'+Gh(s)+"
"+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,c=t.useUTC;if(!o||!a){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),d=o?"":Uh(l,"ordinal",c),f=e.valueType,p=a?[]:et(u)?X(u,function(t,e){return Uh(t,et(f)?f[e]:f,c)}):[Uh(u,et(f)?f[0]:f,c)],g=!s||!o,m=!s&&o,v=vp(i,r),y=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":h)+(o?"":Ap(t,d,y))+(a?"":function(t,e,n,i,r){var o=[r];return n&&o.push({padding:[0,0,0,i?10:20],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,p,g,m,_)):Cp((s?"":h)+(o?"":function(t,e,n){return''+Gh(t)+""}(d,!s,y))+(a?"":function(t,e,n,i){return''+X(t,function(t){return Gh(t)}).join("  ")+""}(p,g,m,_)),n)}}}};function kp(t,e,n,i,r,o){if(t){var a=wp(t);return a.planLayout(t),a.build({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e},t,0,o)}}function Sp(t){var e=t.__gapLevelBetweenSubBlocks;return{html:yp[e],richText:_p[e]}}function Cp(t,e){return'
'+t+'
'}function Ap(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Mp(t,e){return $h(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Ip(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Tp=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Tr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=Xh({color:e,type:t,renderMode:n,markerId:i});return it(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};et(e)?q(e,function(t){return B(n,t)}):B(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function Dp(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,h=o.getRawValue(a),d=et(h),f=Mp(o,a);if(c>1||d&&!c){var p=function(t,e,n,i,r){var o=e.getData(),a=Z(t,function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName},!1),s=[],l=[],u=[];function c(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(bp("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?q(i,function(t){c(Gf(o,n,t),t)}):q(t,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,o,a,u,f);e=p.inlineValues,n=p.inlineValueTypes,i=p.blocks,r=p.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);r=e=Gf(l,a,u[0]),n=g.type}else r=e=d?h[0]:h;var m=Hr(o),v=m&&o.name||"",y=l.getName(a),_=s?v:y;return bp("section",{header:v,noHeader:s||!m,sortParam:r,blocks:[bp("nameValue",{markerType:"item",markerColor:f,name:_,noName:!bt(_),value:e,valueType:n})].concat(i||[])})}var Ep=Ur();function Op(t,e){return t.getName(e)||t.getId(e)}var Pp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return m(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=qf({count:Lp,reset:Np}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Ep(this).sourceManager=new fp(this)).prepareSource();var i=this.getInitialData(t,n);Vp(i,this),this.dataTask.context.data=i,Ep(this).dataBeforeProcessed=i,Rp(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=ad(this),i=n?ld(t):{},r=this.subType;dd.hasClass(r)&&(r+="Series"),V(t,e.getTheme().get(this.subType)),V(t,this.getDefaultOption()),Rr(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&sd(t,i,n)},e.prototype.mergeOption=function(t,e){t=V(this.option,t,!0),this.fillDataTextStyle(t.data);var n=ad(this);n&&sd(this.option,t,n);var i=Ep(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);Vp(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,Ep(this).dataBeforeProcessed=r,Rp(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!lt(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=Fd.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},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,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[Op(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s0&&this._innerSelect(t,e)}},e.registerClass=function(t){return dd.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.useColorPaletteOnData=!1,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(dd);function Rp(t){var e=t.name;Hr(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return q(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}(t)||e)}function Lp(t){return t.model.getRawData().count()}function Np(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Fp}function Fp(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Vp(t,e){q(y(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,tt(zp,e))})}function zp(t,e){var n=Bp(t);return n&&n.setOutputEnd((e||this).count()),e}function Bp(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}W(Pp,Wf),W(Pp,Fd),oo(Pp,dd);var Hp=Pp,jp=function(){function t(){this.group=new Qi,this.uid=oh("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();io(jp),uo(jp);var Gp=jp;function Up(){var t=Ur();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}var Wp=Ur(),Yp=Up(),qp=function(){function t(){this.group=new Qi,this.uid=oh("viewChart"),this.renderTask=qf({plan:Kp,reset:$p}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){Zp(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){Zp(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){Wp(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Xp(t,e,n){t&&("emphasis"===e?ul:cl)(t,n)}function Zp(t,e,n){var i=Gr(t,e),r=e&&null!=e.highlightKey?function(t){var e=Fs[t];return null==e&&Ns<=32&&(e=Fs[t]=Ns++),e}(e.highlightKey):null;null!=i?q(Pr(i),function(e){Xp(t.getItemGraphicEl(e),n,r)}):t.eachItemGraphicEl(function(t){Xp(t,n,r)})}function Kp(t){return Yp(t.model)}function $p(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Wp(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Qp[l]}io(qp),uo(qp);var Qp={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Jp=qp,tg="\0__throttleOriginMethod",eg="\0__throttleRate",ng="\0__throttleType";function ig(t,e,n){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){s=t},d}function rg(t,e,n,i){var r=t[e];if(r){var o=r[tg]||r;if(r[eg]!==n||r[ng]!==i){if(null==n||!i)return t[e]=o;(r=t[e]=ig(o,n,"debounce"===i))[tg]=o,r[ng]=i,r[eg]=n}return r}}var og=Ur(),ag={itemStyle:co(Jc,!0),lineStyle:co(Kc,!0)},sg={lineStyle:"stroke",itemStyle:"fill"};function lg(t,e){return t.visualStyleMapper||ag[e]||(console.warn("Unkown style type '"+e+"'."),ag.itemStyle)}function ug(t,e){return t.visualDrawType||sg[e]||(console.warn("Unkown style type '"+e+"'."),"fill")}var cg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=lg(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=ug(t,i),l=o[s],u=nt(l)?l:null;if(!o[s]||u||"auto"===o.fill||"auto"===o.stroke){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||"function"==typeof o.fill?c:o.fill,o.stroke="auto"===o.stroke||"function"==typeof o.stroke?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=B({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},hg=new ih,dg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=lg(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){hg.option=n[i];var a=r(hg);B(t.ensureUniqueItemVisual(e,"style"),a),hg.option.decal&&(t.setItemVisual(e,"decal",hg.option.decal),hg.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},fg={performRawSeries:!0,overallReset:function(t){var e=Ct();t.eachSeries(function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||e.set(t.type,n={}),og(t).scope=n}}),t.eachSeries(function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=og(e).scope,a=ug(e,e.visualStyleAccessPath||"itemStyle");r.each(function(t){var e=r.getRawIndex(t);i[e]=t}),n.each(function(t){var s=i[t];if(r.getItemVisual(s,"colorFromPalette")){var l=r.ensureUniqueItemVisual(s,"style"),u=n.getName(t)||t+"",c=n.count();l[a]=e.getColorFromPalette(u,o,c)}})}})}},pg=Math.PI,gg=function(){function t(t,e,n,i){this._stageTaskMap=Ct(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Ct();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;q(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,{});_t(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)},this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}q(t,function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each(function(t){a(i,t)&&(t.dirty(),h=!0)}),h&&c.dirty(),o.updatePayload(c,n);var f=o.getPerformArgs(c,i.block);d.each(function(t){t.perform(f)}),c.perform(f)&&(r=!0)}else u&&u.each(function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)})}}),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=Ct(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||qf({plan:bg,reset:wg,count:Sg}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||qf({reset:mg});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=Ct(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1;function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,qf({reset:vg,onDirty:_g})));n.context={model:t,overallProgress:c},n.agent=o,n.__block=c,r._pipe(t,n)}_t(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(c=!1,q(n.getSeries(),d)),h&&o.dirty()},t.prototype._pipe=function(t,e){var n=this._pipelineMap.get(t.uid);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},t.wrapStageHandler=function(t,e){return nt(t)&&(t={overallReset:t,seriesType:Cg(t)}),t.uid=oh("stageHandler"),e&&(t.visualType=e),t},t}();function mg(t){t.overallReset(t.ecModel,t.api,t.payload)}function vg(t){return t.overallProgress&&yg}function yg(){this.agent.dirty(),this.getDownstream().dirty()}function _g(){this.agent&&this.agent.dirty()}function bg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function wg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Pr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?X(e,function(t,e){return kg(e)}):xg}var xg=kg(0);function kg(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Bg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendSymbol&&n.setVisual("legendSymbol",t.legendSymbol),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),o=t.get("symbolKeepAspect"),a=t.get("symbolRotate"),s=t.get("symbolOffset"),l=nt(i),u=nt(r),c=nt(a),h=nt(s),d=l||u||c||h,f=!l&&i?i:t.defaultSymbol;if(n.setVisual({legendSymbol:t.legendSymbol||f,symbol:f,symbolSize:u?null:r,symbolKeepAspect:o,symbolRotate:c?null:a,symbolOffset:h?null:s}),!e.isSeriesFiltered(t))return{dataEach:d?function(e,n){var o=t.getRawValue(n),d=t.getDataParams(n);l&&e.setItemVisual(n,"symbol",i(o,d)),u&&e.setItemVisual(n,"symbolSize",r(o,d)),c&&e.setItemVisual(n,"symbolRotate",a(o,d)),h&&e.setItemVisual(n,"symbolOffset",s(o,d))}:null}}}};function Hg(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function jg(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function Gg(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}var Ug=2*Math.PI,Wg=ja.CMD,Yg=["top","right","bottom","left"];function qg(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function Xg(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,h=(s/=u)*n+e;if(Math.abs(i-r)%Ug<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var d=i;i=qa(r),r=qa(d)}else i=qa(i),r=qa(r);i>r&&(r+=Ug);var f=Math.atan2(s,a);if(f<0&&(f+=Ug),f>=i&&f<=r||f+Ug>=i&&f+Ug<=r)return l[0]=c,l[1]=h,u-n;var p=n*Math.cos(i)+t,g=n*Math.sin(i)+e,m=n*Math.cos(r)+t,v=n*Math.sin(r)+e,y=(p-a)*(p-a)+(g-s)*(g-s),_=(m-a)*(m-a)+(v-s)*(v-s);return y<_?(l[0]=p,l[1]=g,Math.sqrt(y)):(l[0]=m,l[1]=v,Math.sqrt(_))}function Zg(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,c=n-t,h=i-e,d=Math.sqrt(c*c+h*h),f=(l*(c/=d)+u*(h/=d))/d;s&&(f=Math.min(Math.max(f,0),1));var p=a[0]=t+(f*=d)*c,g=a[1]=e+f*h;return Math.sqrt((p-r)*(p-r)+(g-o)*(g-o))}function Kg(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),c=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var $g=[];function Qg(t,e,n){var i=Kg(e.x,e.y,e.width,e.height,t.x,t.y,$g);return n.set($g[0],$g[1]),i}function Jg(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=e.data,h=t.x,d=t.y,f=0;f0){e=e/180*Math.PI,tm.fromArray(t[0]),em.fromArray(t[1]),nm.fromArray(t[2]),jn.sub(im,tm,em),jn.sub(rm,nm,em);var n=im.len(),i=rm.len();if(!(n<.001||i<.001)){im.scale(1/n),rm.scale(1/i);var r=im.dot(rm);if(Math.cos(e)1&&jn.copy(sm,nm),sm.toArray(t[1])}}}}function um(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,tm.fromArray(t[0]),em.fromArray(t[1]),nm.fromArray(t[2]),jn.sub(im,em,tm),jn.sub(rm,nm,em);var i=im.len(),r=rm.len();if(!(i<.001||r<.001)&&(im.scale(1/i),rm.scale(1/r),im.dot(e)=a)jn.copy(sm,nm);else{sm.scaleAndAdd(rm,o/Math.tan(Math.PI/2-s));var l=nm.x!==em.x?(sm.x-em.x)/(nm.x-em.x):(sm.y-em.y)/(nm.y-em.y);if(isNaN(l))return;l<0?jn.copy(sm,em):l>1&&jn.copy(sm,nm)}sm.toArray(t[1])}}}function cm(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function hm(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=qt(i[0],i[1]),o=qt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=$t([],i[1],i[0],a/r),l=$t([],i[1],i[2],a/o),u=$t([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&o&&x(-h/a,0,a);var m,v,y=t[0],_=t[a-1];return b(),m<0&&k(-m,.8),v<0&&k(v,.8),b(),w(m,v,1),w(v,m,-1),b(),m<0&&S(-m),v<0&&S(v),u}function b(){m=y.rect[e]-i,v=r-_.rect[e]-_.rect[n]}function w(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&k(-r*n,1)}else k(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--)x(-o[l-1]*h,l,a)}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function gm(t,e,n,i){return pm(t,"y","height",e,n,i)}function mm(t){if(t){for(var e=[],n=0;n=0&&n.attr(f.oldLayoutSelect),G(u,"emphasis")>=0&&n.attr(f.oldLayoutEmphasis)),dc(n,s,e,a)}else if(n.attr(s),!jc(n).valueAnimation){var c=gt(n.style.opacity,1);n.style.opacity=0,fc(n,{style:{opacity:c}},e,a)}if(f.oldLayout=s,n.states.select){var h=f.oldLayoutSelect={};xm(h,s,km),xm(h,n.states.select,km)}if(n.states.emphasis){var d=f.oldLayoutEmphasis={};xm(d,s,km),xm(d,n.states.emphasis,km)}Uc(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){var f=wm(i),p={points:i.shape.points};(r=f.oldLayout)?(i.attr({shape:r}),dc(i,{shape:p},e)):(i.setShape(p),i.style.strokePercent=0,fc(i,{style:{strokePercent:1}},e)),f.oldLayout=p}},t}();function Cm(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},function(t){i.push(t.seriesIndex)}),i}q([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(t){e(t[0],function(e,i,r){e=B({},e),r.dispatchAction(B(e,{type:t[1],seriesIndex:n(i,e)}))})})}function Am(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e=t.seriesIndex,i=r.selected,a=0;a0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:ot(t)?[t]:et(t)?t:null):null}var jm=new ja(!0);function Gm(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Um(t){var e=t.fill;return null!=e&&"none"!==e}function Wm(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Ym(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function qm(t,e,n){var i=mo(e.image,e.__image,n);if(yo(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r.setTransform){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var Xm=["shadowBlur","shadowOffsetX","shadowOffsetY"],Zm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Km(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){o||(Jm(t,r),o=!0);var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Oo.opacity:a}(i||e.blend!==n.blend)&&(o||(Jm(t,r),o=!0),t.globalCompositeOperation=e.blend||Oo.blend);for(var s=0;s0&&Hm(n.lineDash,n.lineWidth),x=n.lineDashOffset,k=!!t.setLineDash,S=e.getGlobalScale();if(u.setScale(S[0],S[1],e.segmentIgnoreThreshold),w){var C=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;C&&1!==C&&(w=X(w,function(t){return t/C}),x/=C)}var A=!0;(l||e.__dirty&ls.SHAPE_CHANGED_BIT||w&&!k&&r)&&(u.setDPR(t.dpr),s?u.setContext(null):(u.setContext(t),A=!1),u.reset(),w&&!k&&(u.setLineDash(w),u.setLineDashOffset(x)),e.buildPath(u,e.shape,i),u.toStatic(),e.pathUpdated()),A&&u.rebuildPath(t,s?a:1),w&&k&&(t.setLineDash(w),t.lineDashOffset=x),i||(n.strokeFirst?(r&&Ym(t,n),o&&Wm(t,n)):(o&&Wm(t,n),r&&Ym(t,n))),w&&k&&t.setLineDash([])}(t,e,f,d),d&&(n.batchFill=f.fill||"",n.batchStroke=f.stroke||"")):e instanceof hs?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),$m(t,e,u,l,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||Jn,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var o=n.lineDash&&n.lineWidth>0&&Hm(n.lineDash,n.lineWidth),a=n.lineDashOffset;if(o){var s=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;s&&1!==s&&(o=X(o,function(t){return t/s}),a/=s),t.setLineDash(o),t.lineDashOffset=a,r=!0}}n.strokeFirst?(Gm(n)&&t.strokeText(i,n.x,n.y),Um(n)&&t.fillText(i,n.x,n.y)):(Um(n)&&t.fillText(i,n.x,n.y),Gm(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,f)):e instanceof gs?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(t,e,n,i,r){Km(t,tv(e,r.inHover),n&&tv(n,r.inHover),i,r)}(t,e,u,l,n),function(t,e,n){var i=e.__image=mo(n.image,e.__image,e,e.onload);if(i&&yo(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight)t.drawImage(i,u=n.sx||0,c=n.sy||0,n.sWidth,n.sHeight,r,o,a,s);else if(n.sx&&n.sy){var u,c;t.drawImage(i,u=n.sx,c=n.sy,a-u,s-c,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,f)):e instanceof Zu&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=s&&(u=Dv(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var d=i;(i=new Qi).add(d),d.scaleX=d.scaleY=u.scale,d.x=u.x,d.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new ks({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=iv[s];if(u&&It(iv,s)){a=u.call(this,t,e);var c=t.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(h),"g"===s&&(l=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=vv[s];if(d&&It(vv,s)){var f=d.call(this,t),p=t.getAttribute("id");p&&(this._defs[p]=f)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new hs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});bv(e,n),xv(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(iv={g:function(t,e){var n=new Qi;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new ks;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new $l;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new Du;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new tu;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=wv(i));var r=new ku({shape:{points:n||[]},silent:!0});return bv(e,r),xv(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=wv(i));var r=new Au({shape:{points:n||[]},silent:!0});return bv(e,r),xv(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new gs;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Qi;return bv(e,a),xv(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Qi;return bv(e,a),xv(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=Xl(t.getAttribute("d")||"");return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),vv={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new Hu(e,n,i,r);return yv(t,o),_v(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new ju(e,n,i);return yv(t,r),_v(t,r),r}};function yv(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function _v(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i,r=n.getAttribute("offset");i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};Tv(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:a})}n=n.nextSibling}}function bv(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),H(e.__inheritedStyle,t.__inheritedStyle))}function wv(t){for(var e=Av(t),n=[],i=0;i0;o-=2){var a=i[o],s=void 0;switch(r=r||[1,0,0,1,0,0],i[o-1]){case"translate":s=Av(a),Ne(r,r,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":s=Av(a),Ve(r,r,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":s=Av(a),Fe(r,r,-parseFloat(s[0])/180*Math.PI);break;case"skew":s=Av(a),console.warn("Skew transform is not supported yet");break;case"matrix":s=Av(a),r[0]=parseFloat(s[0]),r[1]=parseFloat(s[1]),r[2]=parseFloat(s[2]),r[3]=parseFloat(s[3]),r[4]=parseFloat(s[4]),r[5]=parseFloat(s[5])}}e.setLocalTransform(r)}}(t,e),Tv(t,a,s),i||function(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function Bv(t,e){return X(K((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);for(var i=e.features,r=0;r0}),function(t){var n,i=t.properties,r=t.geometry,o=[];"Polygon"===r.type&&o.push({type:"polygon",exterior:(n=r.coordinates)[0],interiors:n.slice(1)}),"MultiPolygon"===r.type&&q(n=r.coordinates,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Lv(i[e||"name"],o,i.cp);return a.properties=i,a})}for(var Hv=[126,25],jv=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Gv=0;Gv0&&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.setOption=function(t,e,n){if(this._disposed);else{var i,r,o;if(ny(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new $d(this._api),s=this._theme,l=this._model=new Ud;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},Uy),Py(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(gy(this),yy.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,xy.call(this,i),ky.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},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||ry&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(w.canvasSupported)return(t=B({},t||{})).pixelRatio=t.pixelRatio||this.getDevicePixelRatio(),t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},e.prototype.getSvgDataURL=function(){if(w.svgSupported){var t=this._zr;return q(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=this._model,n=[],i=this;ty((t=t||{}).excludeComponents,function(t){e.eachComponent({mainType:t},function(t){var e=i._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ty(n,function(t){t.group.ignore=!1}),r}},e.prototype.getConnectedDataURL=function(t){if(this._disposed);else if(w.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if($y[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();q(Ky,function(o,h){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.getRenderedCanvas(F(t)),f=o.getDom().getBoundingClientRect();a=i(f.left,a),s=i(f.top,s),l=r(f.right,l),u=r(f.bottom,u),c.push({dom:d,left:f.left,top:f.top})}});var d=(l*=h)-(a*=h),f=(u*=h)-(s*=h),p=j(),g=ir(p,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:f}),e){var m="";return ty(c,function(t){m+=''+t.dom+""}),g.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new ks({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),ty(c,function(t){var e=new gs({style:{x:t.left*h-a,y:t.top*h-s,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return _y(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return _y(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return q(Yr(this._model,t),function(t,i){i.indexOf("Models")>=0&&q(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}},this)},this),!!n},e.prototype.getVisual=function(t,e){var n=Yr(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?Hg(i,r,e):jg(i,e)},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,e,n=this;ty(By,function(t){var e=function(e){var i,r=n.getModel(),o=e.target;if("globalout"===t?i={}:o&&Mm(o,function(t){var e=Ls(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return i=B({},e.eventData),!0},!0),i){var a=i.componentType,s=i.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=i.seriesIndex);var l=a&&null!=s&&r.getComponent(a,s),u=l&&n["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,n._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:l,view:u},n.trigger(t,i)}};e.zrEventfulCallAtLast=!0,n._zr.on(t,e,n)}),ty(jy,function(t,e){n._messageCenter.on(e,function(t){this.trigger(e,t)},n)}),ty(["selectchanged"],function(t){n._messageCenter.on(t,function(e){this.trigger(t,e)},n)}),t=this,e=this._api,this._messageCenter.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(Am("map","selectchanged",t,i,n),Am("pie","selectchanged",t,i,n)):"select"===n.fromAction?(Am("map","selected",t,i,n),Am("pie","selected",t,i,n)):"unselect"===n.fromAction&&(Am("map","unselected",t,i,n),Am("pie","unselected",t,i,n))})},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed||this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed);else{this._disposed=!0,$r(this.getDom(),t_,"");var t=this._api,e=this._model;ty(this._componentsViews,function(n){n.dispose(e,t)}),ty(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete Ky[this.id]}},e.prototype.resize=function(t){if(this._disposed);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__flagInMainProcess=!0,n&&gy(this),yy.update.call(this,{type:"resize",animation:B({duration:0},t&&t.animation)}),this.__flagInMainProcess=!1,xy.call(this,i),ky.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed);else if(ny(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Zy[t]){var n=Zy[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=B({},t);return e.type=jy[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed);else if(ny(e)||(e={silent:!!e}),Hy[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;wy.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&w.browser.weChat&&this._throttledZrFlush(),xy.call(this,n),ky.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed);else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse(function(e){if(e.states&&e.states.emphasis){if(vc(e))return;if(e instanceof ls&&function(t){var e=Vs(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}})}gy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),my(t,!0),my(t,!1),e.plan()},my=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!w.node&&!w.worker&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}})}(t,n)},Dy=function(t,e){ty(Yy,function(n){n(t,e)})},Ry=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},Ly=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse(function(e){vc(e)||t(e)}),e.__needsUpdateStatus=!1)},Ey=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){ul(e,n),Ry(t)},n.prototype.leaveEmphasis=function(e,n){cl(e,n),Ry(t)},n.prototype.enterBlur=function(e){hl(e),Ry(t)},n.prototype.leaveBlur=function(e){dl(e),Ry(t)},n.prototype.enterSelect=function(e){fl(e),Ry(t)},n.prototype.leaveSelect=function(e){pl(e),Ry(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(Yd))(t)},Oy=function(t){function e(t,e){for(var n=0;n=0)){y_.push(n);var o=Dg.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function b_(t,e){Zy[t]=e}function w_(t){P("createCanvas",t)}function x_(t,e,n){!function(t,e,n){if(e.svg){var i=new Vv(t,e.svg);Kv.set(t,i)}else{var r=e.geoJson||e.geoJSON;r&&!e.features?n=e.specialAreas:r=e,i=new Xv(t,r,n),Kv.set(t,i)}}(t,e,n)}function k_(t){return function(t){var e=Kv.get(t);return e&&"geoJSON"===e.type&&e.getMapForUser()}(t)}var S_=function(t){var e=(t=F(t)).type;e||Kf("");var n=e.split(":");2!==n.length&&Kf("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,cp.set(e,t)};v_(sy,cg),v_(ly,dg),v_(ly,fg),v_(sy,Bg),v_(ly,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolOffset",!0),s=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolOffset",a),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s)}:null}}}),v_(7e3,function(t,e){t.eachRawSeries(function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=sv(n,e))});var r=i.getVisual("decal");r&&(i.getVisual("style").decal=sv(r,e))}})}),u_(vf),c_(900,function(t){var e=Ct();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(yf)}),b_("default",function(t,e){H(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Qi,i=new ks({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new Rs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ks({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new Vu({shape:{startAngle:-pg/2,endAngle:-pg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*pg/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*pg/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}),f_({type:Hs,event:Hs,update:Hs},Tt),f_({type:js,event:js,update:js},Tt),f_({type:Gs,event:Gs,update:Gs},Tt),f_({type:Us,event:Us,update:Us},Tt),f_({type:Ws,event:Ws,update:Ws},Tt),l_("light",Og),l_("dark",Vg);var C_={},A_=[],M_={registerPreprocessor:u_,registerProcessor:c_,registerPostInit:h_,registerPostUpdate:d_,registerAction:f_,registerCoordinateSystem:p_,registerLayout:m_,registerVisual:v_,registerTransform:S_,registerLoading:b_,registerMap:x_,PRIORITY:uy,ComponentModel:dd,ComponentView:Gp,SeriesModel:Hp,ChartView:Jp,registerComponentModel:function(t){dd.registerClass(t)},registerComponentView:function(t){Gp.registerClass(t)},registerSeriesModel:function(t){Hp.registerClass(t)},registerChartView:function(t){Jp.registerClass(t)},registerSubTypeDefaulter:function(t,e){dd.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){sr(t,e)}};function I_(t){et(t)?q(t,function(t){I_(t)}):G(A_,t)>=0||(A_.push(t),nt(t)&&(t={install:t}),t.install(M_))}function T_(t){return null==t?0:t.length||1}function D_(t){return t}var E_=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||D_,this._newKeyGetter=i||D_,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._new,e={},n={},i=[],r=[];this._initIndexMap(this._old,e,i,"_oldKeyGetter"),this._initIndexMap(t,n,r,"_newKeyGetter");for(var o=0;o1&&1===c)this._updateManyToOne&&this._updateManyToOne(l,s),n[a]=null;else if(1===u&&c>1)this._updateOneToMany&&this._updateOneToMany(l,s),n[a]=null;else if(1===u&&1===c)this._update&&this._update(l,s),n[a]=null;else if(u>1)for(var h=0;h1)for(var a=0;av[1]&&(v[1]=m)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||j_(this,d))}this._rawCount=this._count=s,this._extent={},L_(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,c=this._rawExtent,h=i.getSource().sourceFormat===vd,d=0;dw[1]&&(w[1]=b)}if(h&&!i.pure&&g){var x=g.name;null==l[m]&&null!=x&&(l[m]=Br(x,null));var k=g.id;null==u[m]&&null!=k&&(u[m]=Br(k,null))}this._dontMakeIdFromName||j_(this,m)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},L_(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=this._count;if((r=e.constructor)===Array){t=new r(n);for(var i=0;i=0&&e=0&&e=0&&ea&&(a=l)}return this._extent[t]=i=[o,a],i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){K_(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=h,a=c,s=0),c===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=h&&C<=d||isNaN(C))&&(s[l++]=g),g++;p=!0}else if(2===o){m=f[c[0]];var y=f[c[1]],_=t[i[1]][0],b=t[i[1]][1];for(v=0;v=h&&C<=d||isNaN(C))&&(w>=_&&w<=b||isNaN(w))&&(s[l++]=g),g++}p=!0}}if(!p)if(1===o)for(v=0;v=h&&C<=d||isNaN(C))&&(s[l++]=x)}else for(v=0;vt[A][1])&&(k=!1)}k&&(s[l++]=this.getRawIndex(v))}return lb[1]&&(b[1]=_)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=U_(this,[t]),o=r._storage,a=[],s=Z_(1/e),l=o[t],u=this.count(),c=r._rawExtent[t],h=new(N_(this))(u),d=0,f=0;fu-f&&(a.length=s=u-f);for(var p=0;pc[1]&&(c[1]=m),h[d++]=v}return r._count=d,r._indices=h,r.getRawIndex=z_,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=U_(this,[]),a=o._storage[t],s=this.count(),l=new(N_(this))(s),u=0,c=Z_(1/e),h=this.getRawIndex(0);l[u++]=h;for(var d=1;dn&&(n=i,r=k)}l[u++]=r,h=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=z_,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new ih(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new E_(t?t.getIndices():[],this.getIndices(),function(e){return B_(t,e)},function(t){return B_(e,t)})},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},K_(t)?B(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(et(r=this.getVisual(e))?r=r.slice():K_(r)&&(r=B({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,K_(e)?B(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(K_(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?B(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=Ls(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Y_,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){q(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},t.prototype.cloneShallow=function(e){if(e||(e=new t($_(this.dimensions,this.getDimensionInfo,this),this.hostModel)),e._storage=this._storage,e._storageArr=this._storageArr,q_(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r65535?tb:nb},F_=function(t,e,n,i){var r=J_[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u=0?this._indices[t]:-1},B_=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=H_(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},G_=function(t){return et(t)||(t=null!=t?[t]:[]),t},U_=function(e,n){var i=e.dimensions,r=new t($_(i,e.getDimensionInfo,e),e.hostModel);q_(r,e);for(var o,a,s=r._storage={},l=e._storage,u=r._storageArr=[],c=0;c=0?(s[h]=(a=void 0,(a=(o=l[h]).constructor)===Array?o.slice():new a(o)),r._rawExtent[h]=W_(),r._extent[h]=null):s[h]=l[h],u.push(s[h]))}return r},W_=function(){return[1/0,-1/0]},Y_=function(t){var e=Ls(t),n=Ls(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},q_=function(t,e){q(ib.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,q(rb,function(n){t[n]=F(e[n])}),t._calculationInfo=B({},e._calculationInfo)},j_=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=H_(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=H_(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();function ab(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function sb(t,e){return function(t,e,n){Cf(e)||(e=Mf(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=Ct(),o=Ct(),a=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return q(e,function(t){var e;at(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))}),r}(e,t,i,n.dimCount),l=0;le[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();uo(gb);var mb=gb;function vb(t){return at(t)&&null!=t.value?t.value:t+""}var yb=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&X(i,vb);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return this.categories[e=this.categories.length]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(this.categories[e=this.categories.length]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ct(this.categories))},t}(),_b=hr;function bb(t){return pr(t)+2}function wb(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function xb(t,e){return t>=e[0]&&t<=e[1]}function kb(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Sb(t,e){return t*(e[1]-e[0])+e[0]}var Cb=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new yb({})),et(i)&&(i=new yb({categories:X(i,function(t){return at(t)?t.value:t})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return m(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return xb(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return kb(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Sb(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(mb);mb.registerClass(Cb);var Ab=Cb,Mb=hr,Ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return m(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xb(t,this._extent)},e.prototype.normalize=function(t){return kb(t,this._extent)},e.prototype.scale=function(t){return Sb(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=bb(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&o.push(t?{value:Mb(s+e,r)}:{value:n[1]}),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&ui&&(o=r.interval=i);var a=r.intervalPrecision=bb(o);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),wb(t,0,e),wb(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[_b(Math.ceil(t[0]/o)*o,a),_b(Math.floor(t[1]/o)*o,a)],t),r}(i,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.niceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;isFinite(e[1]-e[0])||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=Mb(Math.floor(e[0]/i)*i)),t.fixMax||(e[1]=Mb(Math.ceil(e[1]/i)*i))},e.type="interval",e}(mb);mb.registerClass(Ib);var Tb=Ib,Db="__ec_stack_",Eb="undefined"!=typeof Float32Array?Float32Array:Array;function Ob(t){return t.get("stack")||Db+t.seriesIndex}function Pb(t){return t.dim+t.index}function Rb(t,e){var n=[];return e.eachSeriesByType(t,function(t){Bb(t)&&!Hb(t)&&n.push(t)}),n}function Lb(t){var e=function(t){var e={};q(t,function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),r=n.dim+"_"+n.index,o=i.mapDimension(n.dim),a=0,s=i.count();a0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return q(t,function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=e[r.dim+"_"+r.index],s=Math.abs(o[1]-o[0]),l=r.scale.getExtent(),u=Math.abs(l[1]-l[0]);i=a?s/u*a:s}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var h=cr(t.get("barWidth"),i),d=cr(t.get("barMaxWidth"),i),f=cr(t.get("barMinWidth")||1,i),p=t.get("barGap"),g=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:h,barMaxWidth:d,barMinWidth:f,barGap:p,barCategoryGap:g,axisKey:Pb(r),stackId:Ob(t)})}),Nb(n)}function Nb(t){var e={};q(t,function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)});var n={};return q(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=Q(i).length;o=Math.max(35-4*a,15)+"%"}var s=cr(o,r),l=cr(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),q(i,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width)i=t.width,e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,c--;else{var i=h;e&&ei&&(i=n),i!==h&&(t.width=i,u-=i+l*i,c--)}}),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var d,f=0;q(i,function(t,e){t.width||(t.width=h),d=t,f+=t.width*(1+l)}),d&&(f-=d.width*l);var p=-f/2;q(i,function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:p,width:t.width},p+=t.width*(1+l)})}),n}function Fb(t,e,n){if(t&&e){var i=t[Pb(e)];return null!=i&&null!=n?i[Ob(n)]:i}}function Vb(t,e){var n=Rb(t,e),i=Lb(n),r={};q(n,function(t){var e=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=Ob(t),s=i[Pb(o)][a],l=s.offset,u=s.width,c=n.getOtherAxis(o),h=t.get("barMinHeight")||0;r[a]=r[a]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(c.dim),f=e.mapDimension(o.dim),p=db(e,d),g=c.isHorizontal(),m=jb(0,c),v=0,y=e.count();v=0?"p":"n",x=m;p&&(r[a][b]||(r[a][b]={p:m,n:m}),x=r[a][b][w]);var k,S=void 0,C=void 0,A=void 0,M=void 0;g?(S=x,C=(k=n.dataToPoint([_,b]))[1]+l,A=k[0]-m,M=u,Math.abs(A).5||(c=.5),{progress:function(t,e){for(var r,h=t.count,d=new Eb(2*h),f=new Eb(2*h),p=new Eb(h),g=[],m=[],v=0,y=0;null!=(r=t.next());)m[u]=e.get(a,r),m[1-u]=e.get(s,r),g=n.dataToPoint(m,null,g),f[v]=l?i.x+i.width:g[0],d[v++]=g[0],f[v]=l?g[1]:i.y+i.height,d[v++]=g[1],p[y++]=r;e.setLayout({largePoints:d,largeDataIndices:p,largeBackgroundPoints:f,barWidth:c,valueAxisStart:jb(0,o),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Bb(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Hb(t){return t.pipelineContext&&t.pipelineContext.large}function jb(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Gb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return m(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return wh(t.value,mh[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(bh(this._minLevelUnit))]||mh.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=B({},gh);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(et(o)){var c=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[c=Math.min(c,o.length-1)]}}return wh(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(t){var e=this._extent,n=[];if(!this._interval)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r,o=yh,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,c=l[r]();u1&&0===u&&o.unshift({value:o[0].value-d})}}for(u=0;u=i[0]&&v<=i[1]&&h++)}var y=(i[1]-i[0])/e;if(h>1.5*y&&d>y/1.5)break;if(u.push(g),h>y||t===o[f])break}c=[]}}var _=K(X(u,function(t){return K(t,function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd})}),function(t){return t.length>0}),b=[],w=_.length-1;for(f=0;f<_.length;++f)for(var x=_[f],k=0;kn&&(this._approxInterval=n);var r=Ub.length,o=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Yb(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function qb(t){return(t/=dh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Xb(t,e){return(t/=e?6e4:1e3)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Zb(t){return Sr(t,!0)}function Kb(t,e,n){var i=new Date(t);switch(bh(e)){case"year":case"month":i[Oh(n)](0);case"day":i[Ph(n)](1);case"hour":i[Rh(n)](0);case"minute":i[Lh(n)](0);case"second":i[Nh(n)](0),i[Fh(n)](0)}return i.getTime()}mb.registerClass(Gb);var $b=Gb,Qb=mb.prototype,Jb=Tb.prototype,tw=pr,ew=hr,nw=Math.floor,iw=Math.ceil,rw=Math.pow,ow=Math.log,aw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Tb,e._interval=0,e}return m(e,t),e.prototype.getTicks=function(t){var e=this._extent,n=this._originalScale.getExtent();return X(Jb.getTicks.call(this,t),function(t){var i=t.value,r=hr(rw(this.base,i));return r=i===e[0]&&this._fixMin?lw(r,n[0]):r,{value:r=i===e[1]&&this._fixMax?lw(r,n[1]):r}},this)},e.prototype.setExtent=function(t,e){var n=this.base;t=ow(t)/ow(n),e=ow(e)/ow(n),Jb.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=Qb.getExtent.call(this);e[0]=rw(t,e[0]),e[1]=rw(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=lw(e[0],n[0])),this._fixMax&&(e[1]=lw(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=ow(t[0])/ow(e),t[1]=ow(t[1])/ow(e),Qb.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=xr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[hr(iw(e[0]/i)*i),hr(nw(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){Jb.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xb(t=ow(t)/ow(this.base),this._extent)},e.prototype.normalize=function(t){return kb(t=ow(t)/ow(this.base),this._extent)},e.prototype.scale=function(t){return t=Sb(t,this._extent),rw(this.base,t)},e.type="log",e}(mb),sw=aw.prototype;function lw(t,e){return ew(t,tw(e))}sw.getMinorTicks=Jb.getMinorTicks,sw.getLabel=Jb.getLabel,mb.registerClass(aw);var uw=aw,cw=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]s&&(a=NaN,s=NaN);var c=ft(a)||ft(s)||t&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var h=this._determinedMin,d=this._determinedMax;return null!=h&&(a=h,l=!0),null!=d&&(s=d,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[dw[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[hw[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),hw={min:"_determinedMin",max:"_determinedMax"},dw={min:"_dataMin",max:"_dataMax"};function fw(t,e,n){var i=t.rawExtentInfo;return i||(i=new cw(t,e,n),t.rawExtentInfo=i,i)}function pw(t,e){return null==e?null:ft(e)?NaN:t.parse(e)}function gw(t,e){var n=t.type,i=fw(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Rb("bar",a),l=!1;if(q(s,function(t){l=l||t.getBaseAxis()===e.axis}),l){var u=Lb(s),c=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=Fb(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;q(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;q(a,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=c/(1-(s+l)/o)-c;return{min:t-=h*(s/u),max:e+=h*(l/u)}}(r,o,e,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function mw(t,e){var n=gw(t,e),i=n.extent,r=e.get("splitNumber");t instanceof uw&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var a=e.get("interval");null!=a&&t.setInterval&&t.setInterval(a)}function vw(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Ab({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new $b({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(mb.getClass(e)||Tb)}}function yw(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(_w(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function _w(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function bw(t){var e=t.get("interval");return null==e?"auto":e}function ww(t){return"category"===t.type&&0===bw(t.getLabelModel())}function xw(t,e){var n={};return q(t.mapDimensionsAll(e),function(e){n[fb(t,e)]=!0}),Q(n)}var kw=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();function Sw(t){return pb(t.getSource(),t)}var Cw={isDimensionStacked:db,enableDataStack:hb,getStackedDimension:fb};function Aw(t,e){var n=e;e instanceof ih||(n=new ih(e));var i=vw(n);return i.setExtent(t[0],t[1]),mw(i,n),i}function Mw(t){W(t,kw)}function Iw(t,e){return Lc(t,null,null,"normal"!==(e=e||{}).state)}function Tw(t,e,n,i,r,o,a,s){return new Rs({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}var Dw=Ur();function Ew(t,e){var n,i,r=Ow(t,"labels"),o=bw(e);return Pw(r,o)||(nt(o)?n=Nw(t,o):(i="auto"===o?function(t){var e=Dw(t).autoInterval;return null!=e?e:Dw(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=Lw(t,i)),Rw(r,o,{labels:n,labelCategoryInterval:i}))}function Ow(t,e){return Dw(t)[e]||(Dw(t)[e]=[])}function Pw(t,e){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=ww(t),d=a.get("showMinLabel")||h,f=a.get("showMaxLabel")||h;d&&u!==o[0]&&g(o[0]);for(var p=u;p<=o[1];p+=l)g(p);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&p-l!==o[1]&&g(o[1]),s}function Nw(t,e,n){var i=t.scale,r=yw(t),o=[];return q(i.getTicks(),function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})}),o}var Fw=[0,1];function Vw(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var zw=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return gr(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Vw(n=n.slice(),i.count()),ur(t,Fw,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Vw(n=n.slice(),i.count());var r=ur(t,n,Fw,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=X(function(t,e){return"category"===t.type?function(t,e){var n,i,r=Ow(t,"ticks"),o=bw(e),a=Pw(r,o);if(a)return a;if(e.get("show")&&!t.scale.isBlank()||(n=[]),nt(o))n=Nw(t,o,!0);else if("auto"===o){var s=Ew(t,t.getLabelModel());i=s.labelCategoryInterval,n=X(s.labels,function(t){return t.tickValue})}else n=Lw(t,i=o,!0);return Rw(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:X(t.scale.getTicks(),function(t){return t.value})}}(this,e).ticks,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this);return function(t,e,n,i){var r=e.length;if(t.onBand&&!n&&r){var o,a=t.getExtent();if(1===r)e[0].coord=a[0],o=e[1]={coord:a[0]};else{var s=(e[r-1].coord-e[0].coord)/(e[r-1].tickValue-e[0].tickValue);q(e,function(t){t.coord-=s/2});var l=t.scale.getExtent();e.push(o={coord:e[r-1].coord+s*(1+l[1]-e[r-1].tickValue)})}var u=a[0]>a[1];c(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&c(a[0],e[0].coord)&&e.unshift({coord:a[0]}),c(a[1],o.coord)&&(i?o.coord=a[1]:e.pop()),i&&c(o.coord,a[1])&&e.push({coord:a[1]})}function c(t,e){return t=hr(t),e=hr(e),u?t>e:t0&&t<100||(t=5),X(this.scale.getMinorTicks(t),function(t){return X(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},t.prototype.getViewLabels=function(){return(t=this,"category"===t.type?function(t){var e=t.getLabelModel(),n=Ew(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=yw(t);return{labels:X(e,function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}})}}(t)).labels;var t},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=yw(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=o[1];l+=s){var p,g=ni(n({value:l}),e.font,"center","top");p=1.3*g.height,d=Math.max(d,1.3*g.width,7),f=Math.max(f,p,7)}var m=d/c,v=f/h;isNaN(m)&&(m=1/0),isNaN(v)&&(v=1/0);var y=Math.max(0,Math.floor(Math.min(m,v))),_=Dw(t.model),b=t.getExtent(),w=_.lastAutoInterval,x=_.lastTickCount;return null!=w&&null!=x&&Math.abs(w-y)<=1&&Math.abs(x-a)<=1&&w>y&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?y=w:(_.lastTickCount=a,_.lastAutoInterval=y,_.axisExtent0=b[0],_.axisExtent1=b[1]),y}(this)},t}();function Bw(t){var e=dd.extend(t);return dd.registerClass(e),e}function Hw(t){var e=Gp.extend(t);return Gp.registerClass(e),e}function jw(t){var e=Hp.extend(t);return Hp.registerClass(e),e}function Gw(t){var e=Jp.extend(t);return Jp.registerClass(e),e}function Uw(){return!1}function Ww(t,e,n){var i=j(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var Yw=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||ui,"string"==typeof e?r=Ww(e,n,i):at(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(r.onselectstart=Uw,a.webkitUserSelect="none",a.userSelect="none",a.webkitTapHighlightColor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=n,o.config=null,o.dpr=i,o}return m(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Ww("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new $n(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length)(e=new $n(0,0,0,0)).copy(t),o.push(e);else{for(var e,n=!1,i=1/0,r=0,u=0;u=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&c.restore()};if(d)if(0===d.length)f=s.__endIndex;else for(var b=h.dpr,w=0;w0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}else N("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?Zw:0),this._needsManuallyCompositing),u.__builtin__||N("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.__drawIndex=u.incremental?-1:r,e(r),o=u),s.__dirty&xi.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,q(this._layers,function(t){t.setUnpainted()})},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?V(n[t],e,!0):n[t]=e;for(var i=0;i-1e-4}function dx(t,e){e&&fx(t,"transform","matrix("+ux(e[0])+","+ux(e[1])+","+ux(e[2])+","+ux(e[3])+","+cx(e[4])+","+cx(e[5])+")")}function fx(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function px(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof gs)t.style.opacity=i+"";else{if(function(t){var e=t.fill;return null!=e&&e!==nx}(e)){var r=e.fill;fx(t,"fill",r="transparent"===r?nx:r),fx(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*i:i)+"")}else fx(t,"fill",nx);if(function(t){var e=t.stroke;return null!=e&&e!==nx}(e)){var o=e.stroke;fx(t,"stroke",o="transparent"===o?nx:o);var a=e.lineWidth,s=e.strokeNoScale?n.getLineScale():1;fx(t,"stroke-width",(s?a/s:0)+""),fx(t,"paint-order",e.strokeFirst?"stroke":"fill"),fx(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*i:i)+"");var l=e.lineDash&&a>0&&Hm(e.lineDash,a);if(l){var u=e.lineDashOffset;s&&1!==s&&(l=X(l,function(t){return t/s}),u&&(u=ix(u/=s))),fx(t,"stroke-dasharray",l.join(",")),fx(t,"stroke-dashoffset",(u||0)+"")}else fx(t,"stroke-dasharray","");e.lineCap&&fx(t,"stroke-linecap",e.lineCap),e.lineJoin&&fx(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&fx(t,"stroke-miterlimit",e.miterLimit+"")}else fx(t,"stroke",nx)}}var gx=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=0===this._d.length,u=a-o,c=!s,h=Math.abs(u),d=hx(h-sx)||(c?u>=sx:-u>=sx),f=u>0?u%sx:u%sx+sx,p=!1;p=!!d||!hx(h)&&f>=ax==!!c;var g=cx(t+n*ox(o)),m=cx(e+i*rx(o));d&&(u=c?sx-1e-4:1e-4-sx,p=!0,l&&this._d.push("M",g,m));var v=cx(t+n*ox(o+u)),y=cx(e+i*rx(o+u));if(isNaN(g)||isNaN(m)||isNaN(n)||isNaN(i)||isNaN(r)||isNaN(lx)||isNaN(v)||isNaN(y))return"";this._d.push("A",cx(n),cx(i),ix(r*lx),+p,+c,v,y)},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){this._d.push(t);for(var u=1;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doUpdate=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},t.prototype.add=function(t){return null},t.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},t.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},t.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return q(this._tagNames,function(n){for(var i=t.getElementsByTagName(n),r=0;r-1){var s=fn(a)[3],l=mn(a);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s+"")}else o.setAttribute("stop-color",n[i].color);e.appendChild(o)}t.__dom=e},e.prototype.markUsed=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom),(n=e.style.stroke)&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom)}},e}(bx);function Ax(t){return t&&(!!t.image||!!t.svgElement)}var Mx=new Tm,Ix=function(t){function e(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return m(e,t),e.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;q(["fill","stroke"],function(i){var r=e.style[i];if(Ax(r)){var o=n.getDefs(!0),a=Mx.get(r);a?o.contains(a)||n.addDom(a):a=n.add(r),n.markUsed(e);var s=a.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}})}},e.prototype.add=function(t){if(Ax(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},e.prototype.update=function(t){if(Ax(t)){var e=this;this.doUpdate(t,function(){var n=Mx.get(t);e.updateDom(t,n)})}},e.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,r=e.getElementsByTagName("image");if(r.length){if(!t.image)return void e.removeChild(r[0]);i=r[0]}else t.image&&(i=this.createElement("image"));if(i){var o=void 0;if("string"==typeof t.image?o=t.image:t.image instanceof HTMLImageElement?o=t.image.src:t.image instanceof HTMLCanvasElement&&(o=t.image.toDataURL()),o){i.setAttribute("href",o),i.setAttribute("x","0"),i.setAttribute("y","0");var a=mo(o,i,{dirty:function(){}},function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")});a&&a.width&&a.height&&(e.setAttribute("width",a.width+""),e.setAttribute("height",a.height+"")),e.appendChild(i)}}}var s=(t.rotation||0)/Math.PI*180;e.setAttribute("patternTransform","translate("+(t.x||0)+", "+(t.y||0)+") rotate("+s+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")"),Mx.set(t,e)},e.prototype.markUsed=function(e){e.style&&(Ax(e.style.fill)&&t.prototype.markDomUsed.call(this,Mx.get(e.style.fill)),Ax(e.style.stroke)&&t.prototype.markDomUsed.call(this,Mx.get(e.style.stroke)))},e}(bx);function Tx(t){var e=t.__clipPaths;return e&&e.length>0}var Dx=function(t){function e(e,n){var i=t.call(this,e,n,"clipPath","__clippath_in_use__")||this;return i._refGroups={},i._keyDuplicateCount={},i}return m(e,t),e.prototype.markAllUnused=function(){for(var e in t.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[e]);this._keyDuplicateCount={}},e.prototype._getClipPathGroup=function(t,e){if(Tx(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,r=function(t){var e=[];if(t)for(var n=0;n0){var n=this.getDefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getAttribute("id"),n.contains(r=i._dom)||n.appendChild(r)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(r),i._dom=r),this.getSvgProxy(i).brush(i);var a=this.getSvgElement(i);r.innerHTML="",r.appendChild(a),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(r,e.slice(1))}else t&&t.setAttribute("clip-path","none")},e.prototype.markUsed=function(e){var n=this;e.__clipPaths&&q(e.__clipPaths,function(e){e._dom&&t.prototype.markDomUsed.call(n,e._dom)})},e.prototype.removeUnused=function(){t.prototype.removeUnused.call(this);var e={};for(var n in this._refGroups){var i=this._refGroups[n];this.isDomUnused(i)?i.parentNode&&i.parentNode.removeChild(i):e[n]=i}this._refGroups=e},e}(bx),Ex=function(t){function e(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowDom")||this;return i._shadowDomMap={},i._shadowDomPool=[],i}return m(e,t),e.prototype._getFromPool=function(){var t=this._shadowDomPool.pop();if(!t){(t=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++);var e=this.createElement("feDropShadow");t.appendChild(e),this.addDom(t)}return t},e.prototype.update=function(t,e){if((r=e.style)&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)){var n=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),i=e._shadowDom=this._shadowDomMap[n];i||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)}else this.remove(t,e);var r},e.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},e.prototype.updateDom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getGlobalScale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowOffsetY||0,u=r.shadowBlur,c=r.shadowColor;i.setAttribute("dx",(r.shadowOffsetX||0)/a+""),i.setAttribute("dy",l/s+""),i.setAttribute("flood-color",c),i.setAttribute("stdDeviation",u/2/a+" "+u/2/s),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),e._shadowDom=n;var h=n.getAttribute("id");t.style.filter="url(#"+h+")"}},e.prototype.removeUnused=function(){if(this.getDefs(!1)){var t=this._shadowDomPool;for(var e in this._shadowDomMap)t.push(this._shadowDomMap[e]);this._shadowDomMap={}}},e}(bx);function Ox(t){return parseInt(t,10)}function Px(t){return t instanceof ls?mx:t instanceof gs?vx:t instanceof hs?_x:mx}function Rx(t,e){return e&&t&&e.parentNode!==t}function Lx(t,e,n){if(Rx(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function Nx(t,e){if(Rx(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function Fx(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function Vx(t){return t.__svgEl}function zx(t){return function(){N('In SVG mode painter not support method "'+t+'"')}}var Bx=function(){function t(t,e,n,i){this.type="svg",this.refreshHover=zx("refreshHover"),this.pathToImage=zx("pathToImage"),this.configLayer=zx("configLayer"),this.root=t,this.storage=e,this._opts=n=B({},n||{});var r=Qw("svg");r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=Qw("g");r.appendChild(o);var a=Qw("g");r.appendChild(a),this._gradientManager=new Cx(i,a),this._patternManager=new Ix(i,a),this._clipPathManager=new Dx(i,a),this._shadowManager=new Ex(i,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=r,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,t.appendChild(s),s.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]}return t.prototype.getType=function(){return"svg"},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.getSvgRoot=function(){return this._svgRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},t.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=Qw("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},t.prototype.createSVGElement=function(t){return Qw(t)},t.prototype.paintOne=function(t){var e=Px(t);return e&&e.brush(t),Vx(t)},t.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,r=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),r.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u=i&&l+1>=r){for(var u=[],c=0;c=i&&h+1>=r)return ex(l.components);s[a]=l}else s[a]=void 0}var p;o++}for(;o<=a;){var d=h();if(d)return d}}(a,l,undefined);for(u=0;u\n\r<"))},t}(),Hx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return m(e,t),e.prototype.getInitialData=function(t){return pb(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new Qi,n=Vm("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r="none"===i?"circle":i,o=.8*t.itemHeight,a=Vm(r,(t.itemWidth-o)/2,(t.itemHeight-o)/2,o,o,t.itemStyle.fill,t.symbolKeepAspect);return e.add(a),a.setStyle(t.itemStyle),r.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},e}(Hp);function jx(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=Gf(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a0?n=i[0]:i[1]<0&&(n=i[1]),n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),c="x"===s||"radius"===s?1:0,h=X(t.dimensions,function(t){return e.mapDimension(t)}),d=!1,f=e.getCalculationInfo("stackResultDimension");return db(e,h[0])&&(d=!0,h[0]=f),db(e,h[1])&&(d=!0,h[1]=f),{dataDimsForPoint:h,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function $x(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var Qx="undefined"!=typeof Float32Array,Jx=Qx?Float32Array:Array;function tk(t){return et(t)?Qx?new Float32Array(t):t:new Jx(t)}var ek=Math.min,nk=Math.max;function ik(t,e){return isNaN(t)||isNaN(e)}function rk(t,e,n,i,r,o,a,s,l){for(var u,c,h,d,f,p,g=n,m=0;m=r||g<0)break;if(ik(v,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,y),h=v,d=y;else{var _=v-u,b=y-c;if(_*_+b*b<.5){g+=o;continue}if(a>0){var w=g+o,x=e[2*w],k=e[2*w+1],S=m+1;if(l)for(;ik(x,k)&&S=i||ik(x,k))f=v,p=y;else{A=x-u,M=k-c;var D=v-u,E=x-v,O=y-c,P=k-y,R=void 0,L=void 0;"x"===s?(R=Math.abs(D),L=Math.abs(E),f=v-R*a,p=y,I=v+R*a,T=y):"y"===s?(R=Math.abs(O),L=Math.abs(P),f=v,p=y-R*a,I=v,T=y+R*a):(R=Math.sqrt(D*D+O*O),f=v-A*a*(1-(C=(L=Math.sqrt(E*E+P*P))/(L+R))),p=y-M*a*(1-C),T=y+M*a*C,I=ek(I=v+A*a*C,nk(x,v)),T=ek(T,nk(k,y)),I=nk(I,ek(x,v)),p=y-(M=(T=nk(T,ek(k,y)))-y)*R/L,f=ek(f=v-(A=I-v)*R/L,nk(u,v)),p=ek(p,nk(c,y)),I=v+(A=v-(f=nk(f,ek(u,v))))*L/R,T=y+(M=y-(p=nk(p,ek(c,y))))*L/R)}t.bezierCurveTo(h,d,f,p,v,y),h=I,d=T}else t.lineTo(v,y)}u=v,c=y,g+=o}return m}var ok=function(){this.smooth=0,this.smoothConstraint=!0},ak=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ok},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&ik(n[2*r-2],n[2*r-1]);r--);for(;i=0){var m=a?(c-i)*g+i:(u-n)*g+n;return a?[t,m]:[m,t]}n=u,i=c;break;case o.C:u=r[l++],c=r[l++],h=r[l++],d=r[l++],f=r[l++],p=r[l++];var v=a?$o(n,u,h,f,t,s):$o(i,c,d,p,t,s);if(v>0)for(var y=0;y=0)return m=a?Zo(i,c,d,p,_):Zo(n,u,h,f,_),a?[t,m]:[m,t]}n=f,i=p}}},e}(ls),sk=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e}(ok),lk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return m(e,t),e.prototype.getDefaultShape=function(){return new sk},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&ik(n[2*o-2],n[2*o-1]);o--);for(;ri)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return q(o.getViewLabels(),function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}(t,a,r),k=this._data;k&&k.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),k.setItemGraphicEl(e,null))}),w||d.remove(),o.add(g);var S,C=!c&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(null!=(S=r.getArea()).width?(S.x-=.1,S.y-=.1,S.width+=.2,S.height+=.2):S.r0&&(S.r0-=.5,S.r+=.5)),this._clipShapeForSymbol=S;var A=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,o=n.length-1;o>=0;o--){var a=t.getDimensionInfo(t.dimensions[n[o].dimension]);if("x"===(i=a&&a.coordDim)||"y"===i){r=n[o];break}}if(r){var s=e.getAxis(i),l=X(r.stops,function(t){return{offset:0,coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),u=l.length,c=r.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),c.reverse());var h=l[0].coord-10,d=l[u-1].coord+10,f=d-h;if(f<.001)return"transparent";q(l,function(t){t.offset=(t.coord-h)/f}),l.push({offset:u?l[u-1].offset:.5,color:c[1]||"transparent"}),l.unshift({offset:u?l[0].offset:.5,color:c[0]||"transparent"});var p=new Hu(0,0,0,0,l,!0);return p[i]=h,p[i+"2"]=d,p}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")];f&&h.type===r.type&&C===this._step?(v&&!p?p=this._newPolygon(u,b):p&&!v&&(g.remove(p),p=this._polygon=null),c||this._initOrUpdateEndLabel(t,r,$h(A)),g.setClipPath(_k(this,r,!1,t)),w&&d.updateData(a,{isIgnore:x,clipShape:S,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),fk(this._stackedOnPoints,b)&&fk(this._points,u)||(m?this._doUpdateAnimation(a,b,r,n,C,y):(C&&(u=vk(u,r,C),b&&(b=vk(b,r,C))),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:b})))):(w&&d.updateData(a,{isIgnore:x,clipShape:S,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),m&&this._initSymbolLabelAnimation(a,r,S),C&&(u=vk(u,r,C),b&&(b=vk(b,r,C))),f=this._newPolyline(u),v&&(p=this._newPolygon(u,b)),c||this._initOrUpdateEndLabel(t,r,$h(A)),g.setClipPath(_k(this,r,!0,t)));var M=t.get(["emphasis","focus"]),I=t.get(["emphasis","blurScope"]);f.useStyle(H(s.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),Al(f,t,"lineStyle"),f.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1),Ls(f).seriesIndex=t.seriesIndex,xl(f,M,I);var T=mk(t.get("smooth")),D=t.get("smoothMonotone"),E=t.get("connectNulls");if(f.setShape({smooth:T,smoothMonotone:D,connectNulls:E}),p){var O=a.getCalculationInfo("stackedOnSeries"),P=0;p.useStyle(H(l.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),O&&(P=mk(O.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:P,smoothMonotone:D,connectNulls:E}),Al(p,t,"areaStyle"),Ls(p).seriesIndex=t.seriesIndex,xl(p,M,I)}var R=function(t){i._changePolyState(t)};a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=R)}),this._polyline.onHoverStateChange=R,this._data=a,this._coordSys=r,this._stackedOnPoints=b,this._points=u,this._step=C,this._valueOrigin=y},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Gr(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;(s=new Wx(r,o)).x=l,s.y=u,s.setZ(t.get("zlevel"),t.get("z"));var c=s.getSymbolPath().getTextContent();c&&(c.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Jp.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Gr(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Jp.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;rl(this._polyline,t),e&&rl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new ak({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new lk({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,c="function"==typeof u?u(null):u;t.eachItemGraphicEl(function(t,o){var s=t;if(s){var h=void 0,d=void 0,f=void 0;if(r){var p=n,g=e.pointToCoord([t.x,t.y]);i?(h=p.startAngle,d=p.endAngle,f=-g[1]/180*Math.PI):(h=p.r0,d=p.r,f=g[0])}else i?(h=n.x,d=n.x+n.width,f=t.x):(h=n.y+n.height,d=n.y,f=t.y);var m=d===h?0:(f-h)/(d-h);a&&(m=1-m);var v="function"==typeof u?u(o):l*m+c,y=s.getSymbolPath(),_=y.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:v}),_&&_.animateFrom({style:{opacity:0}},{duration:300,delay:v}),y.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(i.get("show")){var r=t.getData(),o=this._polyline,a=this._endLabel;a||((a=this._endLabel=new Rs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var s=function(t){for(var e,n=t.length/2;n>0&&(e=t[2*n-1],isNaN(t[2*n-2])||isNaN(e));n--);return n-1}(r.getLayout("points"));s>=0&&(Pc(o,Rc(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:s,defaultText:function(t,e,n){return null!=n?Gx(r,n):jx(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),d=o.get("precision"),f=o.get("distance")||0,p=a.getBaseAxis(),g=p.isHorizontal(),m=p.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?f:0)*(m?-1:1),b=(g?0:-f)*(m?-1:1),w=g?"x":"y",x=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,w),k=x.range,S=k[1]-k[0],C=void 0;if(S>=1){if(S>1&&!h){var A=yk(u,k[0]);s.attr({x:A[0]+_,y:A[1]+b}),r&&(C=c.getRawValue(k[0]))}else{(A=l.getPointOn(y,w))&&s.attr({x:A[0]+_,y:A[1]+b});var M=c.getRawValue(k[0]),I=c.getRawValue(k[1]);r&&(C=Jr(n,d,M,I,x.t))}i.lastFrameIndex=k[0]}else{var T=1===t||i.lastFrameIndex>0?k[0]:0;A=yk(u,T),r&&(C=c.getRawValue(T)),s.attr({x:A[0]+_,y:A[1]+b})}r&&jc(s).setLabelText(C)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}(t,e),u=[],c=[],h=[],d=[],f=[],p=[],g=[],m=Kx(r,e,a),v=(Kx(o,t,s),t.getLayout("points")||[]),y=e.getLayout("points")||[],_=0;_3e3||s&&gk(h,f)>3e3)return a.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));a.shape.__points=u.current,a.shape.points=c;var p={shape:{points:d}};u.current!==c&&(p.shape.__points=u.next),a.stopAnimation(),dc(a,p,l),s&&(s.setShape({points:c,stackedOnPoints:h}),s.stopAnimation(),dc(s,{shape:{stackedOnPoints:f}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],m=u.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(c||1),d=Math.round(a/h);if(d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var f=void 0;"string"==typeof r?f=xk[r]:"function"==typeof r&&(f=r),f&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,f,kk))}}}}}var Ck=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.getInitialData=function(t,e){return pb(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Hp);Hp.registerClass(Ck);var Ak=Ck,Mk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.getInitialData=function(){return pb(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ah(Ak.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Ak),Ik=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Tk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return m(e,t),e.prototype.getDefaultShape=function(){return new Ik},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(h*r+n,d*r+i),t.arc(h*s+n,d*s+i,a,-Math.PI+l,l,!c)),t.arc(n,i,o,l,u,!c),t.moveTo(f*o+n,p*o+i),t.arc(f*s+n,p*s+i,a,u-2*Math.PI,u-Math.PI,!c),0!==r&&(t.arc(n,i,r,u,l,c),t.moveTo(h*r+n,p*r+i)),t.closePath()},e}(ls),Dk=[0,0],Ek=Math.max,Ok=Math.min,Pk=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return m(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,h=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);h&&this._enableRealtimeSort(h,a,n);var d=t.get("clip",!0)||h,f=function(t,e){var n=t.getArea&&t.getArea();if(dk(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var p=t.get("roundCap",!0),g=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],_=this._backgroundEls,b=i&&i.isInitSort,w=i&&"changeAxisOrder"===i.type;function x(t){var e=Fk[l.type](a,t),n=function(t,e,n){return new("polar"===t.type?gu:ks)({shape:Gk(e,n,t),silent:!0,z2:0})}(l,r,e);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",v),y[t]=n,n}a.diff(s).add(function(e){var n=a.getItemModel(e),i=Fk[l.type](a,e,n);if(g&&x(e),a.hasValue(e)){var s=!1;d&&(s=Rk[l.type](f,i));var m=Lk[l.type](t,a,e,i,r,c,u.model,!1,p);Vk(m,a,e,n,i,t,r,"polar"===l.type),b?m.attr({shape:i}):h?Nk(h,c,m,i,e,r,!1,!1):fc(m,{shape:i},t,e),a.setItemGraphicEl(e,m),o.add(m),m.ignore=s}}).update(function(e,n){var i=a.getItemModel(e),k=Fk[l.type](a,e,i);if(g){var S=void 0;0===_.length?S=x(n):((S=_[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type&&S.setShape("r",v),y[e]=S);var C=Fk[l.type](a,e);dc(S,{shape:Gk(r,C,l)},c,e)}var A=s.getItemGraphicEl(n);if(!a.hasValue(e))return o.remove(A),void(A=null);var M=!1;d&&(M=Rk[l.type](f,k))&&o.remove(A),A||(A=Lk[l.type](t,a,e,k,r,c,u.model,!!A,p)),w||Vk(A,a,e,i,k,t,r,"polar"===l.type),b?A.attr({shape:k}):h?Nk(h,c,A,k,e,r,!0,w):dc(A,{shape:k},t,e,null),a.setItemGraphicEl(e,A),A.ignore=M,o.add(A)}).remove(function(e){var n=s.getItemGraphicEl(e);n&&mc(n,t,e)}).execute();var k=this._backgroundGroup||(this._backgroundGroup=new Qi);k.removeAll();for(var S=0;So)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r,animation:{duration:0}})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(e){mc(e,t,Ls(e).dataIndex)})):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Jp),Rk={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=Ek(e.x,t.x),s=Ok(e.x+e.width,r),l=Ek(e.y,t.y),u=Ok(e.y+e.height,o),c=sr?s:a,e.y=h&&l>o?u:l,e.width=c?0:s-a,e.height=h?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=Ok(e.r,t.r),o=Ek(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),a}},Lk={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new ks({shape:B({},i),z2:1});return u.__dataIndex=n,u.name="item",o&&(u.shape[r?"height":"width"]=0),u},polar:function(t,e,n,i,r,o,a,s,l){var u=new(!r&&l?Tk:gu)({shape:H({clockwise:i.startAngle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function Vk(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");if(u&&t.attr("cursor",u),!s){var c=a?r.height>0?"bottom":"top":r.width>0?"left":"right",h=Rc(i);Pc(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:jx(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c}),Gc(t.getTextContent(),h,o.getRawValue(n),function(t){return Gx(e,t)})}var d=i.getModel(["emphasis"]);xl(t,d.get("focus"),d.get("blurScope")),Al(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",q(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var zk=function(){},Bk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return m(e,t),e.prototype.getDefaultShape=function(){return new zk},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o=h&&m<=d&&(l<=v?c>=l&&c<=v:c>=v&&c<=l))return a[f]}return-1}(this,t.offsetX,t.offsetY);Ls(this).dataIndex=e>=0?e:null},30,!1);function Gk(t,e,n){if(dk(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:e.r0,r:t?r.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}}var Uk=Pk,Wk=2*Math.PI,Yk=Math.PI/180;function qk(t,e,n){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,n),o=t.get("center"),a=t.get("radius");et(a)||(a=[0,a]),et(o)||(o=[o,o]);var s=cr(r.width,n.getWidth()),l=cr(r.height,n.getHeight()),u=Math.min(s,l),c=cr(o[0],s)+r.x,h=cr(o[1],l)+r.y,d=cr(a[0],u/2),f=cr(a[1],u/2),p=-t.get("startAngle")*Yk,g=t.get("minAngle")*Yk,m=0;e.each(i,function(t){!isNaN(t)&&m++});var v=e.getSum(i),y=Math.PI/(v||m)*2,_=t.get("clockwise"),b=t.get("roseType"),w=t.get("stillShowZeroSum"),x=e.getDataExtent(i);x[0]=0;var k=Wk,S=0,C=p,A=_?1:-1;if(e.setLayout({viewRect:r,r:f}),e.each(i,function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:c,cy:h,r0:d,r:b?NaN:f});else{(i="area"!==b?0===v&&w?y:t*y:Wk/m)n?a:o,c=Math.abs(l.label.y-n);if(c>u.maxY){var h=l.label.x-e-l.len2*r,f=i+l.len,p=Math.abs(h)0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u0?"right":"left":D>0?"left":"right"}var z=m.get("rotate");if(O="number"==typeof z?z*(Math.PI/180):z?D<0?-T+Math.PI:-T:0,o=!!O,d.x=C,d.y=A,d.rotation=O,d.setStyle({verticalAlign:"middle"}),P){d.setStyle({align:I});var B=d.states.select;B&&(B.x+=d.x,B.y+=d.y)}else{var H=d.getBoundingRect().clone();H.applyTransform(d.getComputedTransform());var j=(d.style.margin||0)+2.1;H.y-=j/2,H.height+=j,r.push({label:d,labelLine:p,position:v,len:k,len2:S,minTurnAngle:x.get("minTurnAngle"),maxSurfaceAngle:x.get("maxSurfaceAngle"),surfaceNormal:new jn(D,E),linePoints:M,textAlign:I,labelDistance:y,labelAlignTo:_,edgeDistance:b,bleedMargin:w,rect:H})}s.setTextConfig({inside:P})}}),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d=n.r0}},e.type="pie",e}(Jp);function eS(t,e,n){e=et(e)&&{coordDimensions:e}||B({},e);var i=t.getSource(),r=sb(i,e),o=new ob(r,t);return o.initData(i,n),o}var nS=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),iS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.useColorPaletteOnData=!0,e}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new nS(J(this.getData,this),J(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return eS(this,{coordDimensions:["value"],encodeDefaulter:tt(Md,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),function(t){r.push(t)}),i.percent=mr(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){Rr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Hp),rS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){return pb(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},e}(Hp),oS=function(){},aS=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new oS},e.prototype.buildPath=function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,o=r.shape,a=t.getContext?t.getContext():t;if(a&&i[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=0;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+o&&e<=c+a)return s}return-1},e}(ls),sS=function(){function t(){this.group=new Qi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t,e){this.group.removeAll();var n=new aS({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},t.prototype.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("points");this.group.eachChild(function(t){null!=t.startIndex&&(e=new Float32Array(e.buffer,4*t.startIndex*2,2*(t.endIndex-t.startIndex))),t.setShape("points",e)})}},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Zu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new aS,this._incremental.addDisplayable(i,!0)):((i=new aS({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},t.prototype._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=Vm(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;if(l&&t.setColor(l),!n){var u=Ls(t);u.seriesIndex=r.seriesIndex,t.on("mousemove",function(e){u.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(u.dataIndex=n+(t.startIndex||0))})}},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),lS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=wk("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new sS:new Zx,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Jp),uS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(dd),cS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Xr).models[0]},e.type="cartesian2dAxis",e}(dd);W(cS,kw);var hS={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},dS=V({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},hS),fS=V({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},hS),pS={category:dS,value:fS,time:V({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},fS),log:H({scale:!0,logBase:10},fS)},gS={value:1,category:1,time:1,log:1};function mS(t,e,n,i){q(gS,function(r,o){var a=V(V({},pS[o],!0),i,!0),s=function(t){function n(){for(var n=[],i=0;ie[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(zw);function kS(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[d[l]]:h[0],"x"===u?p[d[l]]:h[3]],o.rotation=Math.PI/2*("x"===u?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?p[d[s]]-p[d.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),pt(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function SS(t){return"cartesian2d"===t.get("coordinateSystem")}function CS(t){var e={xAxisModel:null,yAxisModel:null};return q(e,function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Xr).models[0];e[i]=o}),e}function AS(t,e){return t.getCoordSysModel()===e}function MS(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)IS(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&IS(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(t){return t.dim+"_"+t.index}}function IS(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}(t)}var TS=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_S,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),q(n.x,function(t){mw(t.scale,t.model)}),q(n.y,function(t){mw(t.scale,t.model)});var i={};q(n.x,function(t){MS(n,"y",t,i)}),q(n.y,function(t){MS(n,"x",t,i)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=rd(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){q(a,function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)})}s(),r&&(q(a,function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.scale;if(t.model.get(["axisLabel","show"])&&!e.isBlank()){var n,i,r=e.getExtent();i=e instanceof Ab?e.count():(n=e.getTicks()).length;var o,a,s,l,u,c,h,d=t.getLabelModel(),f=yw(t),p=1;i>40&&(p=Math.ceil(i/40));for(var g=0;g0?"top":"bottom",i="center"):_r(o-DS)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),OS={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(Qt(s,s,a),Qt(l,l,a));var u=B({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Du({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});c.anid="line",n.add(c);var h=e.get(["axisLine","symbol"]),d=e.get(["axisLine","symbolSize"]),f=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof f&&(f=[f,f]),null!=h){"string"==typeof h&&(h=[h,h]),"string"!=typeof d&&"number"!=typeof d||(d=[d,d]);var p=d[0],g=d[1];q([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(e,i){if("none"!==h[i]&&null!=h[i]){var r=Vm(h[i],-p/2,-g/2,p,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}})}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");if("auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick")),a&&!r.scale.isBlank()){for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=NS(r.getTicksCoords(),e.transform,l,H(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;ch[1]?-1:1,f=["start"===s?h[0]-d*c:"end"===s?h[1]+d*c:(h[0]+h[1])/2,LS(s)?t.labelOffset+l*c:0],p=e.get("nameRotate");null!=p&&(p=p*DS/180),LS(s)?o=ES.innerTextLayout(t.rotation,null!=p?p:t.rotation,l):(o=function(t,e,n,i){var r,o,a=yr(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return _r(a-DS/2)?(o=l?"bottom":"top",r="center"):_r(a-1.5*DS)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*DS&&a>DS/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,p||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=e.get("nameTruncate",!0)||{},v=m.ellipsis,y=pt(t.nameTruncateMaxWidth,m.maxWidth,a),_=new Rs({x:f[0],y:f[1],rotation:o.rotation,silent:ES.isLabelSilent(e),style:Lc(u,{text:r,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Tc({el:_,componentModel:e,itemName:r}),_.__fullText=r,_.anid="name",e.get("triggerEvent")){var b=ES.makeAxisEventDataBase(e);b.targetType="axisName",b.name=r,Ls(_).eventData=b}i.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function PS(t){t&&(t.ignore=!0)}function RS(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Pe([]);return Fe(r,r,-t.rotation),n.applyTransform(Le([],r,t.getLocalTransform())),i.applyTransform(Le([],r,e.getLocalTransform())),n.intersect(i)}}function LS(t){return"middle"===t||"center"===t}function NS(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function zS(t){var e=BS(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=HS(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!h.min?h.min=0:null!=h.min&&h.min<0&&!h.max&&(h.max=0);var d=a;null!=h.color&&(d=H({color:h.color},a));var f=V(F(h),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:h.text,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:c},!1);if(s||(f.name=""),"string"==typeof l){var p=f.name;f.name=l.replace("{value}",null!=p?p:"")}else"function"==typeof l&&(f.name=l(f.name,f));var g=new ih(f,null,this.ecModel);return W(g,kw.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:V({lineStyle:{color:"#bbb"}},uC.axisLine),axisLabel:cC(uC.axisLabel,!1),axisTick:cC(uC.axisTick,!1),splitLine:cC(uC.splitLine,!0),splitArea:cC(uC.splitArea,!0),indicator:[]},e}(dd),dC=["axisLine","axisTickLabel","axisName"],fC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;q(X(e.getIndicatorAxes(),function(t){return new FS(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){q(dC,t.add,t),this.group.add(t.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),c=a.get("color"),h=s.get("color"),d=et(c)?c:[c],f=et(h)?h:[h],p=[],g=[];if("circle"===i)for(var m=n[0].getTicksCoords(),v=e.cx,y=e.cy,_=0;_n[0]&&isFinite(h)&&isFinite(n[0]))}else a.getTicks().length-1>r&&(u=o(u)),h=hr((c=Math.ceil(n[1]/u)*u)-u*r),a.setExtent(h,c),a.setInterval(u)})},t.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,n){var i=[];return e.eachComponent("radar",function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o}),e.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},t.dimensions=[],t}();function mC(t){t.registerCoordinateSystem("radar",gC),t.registerComponentModel(hC),t.registerComponentView(fC),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(t){e.setItemVisual(t,"legendSymbol","roundRect")}),e.setVisual("legendSymbol","roundRect")}})}var vC="\0_ec_interaction_mutex";function yC(t,e){return!!_C(t)[e]}function _C(t){return t[vC]||(t[vC]={})}function bC(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(ye(i.event),wC(t,e,n,i,r))}function wC(t,e,n,i,r){r.isAvailableBehavior=J(xC,null,n,i),t.trigger(e,r)}function xC(t,e,n){var i=n[t];return!t||i&&(!it(i)||e.event[i+"Key"])}f_({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});var kC=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=J(n._mousedownHandler,n),r=J(n._mousemoveHandler,n),o=J(n._mouseupHandler,n),a=J(n._mousewheelHandler,n),s=J(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=H(F(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return m(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(_e(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&xC("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!yC(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ye(t.event),wC(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){_e(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=xC("zoomOnMouseWheel",t,this._opt),n=xC("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;bC(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);bC(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){yC(this._zr,"globalPan")||bC(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(ie);function SC(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function CC(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0;a=Math.max(Math.min(o.max||1/0,a),s)}var l=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(l-1),r.y-=(i-r.y)*(l-1),r.scaleX*=l,r.scaleY*=l,r.dirty()}var AC={axisPointer:1,tooltip:1,brush:1};function MC(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!AC.hasOwnProperty(i.mainType)&&r&&r.model!==n}var IC=["rect","circle","line","ellipse","polygon","polyline","path"],TC=Ct(IC),DC=Ct(IC.concat(["g"])),EC=Ct(IC.concat(["g"])),OC=Ur();function PC(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function RC(t,e,n,i){var r=i.getModel("itemStyle"),o=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=PC(r),u=PC(o),c=PC(s),h=PC(a),d=t.data;if(d){var f=d.getItemVisual(n,"style"),p=d.getItemVisual(n,"decal");t.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=sv(p,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=h,al(e)}function LC(t,e,n,i,r,o,a){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),o)),c=s&&s.getItemLayout(o);if(l||u||c&&c.showLabel){var h=l?n:o,d=void 0;(!s||o>=0)&&(d=r);var f=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Pc(e,Rc(i),{labelFetcher:d,labelDataIndex:h,defaultText:n},f);var p=e.getTextContent();if(p&&(OC(p).ignore=p.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}!function(t,e,n){Ls(t).dataIndex=e,Ls(t).dataType=null}(e,o),e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function NC(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):Ls(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function FC(t,e,n,i,r){t.data||Tc({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function VC(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return xl(e,a,o.get("blurScope")),t.isGeo&&function(t,e,n){var i=Ls(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}var zC=function(){function t(t){var e=new Qi;this.uid=oh("ec_map_draw"),this._controller=new kC(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new Qi),e.add(this._svgGroup=new Qi)}return t.prototype.draw=function(t,e,n,i,r){var o="geo"===t.mainType,a=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(e){a||e.getHostGeoModel()!==t||(a=e.getData())});var s=t.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),h=c.raw,d=c.roam;!l.childAt(0)||r?(u.x=d.x,u.y=d.y,u.scaleX=d.scaleX,u.scaleY=d.scaleY,u.dirty()):dc(u,d,t);var f=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,p={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:f,isGeo:o,transformInfoRaw:h};"geoJSON"===s.resourceType?this._buildGeoJSON(p):"geoSVG"===s.resourceType&&this._buildSVG(p),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=Ct(),n=this._regionsGroup,i=t.transformInfoRaw,r=t.mapOrGeoModel,o=t.data,a=function(t){return[t[0]*i.scaleX+i.x,t[1]*i.scaleY+i.y]};n.removeAll(),q(t.geo.regions,function(i){var s=i.name,l=r.getRegionModel(s),u=o?o.indexOfName(s):null,c=e.get(s),h=!!c;h||(c=e.set(s,new Qi),n.add(c));var d=new zu({segmentIgnoreThreshold:1,shape:{paths:[]}});c.add(d),h||(NC(t,c,s,l,r,u),FC(t,c,s,l,r),VC(t,c,s,l,r)),q(i.geometries,function(t){if("polygon"===t.type){for(var e=[],n=0;n-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Hp);function jC(t){var e={};t.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),q(e,function(t,e){for(var n,i,r,o=(n=X(t,function(t){return t.getData()}),i=t[0].get("mapValueCalculation"),r={},q(n,function(t){t.each(t.mapDimension("value"),function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)})}),n[0].map(n[0].mapDimension("value"),function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,c=0;c1?(s.width=a,s.height=a/f):(s.height=a,s.width=a*f),s.y=o[1]-s.height/2,s.x=o[0]-s.width/2;else{var g=t.getBoxLayoutParams();g.aspect=f,s=rd(g,{width:h,height:d})}this.setViewRect(s.x,s.y,s.width,s.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}var QC=new(function(){function t(){this.dimensions=KC.prototype.dimensions}return t.prototype.create=function(t,e){var n=[];t.eachComponent("geo",function(t,i){var r=t.get("map"),o=new KC(r+i,r,{nameMap:t.get("nameMap"),nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale")});o.zoomLimit=t.get("scaleLimit"),n.push(o),t.coordinateSystem=o,o.model=t,o.resize=$C,o.resize(t,e)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}});var i={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}}),q(i,function(t,i){var r=X(t,function(t){return t.get("nameMap")}),o=new KC(i,i,{nameMap:z(r),nameProperty:t[0].get("nameProperty"),aspectScale:t[0].get("aspectScale")});o.zoomLimit=pt.apply(null,X(t,function(t){return t.get("scaleLimit")})),n.push(o),o.resize=$C,o.resize(t[0],e),q(t,function(t){t.coordinateSystem=o,function(t,e){q(e.get("geoCoord"),function(e,n){t.addGeoCoord(n,e)})}(o,t)})}),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=Ct(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,i+=o.hierNode.shift+(r+=o.hierNode.change)}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,h=s.hierNode.modifier;s=sA(s),o=lA(o),s&&o;){r=sA(r),a=lA(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+h-o.hierNode.prelim-u+i(s,o);d>0&&(cA(uA(s,t,n),t,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,c+=a.hierNode.modifier}s&&!sA(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=h-l),o&&!lA(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function rA(t){t.setLayout({x:t.hierNode.prelim+t.parentNode.hierNode.modifier},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function oA(t){return arguments.length?t:hA}function aA(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function sA(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function lA(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function uA(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function cA(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function hA(t,e){return t.parentNode===e.parentNode?1:2}var dA=function(){this.parentPoint=[],this.childPoints=[]},fA=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dA},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=cr(e.forkPosition,1),h=[];h[l]=r[l],h[u]=r[u]+(a[u]-r[u])*c,t.moveTo(r[0],r[1]),t.lineTo(h[0],h[1]),t.moveTo(o[0],o[1]),h[l]=o[l],t.lineTo(h[0],h[1]),h[l]=a[l],t.lineTo(h[0],h[1]),t.lineTo(a[0],a[1]);for(var d=1;dy.x)||(b-=Math.PI);var k=w?"left":"right",S=s.getModel("label"),C=S.get("rotate"),A=C*(Math.PI/180),M=m.getTextContent();M&&(m.setTextConfig({position:S.get("position")||k,rotation:null==C?-b:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),T="ancestor"===I?a.getAncestorsIndices():"descendant"===I?a.getDescendantIndices():null;T&&(Ls(n).focus=T),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),h=t.getOrient(),d=t.get(["lineStyle","curveness"]),f=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new Lu({shape:vA(c,h,d,r,r)})),dc(g,{shape:vA(c,h,d,o,a)},t));else if("polyline"===u&&"orthogonal"===c&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var m=e.children,v=[],y=0;ye&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),TA=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;nr&&(r=t.depth)});var o=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return i.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=o}),i.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return bp("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.type="series.tree",e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Hp);function EA(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function OA(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=oA(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(r=n.width,o=n.height,a=oA());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=t),t.depth>h.depth&&(h=t)});var d=u===c?1:a(u,c)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===i)p=r/(c.getLayout().x+d+f),g=o/(h.depth-1||1),EA(l,function(t){var e=aA(m=(t.getLayout().x+f)*p,v=(t.depth-1)*g);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(c.getLayout().x+d+f),p=r/(h.depth-1||1),EA(l,function(t){v=(t.getLayout().x+f)*g,t.setLayout({x:m="LR"===y?(t.depth-1)*p:r-(t.depth-1)*p,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=r/(c.getLayout().x+d+f),g=o/(h.depth-1||1),EA(l,function(t){m=(t.getLayout().x+f)*p,t.setLayout({x:m,y:v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g},!0)}))}}}(t,e)})}function PA(t){t.eachSeriesByType("tree",function(t){var e=t.getData();e.tree.eachNode(function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();B(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)})})}function RA(t,e,n){if(t&&G(e,t.type)>=0){var i=n.getData().tree.root,r=t.targetNode;if("string"==typeof r&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function LA(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function NA(t,e){return G(LA(t),e)>=0}function FA(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var VA=function(){},zA=["treemapZoomToNode","treemapRender","treemapMove"];function BA(t){var e=t.getData(),n={};e.tree.eachNode(function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=Vd(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)})}function HA(t){var e=0;q(t.children,function(t){HA(t);var n=t.value;et(n)&&(n=n[0]),e+=n});var n=t.value;et(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),et(t.value)?t.value[0]=n:t.value=n}var jA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};HA(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new ih({itemStyle:r},this,e),a=X((i=t.levels=function(t,e){var n,i,r=Pr(e.get("color")),o=Pr(e.get(["aria","decal","decals"]));if(r){q(t=t||[],function(t){var e=new ih(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)});var a=t[0]||(t[0]={});return n||(a.color=r.slice()),!i&&o&&(a.decal=o.slice()),t}}(i,e))||[],function(t){return new ih(t,o,e)},this),s=TA.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=s.getNodeByDataIndex(e);return t.parentModel=a[n.depth]||o,t})});return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return bp("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=FA(i,this),n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Ct(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){BA(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Hp);function GA(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function UA(t,e,n){Ls(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&FA(n,e)}}var WA=function(){function t(t){this.group=new Qi,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),od(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Br(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o,a,s,l,u,c,h,d,f,p=0,g=e.emptyItemWidth,m=t.get(["breadcrumb","height"]),v=(u=(a=e.box).height,c=cr((o=e.pos).left,l=a.width),h=cr(o.top,u),d=cr(o.right,l),f=cr(o.bottom,u),(isNaN(c)||isNaN(parseFloat(o.left)))&&(c=0),(isNaN(d)||isNaN(parseFloat(o.right)))&&(d=l),(isNaN(h)||isNaN(parseFloat(o.top)))&&(h=0),(isNaN(f)||isNaN(parseFloat(o.bottom)))&&(f=u),s=Bh(s||0),{width:Math.max(d-c-s[1]-s[3],0),height:Math.max(f-h-s[0]-s[2],0)}),y=e.totalWidth,_=e.renderList,b=_.length-1;b>=0;b--){var w=_[b],x=w.node,k=w.width,S=w.text;y>v.width&&(y-=k-g,k=g,S=null);var C=new ku({shape:{points:GA(p,0,k,m,b===_.length-1,0===b)},style:H(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Rs({style:{text:S,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e5,onclick:tt(r,x)});C.disableLabelAnimation=!0,this.group.add(C),UA(C,t,x),p+=k+8}},t.prototype.remove=function(){this.group.removeAll()},t}(),YA=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new $n(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];Ne(s,s,[-(e-=a.x),-(n-=a.y)]),Ve(s,s,[t.scale,t.scale]),Ne(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Qh(a,s)}}}}},this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new WA(this.group))).render(t,e,n.node,function(e){"animating"!==i._state&&(NA(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}},this),n},e.type="treemap",e}(Jp),eM=q,nM=at,iM=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=F(e);this.type=i,this.mappingMethod=n,this._normalizeData=fM[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(rM(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,q(e,function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)})}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(eM(e,function(t,e){n[t]=e}),!et(i)){var r=[];at(i)?eM(i,function(t,e){var i=n[e];r[null!=i?i:-1]=t}):r[-1]=i,i=dM(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):rM(r,!0):(_t("linear"!==n||r.dataExtent),rM(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return J(this._normalizeData,this)},t.listVisualTypes=function(){return Q(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){at(t)?q(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=et(e)?[]:at(e)?{}:(r=!0,null);return t.eachVisual(e,function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a}),o},t.retrieveVisuals=function(e){var n,i={};return e&&eM(t.visualHandlers,function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)}),n?i:null},t.prepareVisualTypes=function(t){if(et(t))t=t.slice();else{if(!nM(t))return[];var e=[];eM(t,function(t,n){e.push(n)}),t=e}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:a.name,dataExtent:u,visual:a.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new gM(h);return mM(d).drColorMappingBy=c,d}}}(0,r,o,0,u,f);q(f,function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=B({},e);if(r){var s=r.type,l="color"===s&&mM(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,p,i);yM(t,o,n,i)}})}else s=_M(u),c.fill=s}}function _M(t){var e=bM(t,"color");if(e){var n=bM(t,"colorAlpha"),i=bM(t,"colorSaturation");return i&&(e=wn(e,null,null,i)),n&&(e=xn(e,n)),e}}function bM(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function wM(t,e){var n=t.get(e);return et(n)&&n.length?{name:e,range:n}:null}var xM=Math.max,kM=Math.min,SM=pt,CM=q,AM=["itemStyle","borderWidth"],MM=["itemStyle","gapWidth"],IM=["upperLabel","show"],TM=["upperLabel","height"],DM={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=rd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=cr(SM(s.width,l[0]),r),c=cr(SM(s.height,l[1]),o),h=i&&i.type,d=RA(i,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===h||"treemapMove"===h?i.rootRect:null,p=t.getViewRoot(),g=LA(p);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;for(var l=i*r,u=l*t.option.zoomToNodeRatio;o=a.parentNode;){for(var c=0,h=o.children,d=0,f=h.length;dvr&&(u=vr),a=o}ua[1]&&(a[1]=e)})):a=[NaN,NaN],{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?xM(u*i/l,l/(u*r)):1/0}function PM(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=e?t.area/e:0;(r||c>n[l[a]])&&(c=n[l[a]]);for(var h=0,d=t.length;hi&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var b=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var w=-Math.atan2(v[1],v[0]);u[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*p+l[0],i.y=-c[1]*g+l[1],h=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=p*b+l[0],i.y=l[1]+x,h=v[0]<0?"right":"left",i.originX=-p*b,i.originY=-x;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+x,h="center",i.originY=-x;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-p*b+u[0],i.y=u[1]+x,h=v[0]>=0?"right":"left",i.originX=p*b,i.originY=-x}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||h})}}}function k(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(Qi);function vI(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["emphasis","lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),labelStatesModels:Rc(e)}}function yI(t){return isNaN(t[0])||isNaN(t[1])}function _I(t){return!yI(t[0])&&!yI(t[1])}var bI=function(){function t(t){this.group=new Qi,this._LineCtor=t||mI}return t.prototype.isPersistent=function(){return!0},t.prototype.updateData=function(t){var e=this,n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=vI(t);t.diff(r).add(function(n){e._doAdd(t,n,o)}).update(function(n,i){e._doUpdate(r,t,i,n,o)}).remove(function(t){i.remove(r.getItemGraphicEl(t))}).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=vI(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i=0?i+=u:i-=u:p>=0?i-=u:i+=u}return i}function II(t,e){var n=[],i=oa,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge(function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[Ot(l[0]),Ot(l[1])],l[2]&&l.__original.push(Ot(l[2])));var h=l.__original;if(null!=l[2]){if(Et(r[0],h[0]),Et(r[1],h[2]),Et(r[2],h[1]),u&&"none"!==u){var d=$M(t.node1),f=MI(r,h[0],d*e);i(r[0][0],r[1][0],r[2][0],f,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],f,n),r[0][1]=n[3],r[1][1]=n[4]}c&&"none"!==c&&(d=$M(t.node2),f=MI(r,h[1],d*e),i(r[0][0],r[1][0],r[2][0],f,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],f,n),r[1][1]=n[1],r[2][1]=n[2]),Et(l[0],r[0]),Et(l[1],r[2]),Et(l[2],r[1])}else Et(o[0],h[0]),Et(o[1],h[1]),Nt(a,o[1],o[0]),Wt(a,a),u&&"none"!==u&&(d=$M(t.node1),Lt(o[0],o[0],a,d*e)),c&&"none"!==c&&(d=$M(t.node2),Lt(o[1],o[1],a,-d*e)),Et(l[0],o[0]),Et(l[1],o[1])})}function TI(t){return"view"===t.type}var DI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){var n=new Zx,i=new bI,r=this.group;this._controller=new kC(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(TI(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):dc(s,l,t)}II(t.getGraph(),KM(t));var u=t.getData();o.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d),u.graph.eachNode(function(t){var e=t.dataIndex,n=t.getGraphicEl(),r=t.getModel();n.off("drag").off("dragend");var o=r.get("draggable");o&&n.on("drag",function(){h&&(h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(e),u.setItemLayout(e,[n.x,n.y]))}).on("dragend",function(){h&&h.setUnfixed(e)}),n.setDraggable(o&&!!h),"adjacency"===r.get(["emphasis","focus"])&&(Ls(n).focus=t.getAdjacentDataIndices())}),u.graph.eachEdge(function(t){var e=t.getGraphicEl();"adjacency"===t.getModel().get(["emphasis","focus"])&&(Ls(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})});var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();if(f){var r=u.getItemLayout(e),o=Math.atan2(r[1]-g,r[0]-p);o<0&&(o=2*Math.PI+o);var a=r[0]=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof PI||(e=this._nodesMap[EI(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}W(PI,LI("hostGraph","data")),W(RI,LI("hostGraph","edgeData"));var NI=OI;function FI(t,e,n,i,r){for(var o=new NI(i),a=0;a "+d)),u++)}var f,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=pb(t,n);else{var g=Xd.get(p),m=g&&g.dimensions||[];G(m,"value")<0&&m.concat(["value"]);var v=sb(t,{coordDimensions:m});(f=new ob(v,n)).initData(t)}var y=new ob(["value"],n);return y.initData(l,s),r&&r(f,y),MA({mainData:f,struct:o,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var VI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new nS(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Rr(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){HM(n=this)&&(n.__curvenessList=[],n.__edgeMap={},jM(n));var a=FI(r,i,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=ih.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=r,t.getModel=i,t})});return q(a.edges,function(t){!function(t,e,n,i){if(HM(n)){var r=GM(t,e,n),o=n.__edgeMap,a=o[UM(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)},this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),bp("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return Dp({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=X(this.option.categories||[],function(t){return null!=t.value?t:B({value:0},t)}),e=new ob(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Hp),zI={type:"graphRoam",event:"graphRoam",update:"none"},BI=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},HI=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return m(e,t),e.prototype.getDefaultShape=function(){return new BI},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(ls);function jI(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var GI=2*Math.PI,UI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:cr(n[0],e.getWidth()),cy:cr(n[1],e.getHeight()),r:cr(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){for(var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),c=u.get("roundCap")?Tk:gu,h=u.get("show"),d=u.getModel("lineStyle"),f=d.get("width"),p=(l-s)%GI||l===s?(l-s)%GI:GI,g=s,m=0;h&&m=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(y.get("show")&&D!==b){O=(O=y.get("distance"))?O+l:l;for(var L=0;L<=w;L++){u=Math.cos(S),c=Math.sin(S);var N=new Du({shape:{x1:u*(p-O)+d,y1:c*(p-O)+f,x2:u*(p-k-O)+d,y2:c*(p-k-O)+f},silent:!0,style:I});"auto"===I.stroke&&N.setStyle({stroke:i((D+L/w)/b)}),h.add(N),S+=A}S-=A}else S+=C}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,c=this._data,h=this._progressEls,d=[],f=t.get(["pointer","show"]),p=t.getModel("progress"),g=p.get("show"),m=t.getData(),v=m.mapDimension("value"),y=+t.get("min"),_=+t.get("max"),b=[y,_],w=[o,a];function x(e,n){var i,o=m.getItemModel(e).getModel("pointer"),a=cr(o.get("width"),r.r),s=cr(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=cr(u[0],r.r),h=cr(u[1],r.r),d=o.get("keepAspect");return(i=l?Vm(l,c-a/2,h-s,a,s,null,d):new HI({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:h}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function k(t,e){var n=p.get("roundCap")?Tk:gu,i=p.get("overlap"),a=i?p.get("width"):l/m.count(),u=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:i?r.r-a:r.r-(t+1)*a,r:i?r.r:r.r-t*a}});return i&&(u.z2=_-m.get(v,t)%_),u}(g||f)&&(m.diff(c).add(function(e){if(f){var n=x(e,o);fc(n,{rotation:-(ur(m.get(v,e),b,w,!0)+Math.PI/2)},t),u.add(n),m.setItemGraphicEl(e,n)}if(g){var i=k(e,o),r=p.get("clip");fc(i,{shape:{endAngle:ur(m.get(v,e),b,w,r)}},t),u.add(i),d[e]=i}}).update(function(e,n){if(f){var i=c.getItemGraphicEl(n),r=i?i.rotation:o,a=x(e,r);a.rotation=r,dc(a,{rotation:-(ur(m.get(v,e),b,w,!0)+Math.PI/2)},t),u.add(a),m.setItemGraphicEl(e,a)}if(g){var s=h[n],l=k(e,s?s.shape.endAngle:o),y=p.get("clip");dc(l,{shape:{endAngle:ur(m.get(v,e),b,w,y)}},t),u.add(l),d[e]=l}}).execute(),m.each(function(t){var e=m.getItemModel(t),n=e.getModel("emphasis");if(f){var r=m.getItemGraphicEl(t),o=m.getItemVisual(t,"style"),a=o.fill;if(r instanceof gs){var s=r.style;r.useStyle(B({image:s.image,x:s.x,y:s.y,width:s.width,height:s.height},o))}else r.useStyle(o),"pointer"!==r.type&&r.setColor(a);r.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===r.style.fill&&r.setStyle("fill",i(ur(m.get(v,t),b,[0,1],!0))),r.z2EmphasisLift=0,Al(r,e),xl(r,n.get("focus"),n.get("blurScope"))}if(g){var l=d[t];l.useStyle(m.getItemVisual(t,"style")),l.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),l.z2EmphasisLift=0,Al(l,e),xl(l,n.get("focus"),n.get("blurScope"))}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=Vm(r,e.cx-i/2+cr(o[0],e.r),e.cy-i/2+cr(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new Qi,h=[],d=[],f=t.isAnimationEnabled();a.diff(this._data).add(function(t){h[t]=new Rs({silent:!0}),d[t]=new Rs({silent:!0})}).update(function(t,e){h[t]=o._titleEls[e],d[t]=o._detailEls[e]}).execute(),a.each(function(e){var n=a.getItemModel(e),o=a.get(s,e),p=new Qi,g=i(ur(o,[l,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),y=r.cx+cr(v[0],r.r),_=r.cy+cr(v[1],r.r);(M=h[e]).attr({style:Lc(m,{x:y,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:g})}),p.add(M)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),x=r.cx+cr(w[0],r.r),k=r.cy+cr(w[1],r.r),S=cr(b.get("width"),r.r),C=cr(b.get("height"),r.r),A=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:g,M=d[e],I=b.get("formatter");M.attr({style:Lc(b,{x:x,y:k,text:jI(o,I),width:isNaN(S)?null:S,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:A})}),Gc(M,{normal:b},o,function(t){return jI(t,I)}),f&&Uc(M,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return jI(a?a.interpolatedValue:o,I)}}),p.add(M)}c.add(p)}),this.group.add(c),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(Jp),WI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n.useColorPaletteOnData=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){return eS(this,["value"])},e.type="series.gauge",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Hp),YI=["itemStyle","opacity"],qI=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new Au,a=new Rs;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return m(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(YI);l=null==l?1:l,i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,fc(i,{style:{opacity:l}},r,e)):dc(i,{style:{opacity:l},shape:{points:a.points}},r,e),Al(i,o),this._updateLabel(t,e),xl(this,s.get("focus"),s.get("blurScope"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;Pc(r,Rc(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new jn(c[0][0],c[0][1]):null},dc(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),dm(n,fm(a),{stroke:u})},e}(ku),XI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add(function(t){var e=new qI(i,t);i.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)}).remove(function(e){mc(r.getItemGraphicEl(e),t,e)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Jp),ZI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.useColorPaletteOnData=!0,n}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new nS(J(this.getData,this),J(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return eS(this,{coordDimensions:["value"],encodeDefaulter:tt(Md,this)})},e.prototype._defaultLabelLine=function(t){Rr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Hp);function KI(t,e){t.eachSeriesByType("funnel",function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&uT(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function uT(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var cT=sT,hT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){t&&V(this.option,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){q(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];q(K(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(dd),dT=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return m(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(zw);function fT(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=gT(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=gT(s,[0,a]),r=o=gT(s,[r,o]),i=0}e[0]=gT(e[0],n),e[1]=gT(e[1],n);var l=pT(e,i);e[i]+=t;var u,c=r||0,h=n.slice();return l.sign<0?h[0]+=c:h[1]-=c,e[i]=gT(e[i],h),u=pT(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function pT(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function gT(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var mT=q,vT=Math.min,yT=Math.max,_T=Math.floor,bT=Math.ceil,wT=hr,xT=Math.PI;function kT(t,e){return vT(yT(t,e[0]),e[1])}function ST(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function CT(t,e){var n,i,r=e.axisExpandWidth,o=e.axisCollapseWidth,a=e.winInnerIndices,s=o,l=!1;return t=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var i=n.getData();mT(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),mw(e.scale,e.model)},this)}},this)},t.prototype.resize=function(t,e){this._rect=rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,c=kT(e.get("axisExpandWidth"),l),h=kT(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,f=e.get("axisExpandWindow");f?(t=kT(f[1]-f[0],l),f[1]=f[0]+t):(t=kT(c*(h-1),l),(f=[c*(e.get("axisExpandCenter")||_T(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-h);p<3&&(p=0);var g=[_T(wT(f[0]/c,1))+1,bT(wT(f[1]/c,1))-1];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:p/c*f[0]}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each(function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),mT(n,function(e,n){var o=(i.axisExpandable?CT:ST)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s=[a[r].x+t.x,a[r].y+t.y],l={horizontal:xT/2,vertical:0}[r],u=[1,0,0,1,0,0];Fe(u,u,l),Ne(u,u,s),this._axesLayout[e]={position:s,rotation:l,transform:u,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];q(o,function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)});for(var l=this.hasAxisBrushed(),u=n;ur*(1-c[0])?(l="jump",a=s-r*(1-c[2])):(a=s-r*c[1])>=0&&(a=s-r*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?fT(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[yT(0,o[1]*s/d-d/2)])[1]=vT(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}(),MT={create:function(t,e){var n=[];return t.eachComponent("parallel",function(i,r){var o=new AT(i,t,e);o.name="parallel_"+r,o.resize(i,e),i.coordinateSystem=o,o.model=i,n.push(o)}),t.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",Xr).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},IT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.activeIntervals=[],n}return m(e,t),e.prototype.getAreaSelectStyle=function(){return co([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=F(t);if(e)for(var n=e.length-1;n>=0;n--)dr(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&qT(t);var l=F(s);l.brushType=cD(l.brushType,a),l.panelId=a===DT?null:a.panelId,o=t._creatingCover=zT(t,l),t._covers.push(o)}if(o){var u=fD[cD(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(aD(t,o,t._track)),i&&(BT(t,o),u.updateCommon(t,o)),HT(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&WT(t,e,n)&&qT(t)&&(r={isEnd:i,removeOnClick:!0});return r}function cD(t,e){return"auto"===t?e.defaultBrushType:t}var hD={mousedown:function(t){if(this._dragging)dD(this,t);else if(!t.target||!t.target.draggable){sD(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=WT(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=WT(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new ih(r[a],this,e));if(i&&n)return FI(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=n.levelModels[i.depth];r&&(t.parentModel=r)}return t}),e.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=n.levelModels[i.depth];r&&(t.parentModel=r)}return t})}).data},e.prototype.setNodePosition=function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return bp("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return bp("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Hp);function TD(t,e){t.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){q(t,function(t){var e=zD(t.outEdges,VD),n=zD(t.inEdges,VD),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)})}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],c=[],h=0,d=0;d=0;v&&m.depth>f&&(f=m.depth),g.setLayout({depth:v?m.depth:h},!0),g.setLayout("vertical"===o?{dy:n}:{dx:n},!0);for(var y=0;yh-1?f:h-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)OD(s,l*=.99,a),ED(s,r,n,i,a),BD(s,l,a),ED(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";q(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]})}),q(t,function(t){var e=0,n=0;q(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),q(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(t,s)}(l,u,n,i,o,a,0!==K(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))})}function DD(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ED(t,e,n,i,r){var o="vertical"===r?"x":"y";q(t,function(t){var a,s,l;t.sort(function(t,e){return t.getLayout()[o]-e.getLayout()[o]});for(var u=0,c=t.length,h="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,s.setLayout("vertical"===r?{x:a}:{y:a},!0)),u=s.getLayout()[o]+s.getLayout()[h]+e;if((l=u-e-("vertical"===r?i:n))>0)for(a=s.getLayout()[o]-l,s.setLayout("vertical"===r?{x:a}:{y:a},!0),u=a,d=c-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[h]+e-u)>0&&(a=s.getLayout()[o]-l,s.setLayout("vertical"===r?{x:a}:{y:a},!0)),u=s.getLayout()[o]})}function OD(t,e,n){q(t.slice().reverse(),function(t){q(t,function(t){if(t.outEdges.length){var i=zD(t.outEdges,PD,n)/zD(t.outEdges,VD);if(isNaN(i)){var r=t.outEdges.length;i=r?zD(t.outEdges,RD,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-FD(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-FD(t,n))*e;t.setLayout({y:a},!0)}}})})}function PD(t,e){return FD(t.node2,e)*t.getValue()}function RD(t,e){return FD(t.node2,e)}function LD(t,e){return FD(t.node1,e)*t.getValue()}function ND(t,e){return FD(t.node1,e)}function FD(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function VD(t){return t.getValue()}function zD(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)}),q(e,function(e){var r=new gM({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))})}})}var jD=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[r,o],f=d[u].get("type"),p=d[1-u].get("type"),g=t.data;if(g&&i){var m=[];q(g,function(t,e){var n;et(t)?(n=t.slice(),t.unshift(e)):et(t.value)?(n=t.value.slice(),t.value.unshift(e)):n=t,m.push(n)}),t.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:P_(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:P_(p),dimsDef:v.slice()}];return eS(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:tt(Ad,y,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),GD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return m(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Hp);W(GD,jD,!0);var UD=GD,WD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add(function(t){if(i.hasValue(t)){var e=XD(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}}).update(function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?ZD(s,n,i,t):n=XD(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},e.type="boxplot",e}(Jp),YD=function(){},qD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return m(e,t),e.prototype.getDefaultShape=function(){return new YD},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig)&&i.push([v,_])}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}},nE=["color","borderColor"],iE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add(function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&sE(s,a))return;var l=aE(a,0,!0);fc(l,{shape:{points:a.ends}},t,n),lE(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}}).update(function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);o&&sE(s,c)?i.remove(u):(u?dc(u,{shape:{points:c.ends}},t,a):u=aE(c),lE(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),dE(t,this.group);var e=t.get("clip",!0)?hk(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=aE(i.getItemLayout(n));lE(o,i,n,r),o.incremental=!0,this.group.add(o)}},e.prototype._incrementalRenderLarge=function(t,e){dE(e,this.group,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Jp),rE=function(){},oE=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return m(e,t),e.prototype.getDefaultShape=function(){return new rE},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(ls);function aE(t,e,n){var i=t.ends;return new oE({shape:{points:n?uE(i,t):i},z2:100})}function sE(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(nE);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var pE=iE,gE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return m(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Hp);W(gE,jD,!0);var mE=gE;function vE(t){t&&et(t.series)&&q(t.series,function(t){at(t)&&"k"===t.type&&(t.type="candlestick")})}var yE=["itemStyle","borderColor"],_E=["itemStyle","borderColor0"],bE=["itemStyle","color"],wE=["itemStyle","color0"],xE={seriesType:"candlestick",plan:Up(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?bE:wE)}function i(t,e){return e.get(t>0?yE:_E)}if(t.getData(),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,B(e.ensureUniqueItemVisual(r,"style"),s)}}}}},kE="undefined"!=typeof Float32Array?Float32Array:Array;function SE(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}var CE={seriesType:"candlestick",plan:Up(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=cr(gt(t.get("barMaxWidth"),r),r),a=cr(gt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?cr(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.mapDimension(r[0]),a=n.mapDimensionsAll(r[1]),s=a[0],l=a[1],u=a[2],c=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==o||a.length<4))return{progress:t.pipelineContext.large?function(t,n){for(var i,r,a=new kE(4*t.count),h=0,d=[],f=[];null!=(r=t.next());){var p=n.get(o,r),g=n.get(s,r),m=n.get(l,r),v=n.get(u,r),y=n.get(c,r);isNaN(p)||isNaN(v)||isNaN(y)?(a[h++]=NaN,h+=3):(a[h++]=SE(n,r,g,m,l),d[0]=p,d[1]=v,i=e.dataToPoint(d,null,f),a[h++]=i?i[0]:NaN,a[h++]=i?i[1]:NaN,d[1]=y,i=e.dataToPoint(d,null,f),a[h++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){for(var r;null!=(r=t.next());){var a=n.get(o,r),h=n.get(s,r),d=n.get(l,r),f=n.get(u,r),p=n.get(c,r),g=Math.min(h,d),m=Math.max(h,d),v=x(g,a),y=x(m,a),_=x(f,a),b=x(p,a),w=[];k(w,y,0),k(w,v,1),w.push(C(b),C(y),C(_),C(v)),n.setItemLayout(r,{sign:SE(n,r,h,d,l),initBaseline:h>d?y[1]:v[1],ends:w,brushRect:S(f,p,a)})}function x(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function k(t,e,n){var r=e.slice(),o=e.slice();r[0]=cc(r[0]+i/2,1,!1),o[0]=cc(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function S(t,e,n){var r=x(t,n),o=x(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function C(t){return t[0]=cc(t[0],1),t}}}}};function AE(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}var ME=function(t){function e(e,n){var i=t.call(this)||this,r=new Wx(e,n),o=new Qi;return i.add(r),i.add(o),i.updateData(e,n),i}return m(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),r=0;r<3;r++){var o=Vm(e,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var a=-r/3*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(a).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(o)}AE(i,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],r=0;r0&&(a=this._getLineLength(i)/l*1e3),(a!==this._period||s!==this._loop)&&(i.stopAnimation(),a>0)){var c=void 0;c="function"==typeof u?u(n):u,i.__t>0&&(c=-a*i.__t),i.__t=0;var h=i.animate("",s).when(a,{__t:1}).delay(c).during(function(){r._updateSymbolPosition(i)});s||h.done(function(){r.remove(i)}),h.start()}this._period=a,this._loop=s}},e.prototype._getLineLength=function(t){return qt(t.__p1,t.__cp1)+qt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=na,l=ia;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=l(e[0],i[0],n[0],r),c=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1],t.rotation=-Math.atan2(u[1]-l[1],u[0]-l[0])-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(DE),PE=function(){this.polyline=!1,this.curveness=0,this.segs=[]},RE=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PE},e.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(n[r++],n[r++]);for(var a=1;a0?t.quadraticCurveTo((s+u)/2-(l-c)*i,(l+c)/2-(u-s)*i,u,c):t.lineTo(u,c)}},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],c=i[s++],h=1;h0){if(Wa(u,c,(u+d)/2-(c-f)*r,(c+f)/2-(d-u)*r,d,f,o,t,e))return a}else if(Ga(u,c,d,f,o,t,e))return a;a++}return-1},e}(ls),LE=function(){function t(){this.group=new Qi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t){this.group.removeAll();var e=new RE({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Zu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e){var n=new RE;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("style");if(r&&r.stroke&&t.setStyle("stroke",r.stroke),t.setStyle("fill",null),!n){var o=Ls(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){o.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(o.dataIndex=n+t.__startIndex)})}},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),NE={seriesType:"lines",plan:Up(),reset:function(t){var e=t.coordinateSystem,n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,c=r.start;c ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Hp);function jE(t){return t instanceof Array||(t=[t,t]),t}var GE={seriesType:"lines",reset:function(t){var e=jE(t.get("symbol")),n=jE(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=jE(n.getShallow("symbol",!0)),r=jE(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}},UE=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=j();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=t.length;c.width=e,c.height=n;for(var f=0;f0){var C=o(v)?s:l;v>0&&(v=v*k+x),_[b++]=C[S],_[b++]=C[S+1],_[b++]=C[S+2],_[b++]=C[S+3]*v*256}else b+=4}return h.putImageData(y,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=j()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function WE(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var YE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(n){n===t&&(i=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):WE(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(WE(r)?this.render(e,n,i):this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0))},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem;if(dk(u,"cartesian2d")){var c=u.getAxis("x"),h=u.getAxis("y");o=c.getBandWidth(),a=h.getBandWidth(),s=c.scale.getExtent(),l=h.scale.getExtent()}for(var d=this.group,f=t.getData(),p=t.getModel(["emphasis","itemStyle"]).getItemStyle(),g=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),v=Rc(t),y=t.get(["emphasis","focus"]),_=t.get(["emphasis","blurScope"]),b=dk(u,"cartesian2d")?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],w=n;ws[1]||Cl[1])continue;var A=u.dataToPoint([S,C]);x=new ks({shape:{x:Math.floor(Math.round(A[0])-o/2),y:Math.floor(Math.round(A[1])-a/2),width:Math.ceil(o),height:Math.ceil(a)},style:k})}else{if(isNaN(f.get(b[1],w)))continue;x=new ks({z2:1,shape:u.dataToRect([f.get(b[0],w)]).contentShape,style:k})}var M=f.getItemModel(w);if(f.hasItemOption){var I=M.getModel("emphasis");p=I.getModel("itemStyle").getItemStyle(),g=M.getModel(["blur","itemStyle"]).getItemStyle(),m=M.getModel(["select","itemStyle"]).getItemStyle(),y=I.get("focus"),_=I.get("blurScope"),v=Rc(M)}var T=t.getRawValue(w),D="-";T&&null!=T[2]&&(D=T[2]+""),Pc(x,v,{labelFetcher:t,labelDataIndex:w,defaultOpacity:k.opacity,defaultText:D}),x.ensureState("emphasis").style=p,x.ensureState("blur").style=g,x.ensureState("select").style=m,xl(x,y,_),x.incremental=r,r&&(x.states.emphasis.hoverLayer=!0),d.add(x),f.setItemGraphicEl(w,x)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new UE;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-c,g=f-h,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=c,r[1]-=h,r.push(i),r}),y=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(y,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=X(e,function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}})).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:o<0?-1:0}(n,o,r,i,h),function(t,e,n,i,r,o,a,s,l,u){var c,h=l.valueDim,d=l.categoryDim,f=Math.abs(n[d.wh]),p=t.getItemVisual(e,"symbolSize");(c=et(p)?p.slice():null==p?["100%","100%"]:[p,p])[d.index]=cr(c[d.index],f),c[h.index]=cr(c[h.index],i?f:Math.abs(o)),u.symbolSize=c,(u.symbolScale=[c[0]/s,c[1]/s])[h.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,h.boundingLength,h.pxSign,u,i,h),function(t,e,n,i,r){var o=t.get(XE)||0;o&&(KE.attr({scaleX:e[0],scaleY:e[1],rotation:n}),KE.updateTransform(),o/=KE.getLineScale(),o*=e[i.valueDim.index]),r.valueLineWidth=o}(n,h.symbolScale,l,i,h);var d=h.symbolSize,f=n.get("symbolOffset");return et(f)&&(f=[cr(f[0],d[0]),cr(f[1],d[1])]),function(t,e,n,i,r,o,a,s,l,u,c,h){var d=c.categoryDim,f=c.valueDim,p=h.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(i){var v=Math.abs(l),y=pt(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var b=cr(y,e[f.index]),w=Math.max(g+2*b,0),x=_?0:2*b,k=Ir(i),S=k?i:fO((v+x)/w);w=g+2*(b=(v-S*g)/2/(_?S:S-1)),x=_?0:2*b,k||"fixed"===i||(S=u?fO((Math.abs(u)+x)/w):0),m=S*w-x,h.repeatTimes=S,h.symbolMargin=b}var C=p*(m/2),A=h.pathPosition=[];A[d.index]=n[d.wh]/2,A[f.index]="start"===a?C:"end"===a?l-C:l/2,o&&(A[0]+=o[0],A[1]+=o[1]);var M=h.bundlePosition=[];M[d.index]=n[d.xy],M[f.index]=n[f.xy];var I=h.barRectShape=B({},n);I[f.wh]=p*Math.max(Math.abs(n[f.wh]),Math.abs(A[f.index]+C)),I[d.wh]=n[d.wh];var T=h.clipShape={};T[d.xy]=-n[d.xy],T[d.wh]=c.ecSize[d.wh],T[f.xy]=0,T[f.wh]=n[f.wh]}(n,d,r,o,0,f,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function QE(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function JE(t){var e=t.symbolPatternSize,n=Vm(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function tO(t,e,n,i){var r=t.__pictorialBundle,o=n.pathPosition,a=e.valueDim,s=n.repeatTimes||0,l=0,u=n.symbolSize[e.valueDim.index]+n.valueLineWidth+2*n.symbolMargin;for(cO(t,function(t){t.__pictorialAnimationIndex=l,t.__pictorialRepeatTimes=s,l0:i<0)&&(r=s-1-t),e[a.index]=u*(r-s/2+.5)+o[a.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function eO(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?hO(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=JE(n),r.add(o),hO(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function nO(t,e,n){var i=B({},e.barRectShape),r=t.__pictorialBarRect;r?hO(r,null,{shape:i},e,n):(r=t.__pictorialBarRect=new ks({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(r))}function iO(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=B({},n.clipShape),a=e.valueDim,s=n.animationModel,u=n.dataIndex;if(r)dc(r,{shape:o},s,u);else{o[a.wh]=0,r=new ks({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var c={};c[a.wh]=n.clipShape[a.wh],l[i?"updateProps":"initProps"](r,{shape:c},s,u)}}}function rO(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=oO,n.isAnimationEnabled=aO,n}function oO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function aO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sO(t,e,n,i){var r=new Qi,o=new Qi;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?tO(r,e,n):eO(r,0,n),nO(r,n,i),iO(r,e,n,i),r.__pictorialShapeStr=uO(t,n),r.__pictorialSymbolMeta=n,r}function lO(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];cO(i,function(t){o.push(t)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),q(o,function(t){pc(t,{scaleX:0,scaleY:0},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function uO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function cO(t,e,n){q(t.__pictorialBundle.children(),function(i){i!==t.__pictorialBarRect&&e.call(n,i)})}function hO(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&l[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function dO(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=o.get("focus"),h=o.get("blurScope"),d=o.get("scale");cO(t,function(t){if(t instanceof gs){var e=t.style;t.useStyle(B({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2});var f=e.valueDim.posDesc[+(n.boundingLength>0)];Pc(t.__pictorialBarRect,Rc(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:jx(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:f}),xl(t,c,h)}function fO(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var pO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=this.group,r=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:ZE[+s],categoryDim:ZE[1-+s]};return r.diff(o).add(function(t){if(r.hasValue(t)){var e=rO(r,t),n=$E(r,t,e,u),o=sO(r,u,n);r.setItemGraphicEl(t,o),i.add(o),dO(o,u,n)}}).update(function(t,e){var n=o.getItemGraphicEl(e);if(r.hasValue(t)){var a=rO(r,t),s=$E(r,t,a,u),l=uO(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(t,null),n=null),n?function(t,e,n){dc(t.__pictorialBundle,{x:n.bundlePosition[0],y:n.bundlePosition[1]},n.animationModel,n.dataIndex),n.symbolRepeat?tO(t,e,n,!0):eO(t,0,n,!0),nO(t,n,!0),iO(t,e,n,!0)}(n,u,s):n=sO(r,u,s,!0),r.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),dO(n,u,s)}else i.remove(n)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&lO(o,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=r,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){lO(i,Ls(e).dataIndex,t,e)}):n.removeAll()},e.type="pictorialBar",e}(Jp),gO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return m(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ah(Ak.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Ak),mO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}o.x=0,o.y=l.y+u[0];var h=new E_(this._layersSeries||[],a,c,c),d=[];function f(e,n,s){var l=r._layers;if("remove"!==e){for(var u,c,h=[],f=[],p=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=h)}return{y0:r,max:o}}(l),c=u.y0,h=n/u.max,d=o.length,f=o[0].indices.length,p=0;pMath.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(v=r.r0+w,a>Math.PI/2&&(x="right")):"right"===x&&(v=r.r-w,a>Math.PI/2&&(x="left")):(v=(r.r+r.r0)/2,x="center"),f.style.align=x,f.style.verticalAlign=p(o,"verticalAlign")||"middle",f.x=v*s+r.cx,f.y=v*l+r.cy;var k=p(o,"rotate"),S=0;"radial"===k?(S=-a)<-Math.PI/2&&(S+=Math.PI):"tangential"===k?(S=Math.PI/2-a)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof k&&(S=k*Math.PI/180),f.rotation=S}),c.dirtyStyle()},e}(gu),wO="sunburstRootToNode",xO="sunburstHighlight",kO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),c=[];s.eachNode(function(t){c.push(t)}),function(i,r){function s(t){return t.getId()}function c(s,c){!function(i,r){if(u||!i||i.getValue()||(i=null),i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):(c=r)&&c.piece&&(l.remove(c.piece),c.piece=null);else if(i){var s=new bO(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}var c}(null==s?null:i[s],null==c?null:r[c])}0===i.length&&0===r.length||new E_(r,i,s,s).add(c).update(c).remove(tt(c,null)).execute()}(c,this._oldChildren||[]),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new bO(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",function(t){r._rootToNode(o.parentNode)})):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(e){var n=!1;t.seriesModel.getViewRoot().eachNode(function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");a&&Qh(a,o.get("target",!0)||"_blank")}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:wO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(Jp);function SO(t){var e=0;q(t.children,function(t){SO(t);var n=t.value;et(n)&&(n=n[0]),e+=n});var n=t.value;et(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),et(t.value)?t.value[0]=n:t.value=n}var CO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};SO(n);var i=X(t.levels||[],function(t){return new ih(t,this,e)},this),r=TA.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t})});return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=FA(i,this),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){BA(this)},e.type="series.sunburst",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"},e}(Hp),AO=Math.PI/180;function MO(t,e,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");et(i)||(i=[0,i]),et(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=cr(e[0],r),l=cr(e[1],o),u=cr(i[0],a/2),c=cr(i[1],a/2),h=-t.get("startAngle")*AO,d=t.get("minAngle")*AO,f=t.getData().tree.root,p=t.getViewRoot(),g=p.depth,m=t.get("sort");null!=m&&IO(p,m);var v=0;q(p.children,function(t){!isNaN(t.getValue())&&v++});var y=p.getValue(),_=Math.PI/(y||v)*2,b=p.depth>0,w=(c-u)/(p.height-(b?-1:1)||1),x=t.get("clockwise"),k=t.get("stillShowZeroSum"),S=x?1:-1;if(b){var C=2*Math.PI;f.setLayout({angle:C,startAngle:h,endAngle:h+C,clockwise:x,cx:s,cy:l,r0:u,r:u+w})}!function t(e,n){if(e){var i=n;if(e!==f){var r=e.getValue(),o=0===y&&k?_:r*_;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&"string"==typeof o&&(o=gn(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),B(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)})})}function DO(t,e){return e=e||[0,0],X(["x","y"],function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))},this)}function EO(t,e){return e=e||[0,0],X([0,1],function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])},this)}function OO(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function PO(t,e){return e=e||[0,0],X(["Radius","Angle"],function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function RO(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||It(t,"text")))}function LO(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},It(a,"text")&&(o.text=a.text),It(a,"rich")&&(o.rich=a.rich),It(a,"textFill")&&(o.fill=a.textFill),It(a,"textStroke")&&(o.stroke=a.textStroke),r={type:"text",style:o,silent:!0},i={};var s=It(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),It(a,"textPosition")&&(i.position=a.textPosition),It(a,"textOffset")&&(i.offset=a.textOffset),It(a,"textRotation")&&(i.rotation=a.textRotation),It(a,"textDistance")&&(i.distance=a.textDistance)}return NO(o,t),q(o.rich,function(t){NO(t,t)}),{textConfig:i,textContent:r}}function NO(t,e){e&&(e.font=e.textFont||e.font,It(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),It(e,"textAlign")&&(t.align=e.textAlign),It(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),It(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),It(e,"textWidth")&&(t.width=e.textWidth),It(e,"textHeight")&&(t.height=e.textHeight),It(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),It(e,"textPadding")&&(t.padding=e.textPadding),It(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),It(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),It(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),It(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),It(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),It(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),It(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function FO(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";VO(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,q(e.rich,function(t){VO(t,t)}),i}function VO(t,e){e&&(It(e,"fill")&&(t.textFill=e.fill),It(e,"stroke")&&(t.textStroke=e.fill),It(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),It(e,"font")&&(t.font=e.font),It(e,"fontStyle")&&(t.fontStyle=e.fontStyle),It(e,"fontWeight")&&(t.fontWeight=e.fontWeight),It(e,"fontSize")&&(t.fontSize=e.fontSize),It(e,"fontFamily")&&(t.fontFamily=e.fontFamily),It(e,"align")&&(t.textAlign=e.align),It(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),It(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),It(e,"width")&&(t.textWidth=e.width),It(e,"height")&&(t.textHeight=e.height),It(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),It(e,"padding")&&(t.textPadding=e.padding),It(e,"borderColor")&&(t.textBorderColor=e.borderColor),It(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),It(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),It(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),It(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),It(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),It(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),It(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),It(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),It(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),It(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var zO=ja.CMD,BO=2*Math.PI,HO=["x","y"],jO=["width","height"],GO=[];function UO(t,e){return Math.abs(t-e)<1e-5}function WO(t){var e,n,i,r,o,a=t.data,s=t.len(),l=[],u=0,c=0,h=0,d=0;function f(t,n){e&&e.length>2&&l.push(e),e=[t,n]}function p(t,n,i,r){UO(t,i)&&UO(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nS:M2&&l.push(e),l}function YO(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var r=nh.width?1:0,r=jO[i],o=HO[i],a=h[r]/e,s=h[o],l=0;li[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:J(PO,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}},SP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return pb(this.getSource(),this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=cP(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},e}(Hp),CP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n,i){var r=this._data,o=t.getData(),a=this.group,s=WP(t,o,e,n),l=t.__transientTransitionOpt;if(!l||null!=l.from&&null!=l.to){var u=new aR(t,l),c=l?"multiple":"oneToOne";new E_(r?r.getIndices():[],o.getIndices(),AP(r,c,l&&l.from),AP(o,c,l&&l.to),null,c).add(function(e){qP(n,null,e,s(e,i),t,a,o,null)}).remove(function(e){nR(r.getItemGraphicEl(e),t,a)}).update(function(e,l){u.reset("oneToOne");var c=r.getItemGraphicEl(l);u.findAndAddFrom(c),u.hasFrom()&&(oR(c,a),c=null),qP(n,c,e,s(e,i),t,a,o,u),u.applyMorphing()}).updateManyToOne(function(e,l){u.reset("manyToOne");for(var c=0;c=0){!s&&(s=r[t]={});var f=Q(l);for(h=0;h=0){var d=t.getAnimationStyleProps(),f=d?d.style:null;if(f){!a&&(a=r.style={});var p=Q(i);for(c=0;c=d;f--)nR(e.childAt(f),r,e)}}(t,e,n,i,r,s),l>=0?o.replaceAt(e,l):o.add(e),e}function ZP(t,e){var n,i=cP(t),r=e.type,o=e.shape,a=e.style;return null!=r&&r!==i.customGraphicType||"path"===r&&(n=o)&&(It(n,"pathData")||It(n,"d"))&&iR(o)!==i.customPathData||"image"===r&&It(a,"image")&&a.image!==i.customImagePath}function KP(t,e,n){var i=e?$P(t,e):t,r=e?QP(t,i,fP):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?$P(s,e):s:null;if(r&&(n.isLegacy||RO(r,o,!!a,!!l))){n.isLegacy=!0;var u=LO(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}!e&&l&&!l.type&&(l.type="text");var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function $P(t,e){return e?t?t[e]:null:t}function QP(t,e,n){var i=e&&e.style;return null==i&&n===fP&&t&&(i=t.styleEmphasis),i}function JP(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function tR(t,e){var n=this.context;XP(n.api,null!=e?n.oldChildren[e]:null,n.dataIndex,null!=t?n.newChildren[t]:null,n.seriesModel,n.group,0,n.morphPreparation)}function eR(t){var e=this.context;nR(e.oldChildren[t],e.seriesModel,e.group)}function nR(t,e,n){if(t){var i=cP(t).leaveToProps;i?dc(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t)}}function iR(t){return t&&(t.pathData||t.d)}function rR(t){return t&&t instanceof ls}function oR(t,e){t&&e.remove(t)}var aR=function(){function t(t,e){this._fromList=[],this._toList=[],this._toElOptionList=[],this._allPropsFinalList=[],this._toDataIndices=[],this._morphConfigList=[],this._seriesModel=t,this._transOpt=e}return t.prototype.hasFrom=function(){return!!this._fromList.length},t.prototype.findAndAddFrom=function(t){if(t&&(cP(t).canMorph&&this._fromList.push(t),t.isGroup))for(var e=t.childrenRef(),n=0;n=n?null:o,i+1>=e?n-o:r);else if("oneToMany"===t)for(var a=Math.max(1,Math.floor(e/n)),s=0,l=0;s=e?e-s:a,l>=n?null:l)},t.prototype._oneToOneForSingleTo=function(t,e){var n,i=this._toList[t],r=this._toElOptionList[t],o=this._toDataIndices[t],a=this._allPropsFinalList[t],s=this._fromList[e],l=this._getOrCreateMorphConfig(o),u=l.duration;if(s&&eP(s)){if(TP(i,a,r.style),u){var c=nP([s],i,l,sR);this._processResultIndividuals(c,t,null)}}else{var h=u&&s&&(s!==i||tP(n=s)||eP(n))?s:null,d={};EP("shape",i,h,r,d,!1),EP("extra",i,h,r,d,!1),PP(i,h,r,d,!1),RP(i,h,r,r.style,d,!1),TP(i,a,r.style),h&&$O(h,i,l),DP(i,o,r,this._seriesModel,d,!1)}},t.prototype._manyToOneForSingleTo=function(t,e,n){var i=this._toList[t];TP(i,this._allPropsFinalList[t],this._toElOptionList[t].style);var r=this._getOrCreateMorphConfig(this._toDataIndices[t]);if(r.duration&&null!=e){for(var o=[],a=e;aa)return!0;if(o){var s=BS(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=lR(t).pointerEl=new l[r.type](uR(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=lR(t).labelEl=new Rs(uR(e.label));t.add(r),fR(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=lR(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=lR(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),fR(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Cc(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ye(t.event)},onmousedown:cR(this._onHandleDragMove,this,0,0),drift:cR(this._onHandleDragMove,this),ondragend:cR(this._onHandleDragEnd,this)}),i.add(r)),gR(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");et(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,rg(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){hR(this._axisPointerModel,!e&&this._moveAnimation,this._handle,pR(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(pR(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(pR(i)),lR(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function vR(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function yR(t,e,n,i,r){var o=_R(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Bh(a.get("padding")||0),l=a.getFont(),u=ni(o,l),c=r.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(c[0]-=h),"center"===f&&(c[0]-=h/2);var p=r.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,h,d,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:Lc(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function _R(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:_w(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};q(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=e&&e.getDataParams(t.dataIndexInside);i&&s.seriesData.push(i)}),it(a)?o=a.replace("{value}",o):nt(a)&&(o=a(s))}return o}function bR(t,e,n){var i=[1,0,0,1,0,0];return Fe(i,i,n.rotation),Ne(i,i,n.position),_c([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function wR(t,e,n,i,r,o){var a=FS.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),yR(e,i,r,o,{position:bR(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function xR(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function kR(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function SR(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var CR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=AR(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var c=vR(i),h=MR[s](o,u,l);h.style=c,t.graphicKey=h.type,t.pointer=h}wR(e,t,kS(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=kS(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=bR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=AR(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];return h[l]=u[l],{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(mR);function AR(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var MR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:xR([e,n[0]],[e,n[1]],IR(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth());return{type:"Rect",shape:kR([e-i/2,n[0]],[i,n[1]-n[0]],IR(t))}}};function IR(t){return"x"===t.dim?0:1}var TR=CR,DR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(dd),ER=Ur(),OR=q;function PR(t,e,n){if(!w.node){var i=e.getZr();ER(i).records||(ER(i).records={}),function(t,e){function n(n,i){t.on(n,function(n){var r=function(t){var e={showTip:[],hideTip:[]};return{dispatchAction:function n(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))},pendings:e}}(e);OR(ER(t).records,function(t){t&&i(t,n,r.dispatchAction)}),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)})}ER(t).initialized||(ER(t).initialized=!0,n("click",tt(LR,"click")),n("mousemove",tt(LR,"mousemove")),n("globalout",RR))}(i,e),(ER(i).records[t]||(ER(i).records[t]={})).handler=n}}function RR(t,e,n){t.handler("leave",null,n)}function LR(t,e,n,i){e.handler(t,n,i)}function NR(t,e){if(!w.node){var n=e.getZr();(ER(n).records||{})[t]&&(ER(n).records[t]=null)}}var FR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";PR("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},e.prototype.remove=function(t,e){NR("axisPointer",e)},e.prototype.dispose=function(t,e){NR("axisPointer",e)},e.type="axisPointer",e}(Gp);function VR(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Gr(o,t);if(null==a||a<0||et(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,h="x"===c||"radius"===c?1:0,d=o.mapDimension(u.dim),f=[];f[h]=o.get(d,a),f[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(X(l.dimensions,function(t){return o.mapDimension(t)}),a))||[];else if(s){var p=s.getBoundingRect().clone();p.applyTransform(s.transform),i=[p.x+p.width/2,p.y+p.height/2]}return{point:i,el:s}}var zR=Ur();function BR(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||J(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){WR(r)&&(r=VR({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=WR(r),u=o.axesInfo,c=s.axesInfo,h="leave"===i||WR(r),d={},f={},p={list:[],map:{}},g={showPointer:tt(jR,f),showTooltip:tt(GR,p)};q(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);q(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!h&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&HR(t,a,g,!1,d)}})});var m={};return q(c,function(t,e){var n=t.linkGroup;n&&!f[e]&&q(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,UR(e),UR(t)))),m[t.key]=o}})}),q(m,function(t,e){HR(c[e],t,g,!0,d)}),function(t,e,n){var i=n.axesInfo=[];q(e,function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}(f,c,d),function(t,e,n,i){if(!WR(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}(p,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=zR(i)[r]||{},a=zR(i)[r]={};q(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&q(n.seriesDataIndices,function(t){a[t.seriesIndex+" | "+t.dataIndex]=t})});var s=[],l=[];q(o,function(t,e){!a[e]&&l.push(t)}),q(a,function(t,e){!o[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),d}}function HR(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return q(e.seriesModels,function(e,l){var u,c,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(h,t,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=a&&((p=0&&s<0)&&(a=p,s=f,r=u,o.length=0),q(c,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&B(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function jR(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function GR(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=jS(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function UR(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function WR(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function YR(t){US.registerAxisPointerClass("CartesianAxisPointer",TR),t.registerComponentModel(DR),t.registerComponentView(FR),t.registerPreprocessor(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!et(e)&&(t.axisPointer.link=[e])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=function(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];q(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=jS(n.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(q(n.getAxes(),tt(f,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get(["axisPointer","type"]),d=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||h)&&q(d.baseAxes,tt(f,!h||"cross",c)),h&&q(d.otherAxes,tt(f,"cross",!1))}}function f(i,s,c){var h=c.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||i||HS(h))){null==s&&(s=h.get("triggerTooltip"));var f=(h=i?function(t,e,n,i,r,o){var a=e.getModel("axisPointer"),s={};q(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=F(a.get(t))}),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&H(l,c.textStyle)}}return t.model.getModel("axisPointer",new ih(s,n,i))}(c,u,r,e,i,s):h).get("snap"),p=jS(c.model),g=s||f||"category"===c.type,m=t.axesInfo[p]={key:p,axis:c,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:HS(h),seriesModels:[],linkGroup:null};l[p]=m,t.seriesInvolved=t.seriesInvolved||g;var v=function(t,e){for(var n=e.model,i=e.dim,r=0;rm?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,n,0,a,i.get(["label","margin"]));yR(t,n,i,r,d)},e}(mR),XR={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:xR(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:SR(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:SR(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},ZR=qR,KR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},e}(dd),$R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Xr).models[0]},e.type="polarAxis",e}(dd);W($R,kw);var QR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="angleAxis",e}($R),JR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="radiusAxis",e}($R),tL=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return m(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(zw);tL.prototype.dataToRadius=zw.prototype.dataToCoord,tL.prototype.radiusToData=zw.prototype.coordToData;var eL=tL,nL=Ur(),iL=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return m(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=ni(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),h=nL(t.model),d=h.lastAutoInterval,f=h.lastTickCount;return null!=d&&null!=f&&Math.abs(d-c)<=1&&Math.abs(f-r)<=1&&d>c?c=d:(h.lastTickCount=r,h.lastAutoInterval=c),c},e}(zw);iL.prototype.dataToAngle=zw.prototype.dataToCoord,iL.prototype.angleToData=zw.prototype.coordToData;var rL=iL;function oL(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var aL=function(){function t(t){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new eL,this._angleAxis=new rL,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return oL(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return oL(e)===this?this.pointToData(n):null},t}();function sL(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===n){var e=t.getData();q(xw(e,"radius"),function(t){r.scale.unionExtentFromData(e,t)}),q(xw(e,"angle"),function(t){i.scale.unionExtentFromData(e,t)})}}),mw(i.scale,i.model),mw(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function lL(t,e){if(t.type=e.get("type"),t.scale=vw(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var uL={dimensions:aL.prototype.dimensions,create:function(t,e){var n=[];return t.eachComponent("polar",function(t,i){var r=new aL(i+"");r.update=sL;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");lL(o,s),lL(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=cr(i[0],r),t.cy=cr(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:et(l)||(l=[0,l]);var u=[cr(l[0],s),cr(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t}),t.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Xr).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},cL=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function hL(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function dL(t){return t.getRadiusAxis().inverse?0:1}function fL(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var pL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return m(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=X(n.getViewLabels(),function(t){t=F(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t});fL(s),fL(o),q(cL,function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||gL[e](this.group,t,i,o,a,r,s)},this)}},e.type="angleAxis",e}(US),gL={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=dL(n),u=l?0:1;(a=0===o[u]?new $l({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new yu({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[dL(n)],u=X(i,function(t){return new Du({shape:hL(n,[l,l+s],t.coord)})});t.add(ac(u,{style:H(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[dL(n)],c=[],h=0;hp?"left":"right",v=Math.abs(f[1]-g)/d<.3?"middle":f[1]>g?"top":"bottom";if(s&&s[h]){var y=s[h];at(y)&&y.textStyle&&(a=new ih(y.textStyle,l,l.ecModel))}var _=new Rs({silent:FS.isLabelSilent(e),style:Lc(a,{x:f[0],y:f[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(t.add(_),c){var b=FS.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,Ls(_).eventData=b}},this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",A=b;y&&(i[s][S]||(i[s][S]={p:b,n:b}),A=i[s][S][C]);var M=void 0,I=void 0,T=void 0,D=void 0;if("radius"===h.dim){var E=h.dataToCoord(k)-b,O=o.dataToCoord(S);Math.abs(E)=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return FL(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return FL(e)===this?this.pointToData(n):null},t}(),zL={create:function(t,e){var n=[];return t.eachComponent("singleAxis",function(i,r){var o=new VL(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Xr).models[0];t.coordinateSystem=e&&e.coordinateSystem}}),n},dimensions:VL.prototype.dimensions},BL=["x","y"],HL=["width","height"],jL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=WL(a,1-UL(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var c=vR(i),h=GL[u](o,l,s);h.style=c,t.graphicKey=h.type,t.pointer=h}wR(e,t,IL(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=IL(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=bR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=UL(r),s=WL(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=WL(o,1-a),c=(u[1]+u[0])/2,h=[c,c];return h[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(mR),GL={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:xR([e,n[0]],[e,n[1]],UL(t))}},shadow:function(t,e,n){var i=t.getBandWidth();return{type:"Rect",shape:kR([e-i/2,n[0]],[i,n[1]-n[0]],UL(t))}}};function UL(t){return t.isHorizontal()?0:1}function WL(t,e){var n=t.getRect();return[n[BL[e]],n[BL[e]]+n[HL[e]]]}var YL=jL,qL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="single",e}(Gp);function XL(t,e){var n,i=t.cellSize;1===(n=et(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=X([0,1],function(t){return function(t,e){return null!=t[ed[e][0]]||null!=t[ed[e][1]]&&null!=t[ed[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]});sd(t,e,{type:"box",ignoreSize:r})}var ZL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(e,n,i){var r=ld(e);t.prototype.init.apply(this,arguments),XL(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),XL(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(dd),KL={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\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"]},$L={EN:["S","M","T","W","T","F","S"],CN:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},QL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,a,i),this._renderWeekText(t,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new ks({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){d(u.formatedDate),0===c&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=o.getDateInfo(h)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new Au({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?(n=t,q(e,function(t,e){n=n.replace("{"+e+"}",t)}),n):"function"==typeof t?t(e):e.nameMap;var n},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=r.get("formatter"),p=this._formatterLabel(f,{start:e.start.y,end:e.end.y,nameMap:d}),g=new Rs({z2:30,style:Lc(r,{text:p})});g.attr(this._yearTextPositionControl(g,h[a],n,a,o)),i.add(g)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var r=i.get("nameMap"),o=i.get("margin"),a=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];it(r)&&(r=KL[r.toUpperCase()]||[]);var u="start"===a?0:1,c="horizontal"===e?0:1;o="start"===a?-o:o;for(var h="center"===s,d=0;d=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/JL)-Math.floor(n[0].time/JL)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o}),e.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},t.dimensions=["time","value"],t}(),nN=Ur(),iN={path:null,compoundPath:null,group:Qi,image:gs,text:Rs},rN=function(t){var e=t.graphic;et(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])},oN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return m(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=Fr(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];q(a,function(t,e){var n=t.newOption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=B({},n),r=t[e],o=n.$action||"merge";"merge"===o?r?(V(r,i,!0),sd(r,i,{ignoreSize:!0}),ud(n,r)):t[e]=i:"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}(r,e,n),function(t,e){if(t&&(t.hv=e.hv=[uN(e,["left","right"]),uN(e,["top","bottom"])],"group"===t.type)){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[e],n))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},e.prototype._flatten=function(t,e,n){q(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(dd),aN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(){this._elMap=Ct()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;q(e,function(e){var r=Br(e.id,null),o=null!=r?n.get(r):null,a=Br(e.parentId,null),s=null!=a?n.get(a):i,l=e.type,u=e.style;"text"===l&&u&&e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=u.verticalAlign=u.align=null);var c=e.textContent,h=e.textConfig;if(u&&RO(u,l,!!h,!!c)){var d=LO(u,l,!0);!h&&d.textConfig&&(h=e.textConfig=d.textConfig),!c&&d.textContent&&(c=d.textContent)}var f=function(t){return t=B({},t),q(["id","parentId","$action","hv","bounding","textContent"].concat(td),function(e){delete t[e]}),t}(e),p=e.$action||"merge";"merge"===p?o?o.attr(f):sN(r,s,f,n):"replace"===p?(lN(o,n),sN(r,s,f,n)):"remove"===p&&lN(o,n);var g=n.get(r);if(g&&c)if("merge"===p){var m=g.getTextContent();m?m.attr(c):g.setTextContent(new Rs(c))}else"replace"===p&&g.setTextContent(new Rs(c));if(g){var v=nN(g);v.__ecGraphicWidthOption=e.width,v.__ecGraphicHeightOption=e.height,function(t,e,n){var i=Ls(t).eventData;t.silent||t.ignore||i||(i=Ls(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=n.info)}(g,t,e),Tc({el:g,componentModel:t,itemName:g.name,itemTooltipOption:e.tooltip})}})}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=0;s=0;s--){var h,d,f,p;(f=null!=(d=Br((h=n[s]).id,null))?r.get(d):null)&&(c=nN(p=f.parent),od(f,h,p===i?{width:o,height:a}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:h.hv,boundingMode:h.bounding}))}},e.prototype._clear=function(){var t=this._elMap;t.each(function(e){lN(e,t)}),this._elMap=Ct()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Gp);function sN(t,e,n,i){var r=n.type,o=new(It(iN,r)?iN[r]:nc(r))(n);e.add(o),i.set(t,o),nN(o).__ecGraphicId=t}function lN(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){lN(t,e)}),e.removeKey(nN(t).__ecGraphicId),n.remove(t))}function uN(t,e){var n;return q(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}var cN=["x","y","radius","angle","single"],hN=["cartesian2d","polar","singleAxis"];function dN(t){return t+"Axis"}function fN(t){var e=t.ecModel,n={infoList:[],infoMap:Ct()};return t.eachTargetAxis(function(t,i){var r=e.getComponent(dN(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(n.infoList.push(s={model:o,axisModels:[]}),n.infoMap.set(a,s)),s.axisModels.push(r)}}}),n}var pN=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function gN(t){var e={};return q(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}var mN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return m(e,t),e.prototype.init=function(t,e,n){var i=gN(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=gN(t);V(this.option,t,!0),V(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;q([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=Ct();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return q(cN,function(n){var i=this.getReferringComponents(dN(n),Zr);if(i.specified){e=!0;var r=new pN;q(i.models,function(t){r.add(t.componentIndex)}),t.set(n,r)}},this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}function o(e,n){var r=e[0];if(r){var o=new pN;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Xr).models[0];a&&q(e,function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Xr).models[0]&&o.add(t.componentIndex)})}}}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),i&&q(cN,function(e){if(i){var r=n.findComponents({mainType:dN(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new pN;o.add(r[0].componentIndex),t.set(e,o),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(e){!t&&(t=e)},this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");q([["start","startValue"],["end","endValue"]],function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(e,n){null==t&&(t=this.ecModel.getComponent(dN(e),n))},this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each(function(n,i){q(n.indexList,function(n){t.call(e,i,n)})})},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(dN(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;q([["start","startValue"],["end","endValue"]],function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;q(["start","startValue","end","endValue"],function(n){e[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=dN(this._dimName),i=e.getReferringComponents(n,Xr).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return F(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];bN(["start","end"],function(l,u){var c=t[l],h=t[l+"Value"];"percent"===r[u]?(null==c&&(c=o[u]),h=i.parse(ur(c,o,n))):(e=!0,c=ur(h=null==h?n[u]:i.parse(h),n,o)),s[u]=h,a[u]=c}),wN(s),wN(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";fT(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=ur(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];bN(n,function(t){!function(t,e,n){e&&q(xw(e,n),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}(i,t.getData(),e)});var r=t.getAxisModel(),o=fw(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&bN(i,function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf(function(t){for(var n,r,a,s=0;so[1];if(u&&!c&&!h)return!0;u&&(a=!0),c&&(n=!0),h&&(r=!0)}return a&&n&&r}):bN(i,function(n){if("empty"===r)t.setData(e=e.map(n,function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN}));else{var i={};i[n]=o,e.selectRange(i)}}),bN(i,function(t){e.setApproximateExtent(o,t)}))})}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;bN(["min","max"],function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=ur(n[0]+o,n,[0,100],!0):null!=r&&(o=ur(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=gr(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}(),kN={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=t.getComponent(dN(i),r);e(i,r,o,n)})})}e(function(t,e,n,i){n.__dzAxisProxy=null});var n=[];e(function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new xN(e,i,o,t),n.push(r.__dzAxisProxy))});var i=Ct();return q(n,function(t){q(t.getTargetSeriesModels(),function(t){i.set(t.uid,t)})}),i},overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(e,n){t.getAxisProxy(e,n).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}},SN=!1;function CN(t){SN||(SN=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,kN),function(t){t.registerAction("dataZoom",function(t,e){q(function(t,e){var n,i=Ct(),r=[],o=Ct();t.eachComponent({mainType:"dataZoom",query:e},function(t){o.get(t.uid)||s(t)});do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis(function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)}),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis(function(t,e){(i.get(t)||i.set(t,[]))[e]=!0})}return r}(e,t),function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function AN(t){t.registerComponentModel(vN),t.registerComponentView(_N),CN(t)}var MN=function(){},IN={};function TN(t,e){IN[t]=e}function DN(t){return IN[t]}var EN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;q(this.option.feature,function(t,n){var i=DN(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),V(t,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(dd);function ON(t,e){var n=Bh(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new ks({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var PN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a=t.get("feature")||{},s=this._features||(this._features={}),l=[];q(a,function(t,e){l.push(e)}),new E_(this._featureNames||[],l).add(u).update(u).remove(tt(u,null)).execute(),this._featureNames=l,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=rd(i,o,r);id(e.get("orient"),t,e.get("itemGap"),a.width,a.height),od(t,i,o,r)}(r,t,n),r.add(ON(r.getBoundingRect(),t)),r.eachChild(function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.states.emphasis;if(l&&!nt(l)&&e){var u=l.style||(l.style={}),c=ni(e,Rs.makeFont(u)),h=t.x+r.x,d=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",d=!0);var f=d?-5-c.height:o+8;h+c.width/2>n.getWidth()?(a.position=["100%",f],u.align="right"):h-c.width/2<0&&(a.position=[0,f],u.align="left")}})}function u(u,c){var h,d=l[u],f=l[c],p=a[d],g=new ih(p,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(p.title=i.newTitle),d&&!f){if(function(t){return 0===t.indexOf("my")}(d))h={onclick:g.option.onclick,featureName:d};else{var m=DN(d);if(!m)return;h=new m}s[d]=h}else if(!(h=s[f]))return;if(h.uid=oh("toolbox-feature"),h.model=g,h.ecModel=e,h.api=n,h instanceof MN){if(!d&&f)return void(h.dispose&&h.dispose(e,n));if(!g.get("show")||h.unusable)return void(h.remove&&h.remove(e,n))}!function(i,a,s){var l,u,c=i.getModel("iconStyle"),h=i.getModel(["emphasis","iconStyle"]),d=a instanceof MN&&a.getIcons?a.getIcons():i.get("icon"),f=i.get("title")||{};"string"==typeof d?(l={})[s]=d:l=d,"string"==typeof f?(u={})[s]=f:u=f;var p=i.iconPaths={};q(l,function(s,l){var d=Cc(s,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(c.getItemStyle()),d.ensureState("emphasis").style=h.getItemStyle();var f=new Rs({style:{text:u[l],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null},ignore:!0});d.setTextContent(f),Tc({el:d,componentModel:t,itemName:l,formatterParamsExtra:{title:u[l]}}),d.__title=u[l],d.on("mouseover",function(){var e=h.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({fill:h.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),d.setTextConfig({position:h.get("textPosition")||n}),f.ignore=!t.get("showTitle"),ul(this)}).on("mouseout",function(){"emphasis"!==i.get(["iconStatus",l])&&cl(this),f.hide()}),("emphasis"===i.get(["iconStatus",l])?ul:cl)(d),r.add(d),d.on("click",J(a.onclick,a,e,n,l)),p[l]=d})}(g,h,d),g.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?ul:cl)(i[t])},h instanceof MN&&h.render&&h.render(g,e,n,i)}},e.prototype.updateView=function(t,e,n,i){q(this._features,function(t){t instanceof MN&&t.updateView&&t.updateView(t.model,e,n,i)})},e.prototype.remove=function(t,e){q(this._features,function(n){n instanceof MN&&n.remove&&n.remove(t,e)}),this.group.removeAll()},e.prototype.dispose=function(t,e){q(this._features,function(n){n instanceof MN&&n.dispose&&n.dispose(t,e)})},e.type="toolbox",e}(Gp),RN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!w.browser.newEdge&&(w.browser.ie||w.browser.edge))if(window.navigator.msSaveOrOpenBlob||r){var s=a.split(","),l=s[0].indexOf("base64")>-1,u=r?decodeURIComponent(s[1]):s[1];l&&(u=atob(u));var c=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var h=u.length,d=new Uint8Array(h);h--;)d[h]=u.charCodeAt(h);var f=new Blob([d]);window.navigator.msSaveOrOpenBlob(f,c)}else{var p=document.createElement("iframe");document.body.appendChild(p);var g=p.contentWindow,m=g.document;m.open("image/svg+xml","replace"),m.write(u),m.close(),g.focus(),m.execCommand("SaveAs",!0,c),document.body.removeChild(p)}}else{var v=n.get("lang"),y='',_=window.open();_.document.write(y),_.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=a;var x=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(x)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(MN);RN.prototype.unusable=!w.canvasSupported;var LN=RN,NN="__ec_magicType_stack__",FN=[["line","bar"],["stack"]],VN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return q(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(zN[n]){var o,a={series:[]};q(FN,function(t){G(t,n)>=0&&q(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(t){var e=zN[n](t.subType,t.id,t,i);e&&(H(e,t.option),a.series.push(e));var r=t.coordinateSystem;if(r&&"cartesian2d"===r.type&&("line"===n||"bar"===n)){var o=r.getAxesByScale("ordinal")[0];if(o){var s=o.dim+"Axis",l=t.getReferringComponents(s,Xr).models[0].componentIndex;a[s]=a[s]||[];for(var u=0;u<=l;u++)a[s][l]=a[s][l]||{};a[s][l].boundaryGap="bar"===n}}}),"stack"===n&&(o=V({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title)),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:a,newTitle:o,featureName:"magicType"})}},e}(MN),zN={line:function(t,e,n,i){if("bar"===t)return V({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return V({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===NN;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),V({id:e,stack:r?"":NN},i.get(["option","stack"])||{},!0)}};f_({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var BN=VN,HN=new Array(60).join("-"),jN="\t";function GN(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var UN=new RegExp("[\t]+","g"),WN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var r=document.createElement("div");r.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",r.style.backgroundColor=i.get("backgroundColor")||"#fff";var o=document.createElement("h4"),a=i.get("lang")||[];o.innerHTML=a[0]||i.get("title"),o.style.cssText="margin: 10px 20px;",o.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),c=i.get("contentToOption"),h=function(t){var e,n,i,r=function(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}(t);return{value:K([(n=r.seriesGroupByCategoryAxis,i=[],q(n,function(t,e){var n=t.categoryAxis,r=t.valueAxis.dim,o=[" "].concat(X(t.series,function(t){return t.name})),a=[n.model.getCategories()];q(t.series,function(t){var e=t.getRawData();a.push(t.getRawData().mapArray(e.mapDimension(r),function(t){return t}))});for(var s=[o.join(jN)],l=0;l=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=X(GN(e.shift()).split(UN),function(t){return{name:t,data:[]}}),r=0;r=0)&&t(r,i._targetInfoList)})}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=sF[t.brushType](0,n,e);t.__rangeOffset={offset:uF[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}}),t},t.prototype.matchOutputRanges=function(t,e,n){q(t,function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&q(i.coordSyses,function(i){var r=sF[t.brushType](1,i,t.range);n(t,r.values,i,e)})},this)},t.prototype.setInputRanges=function(t,e){q(t,function(t){var n,i,r,o,a=this.findTargetInfo(t,e);if(t.range=t.range||[],a&&!0!==a){t.panelId=a.panelId;var s=sF[t.brushType](0,a.coordSys,t.coordRange),l=t.__rangeOffset;t.range=l?uF[t.brushType](s.values,l.offset,(n=l.xyMinMax,i=hF(s.xyMinMax),r=hF(n),o=[i[0]/r[0],i[1]/r[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):s.values}},this)},t.prototype.makePanelOpts=function(t,e){return X(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:mD(i),isTargetByCursor:yD(i,t,n.coordSysModel),getLinearBrushOtherExtent:vD(i)}})},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&G(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=iF(e,t),r=0;rt[1]&&t.reverse(),t}function iF(t,e){return Yr(t,e,{includeMainTypes:tF})}var rF={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=Ct(),a={},s={};(n||i||r)&&(q(n,function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0}),q(i,function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0}),q(r,function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),o.each(function(t){var r=[];q(t.coordinateSystem.getCartesians(),function(t,e){(G(n,t.getAxis("x").model)>=0||G(i,t.getAxis("y").model)>=0)&&r.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:aF.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){q(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:aF.geo})})}},oF=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],aF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(yc(t)),e}},sF={lineX:tt(lF,0),lineY:tt(lF,1),rect:function(t,e,n){var i=e[JN[t]]([n[0][0],n[1][0]]),r=e[JN[t]]([n[0][1],n[1][1]]),o=[nF([i[0],r[0]]),nF([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:X(n,function(n){var r=e[JN[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r}),xyMinMax:i}}};function lF(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=nF(X([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var uF={lineX:tt(cF,0),lineY:tt(cF,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return X(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}};function cF(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function hF(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var dF,fF=eF,pF=q,gF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new gD(n.getZr()),this._brushController.on("brush",J(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new fF(vF(t),e,{include:["grid"]}).makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return KN(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){mF[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new fF(vF(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}}),function(t,e){var n=KN(t);XN(e,function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}}),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)}),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=fT(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];pF(t,function(t,n){e.push(F(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(MN),mF={zoom:function(){this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!this._isZoomActive})},back:function(){this._dispatchZoomAction(function(t){var e=KN(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return XN(n,function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}}),i}(this.ecModel))}};function vF(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}dF=function(t){var e=t.getComponent("toolbox",0);if(e){var n=e.getModel(["feature","dataZoom"]),i=[],r=Yr(t,vF(n));return pF(r.xAxisModels,function(t){return o(t,"xAxis","xAxisIndex")}),pF(r.yAxisModels,function(t){return o(t,"yAxis","yAxisIndex")}),i}function o(t,e,r){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:"\0_ec_\0toolbox-dataZoom_"+e+o};a[r]=o,i.push(a)}},_t(null==Rd.get("dataZoom")&&dF),Rd.set("dataZoom",dF);var yF=gF,_F=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(dd);function bF(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function wF(t){if(w.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(o+="top:50%",a+="translateY(-50%) rotate("+("left"===r?-225:-45)+"deg)"):(o+="left:50%",a+="translateX(-50%) rotate("+("top"===r?225:45)+"deg)");var s=e+" solid 1px;";return'
'}(n.get("backgroundColor"),i,r)),it(t))o.innerHTML=t;else if(t){o.innerHTML="",et(t)||(t=[t]);for(var a=0;a=0;o--){var a=t[o];a&&(a instanceof ih&&(a=a.get("tooltip",!0)),it(a)&&(a={formatter:a}),a&&(i=new ih(a,i,r)))}return i}function BF(t,e){return t.dispatchAction||J(e.dispatchAction,e)}function HF(t){return"center"===t||"middle"===t}var jF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){if(!w.node){var n,i=t.getComponent("tooltip"),r=i.get("renderMode");this._renderMode="auto"===(n=r)?w.domSupported?"html":"richText":n||"html",this._tooltipContent="richText"===this._renderMode?new RF(e):new DF(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!w.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");PR("itemTooltip",this._api,LF(function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!w.node){var r=BF(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i=qr(t).queryOptionMap,r=i.keys()[0];if(r&&"series"!==r){var o,a=Kr(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a)return n.getViewOfComponentModel(a).group.traverse(function(e){var n=Ls(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0}),o?{componentMainType:r,componentIndex:a.componentIndex,el:o}:void 0}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=VF;l.x=i.x,l.y=i.y,l.update(),Ls(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var u=VR(i,e),c=u.point[0],h=u.point[1];null!=c&&null!=h&&this._tryShow({offsetX:c,offsetY:h,target:u.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){!this._alwaysShowContent&&this._tooltipModel&&this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(BF(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===zF([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,Mm(n,function(t){return null!=Ls(t).dataIndex?(r=t,!0):null!=Ls(t).tooltipConfig?(o=t,!0):void 0},!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=J(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=[e.offsetX,e.offsetY],r=zF([e.tooltipOption],this._tooltipModel),o=this._renderMode,a=[],s=bp("section",{blocks:[],noHeader:!0}),l=[],u=new Tp;NF(t,function(t){NF(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var r=_R(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=bp("section",{header:r,noHeader:!bt(r),sortBlocks:!0,blocks:[]});s.blocks.push(c),q(t.seriesDataIndices,function(s){var h=n.getSeriesByIndex(s.seriesIndex),d=s.dataIndexInside,f=h.getDataParams(d);f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=_w(e.axis,{value:i}),f.axisValueLabel=r,f.marker=u.makeTooltipMarker("item",$h(f.color),o);var p=Yf(h.formatTooltip(d,!0,null));p.markupFragment&&c.blocks.push(p.markupFragment),p.markupText&&l.push(p.markupText),a.push(f)})}})}),s.blocks.reverse(),l.reverse();var c=e.position,h=r.get("order"),d=kp(s,u,o,h,n.get("useUTC"),r.get("textStyle"));d&&l.unshift(d);var f=l.join("richText"===o?"\n\n":"
");this._showOrMove(r,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(r,c,i[0],i[1],this._tooltipContent,a):this._showTooltipContent(r,f,a,Math.random()+"",i[0],i[1],c,null,u)})},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=Ls(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,c=s.getData(u),h=this._renderMode,d=t.positionDefault,f=zF([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=f.get("trigger");if(null==p||"item"===p){var g=s.getDataParams(l,u),m=new Tp;g.marker=m.makeTooltipMarker("item",$h(g.color),h);var v=Yf(s.formatTooltip(l,!1,u)),y=f.get("order"),_=v.markupFragment?kp(v.markupFragment,m,h,y,i.get("useUTC"),f.get("textStyle")):v.markupText,b="item_"+s.name+"_"+l;this._showOrMove(f,function(){this._showTooltipContent(f,_,g,b,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=Ls(e),r=i.tooltipConfig.option;it(r)&&(r={content:r,formatter:r});var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a);var s=t.positionDefault,l=zF(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",h=new Tp;this._showOrMove(l,function(){var n=F(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,t.offsetX,t.offsetY,t.position,e,h)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,c=t.get("formatter");a=a||t.get("position");var h=e,d=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(c&&it(c)){var f=t.ecModel.get("useUTC"),p=et(n)?n[0]:n;h=c,p&&p.axisType&&p.axisType.indexOf("time")>=0&&(h=wh(p.axisValue,h,f)),h=qh(h,n,!0)}else if(nt(c)){var g=LF(function(e,i){e===this._ticket&&(u.setContent(i,l,t,d,a),this._updatePosition(t,a,r,o,u,n,s))},this);this._ticket=i,h=c(n,i,g)}u.setContent(h,l,t,d,a),u.show(t,d),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||et(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:et(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),c=t.get("align"),h=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),nt(e)&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),et(e))n=FF(e[0],s),i=FF(e[1],l);else if(at(e)){var f=e;f.width=u[0],f.height=u[1];var p=rd(f,{width:s,height:l});n=p.x,i=p.y,c=null,h=null}else if(it(e)&&a){var g=function(t,e,n){var i=n[0],r=n[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-10;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+10;break;case"left":o=e.x-i-10-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+10+5,a=e.y+l/2-r/2}return[o,a]}(e,d,u);n=g[0],i=g[1]}else g=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o+2>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}(n,i,r,s,l,c?null:20,h?null:20),n=g[0],i=g[1];c&&(n-=HF(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=HF(h)?u[1]/2:"bottom"===h?u[1]:0),bF(t)&&(g=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,[t=Math.max(t,0),e=Math.max(e,0)]}(n,i,r,s,l),n=g[0],i=g[1]),r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&NF(e,function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&NF(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&NF(r,function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){w.node||(this._tooltipContent.dispose(),NR("itemTooltip",e))},e.type="tooltip",e}(Gp),GF=["rect","polygon","keep","clear"];function UF(t,e){var n=Pr(t?t.brush:[]);if(n.length){var i=[];q(n,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))});var r=t&&t.toolbox;et(r)&&(r=r[0]),r||(t.toolbox=[r={feature:{}}]);var o,a,s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),u=l.type||(l.type=[]);u.push.apply(u,i),a={},q(o=u,function(t){a[t]=1}),o.length=0,q(a,function(t,e){o.push(e)}),e&&!u.length&&u.push.apply(u,GF)}}var WF=q;function YF(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function qF(t,e,n){var i={};return WF(e,function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);WF(t[e],function(t,i){if(gM.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new gM(r),"opacity"===i&&((r=F(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new gM(r))}})}),i}function XF(t,e,n){var i;q(n,function(t){e.hasOwnProperty(t)&&YF(e[t])&&(i=!0)}),i&&q(n,function(n){e.hasOwnProperty(n)&&YF(e[n])?t[n]=F(e[n]):delete t[n]})}var ZF={lineX:KF(0),lineY:KF(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Ov(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(Ov(i,r,o)||Ov(i,r+a,o)||Ov(i,r,o+s)||Ov(i,r+a,o+s)||$n.create(t).contain(l[0],l[1])||Ac(r,o,r+a,o,i)||Ac(r,o,r,o+s,i)||Ac(r+a,o,r+a,o+s,i)||Ac(r,o+s,r+a,o+s,i))||void 0}}};function KF(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e)return $F(e[t],i.range)},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&oV(e)}};function oV(t){return new $n(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var aV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,(this._brushController=new gD(e.getZr())).on("brush",J(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){tV(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:F(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:F(n),$from:e})},e.type="brush",e}(Gp);function sV(t,e){return V({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ih(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var lV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return m(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&XF(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=X(t,function(t){return sV(this.option,t)},this))},e.prototype.setBrushOption=function(t){this.brushOption=sV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(dd),uV=["rect","polygon","lineX","lineY","keep","clear"],cV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length}),this._brushType=i,this._brushMode=r,q(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return q(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:uV.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocale(["toolbox","brush","title"])}},e}(MN),hV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return m(e,t),e.type="title",e.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(dd),dV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=gt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Rs({style:Lc(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),h=new Rs({style:Lc(o,{text:c,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,h.silent=!f&&!p,d&&l.on("click",function(){Qh(d,"_"+t.get("target"))}),f&&h.on("click",function(){Qh(f,"_"+t.get("subtarget"))}),Ls(l).eventData=Ls(h).eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=rd(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),h.setStyle(y),g=i.getBoundingRect();var _=v.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var w=new ks({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(w)}},e.type="title",e}(Gp),fV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return m(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],q(n,function(e,n){var i,o=Br(Nr(e),"");at(e)?(i=F(e)).value=n:i=n,t.push(i),r.push(o)})):t=n,(this._data=new ob([{name:"value",type:{category:"ordinal",time:"time",value:"number"}[i]||"number"}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(dd),pV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="timeline.slider",e.defaultOption=ah(fV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(fV);W(pV,Wf.prototype);var gV=pV,mV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="timeline",e}(Gp),vV=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return m(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(zw),yV=Math.PI,_V=Ur();function bV(t,e,n,i,r,o){var a=e.get("color");r?(r.setColor(a),n.add(r),o&&o.onUpdate(r)):((r=Vm(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(r),o&&o.onCreate(r));var s=e.getItemStyle(["color"]);r.setStyle(s),i=V({rectHover:!0,z2:100},i,!0);var l=t.get("symbolSize");l=l instanceof Array?l.slice():[+l,+l],i.scaleX=l[0]/2,i.scaleY=l[1]/2;var u=t.get("symbolOffset");u&&(i.x=i.x||0,i.y=i.y||0,i.x+=cr(u[0],l[0]),i.y+=cr(u[1],l[1]));var c=t.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,r.attr(i),r.updateTransform(),r}function wV(t,e,n,i,r,o){if(!t.dragging){var a=r.getModel("checkpointStyle"),s=i.dataToCoord(r.getData().get("value",n));if(o||!a.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}var xV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return bp("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},q(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](i,r,a,t)},this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:yV/2},d="vertical"===s?l.height:l.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=t.get(["label","rotate"])||0;y=y*yV/180;var _=f.get("position",!0),b=p&&f.get("showPlayBtn",!0),w=p&&f.get("showPrevBtn",!0),x=p&&f.get("showNextBtn",!0),k=0,S=d;"left"===_||"bottom"===_?(b&&(i=[0,0],k+=v),w&&(r=[k,0],k+=v),x&&(o=[S-g,0],S-=v)):(b&&(i=[S-g,0],S-=v),w&&(r=[0,0],k+=v),x&&(o=[S-g,0],S-=v));var C=[k,S];return t.get("inverse")&&C.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:h[s],labelRotation:y,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||c[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:C,controlSize:g,controlGap:m}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;Ne(o,o,[-a,-s]),Fe(o,o,-yV/2),Ne(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=m(r),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=[n.x,n.y],d=[i.x,i.y];d[0]=h[0]=l[0][0];var f,p=t.labelPosOpt;function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}null==p||it(p)?(v(h,u,l,1,f="+"===p?0:1),v(d,c,l,1,1-f)):(v(h,u,l,1,f=p>=0?0:1),d[1]=h[1]+p),n.setPosition(h),i.setPosition(d),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Ab({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new $b({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Tb}}(e,i);r.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var a=new vV("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new Qi;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new Du({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:B({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new Du({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:H({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],q(a,function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),h={x:a,y:0,onclick:J(r._changeTimeline,r,t.value)},d=bV(s,l,e,h);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=c.getItemStyle(),xl(d);var f=Ls(d);s.get("tooltip")?(f.dataIndex=t.value,f.dataModel=i):f.dataIndex=f.dataModel=null,r._tickSymbols.push(d)})},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],q(a,function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),h=n.dataToCoord(i.tickValue),d=new Rs({x:h,y:0,rotation:t.labelRotation-t.rotation,onclick:J(r._changeTimeline,r,a),silent:!1,style:Lc(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=Lc(u),d.ensureState("progress").style=Lc(c),e.add(d),xl(d),_V(d).dataIndex=a,r._tickLabels.push(d)})}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(t,n,l,u){if(t){var c=ai(gt(i.get(["controlStyle",n+"BtnSize"]),r),r),h=function(t,e,n,i){var r=i.style,o=Cc(t.get(["controlStyle",e]),i||{},new $n(n[0],n[1],n[2],n[3]));return r&&o.setStyle(r),o}(i,n+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});h.ensureState("emphasis").style=s,e.add(h),xl(h)}}c(t.nextBtnPosition,"next",J(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",J(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",J(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this;this._currentPointer=bV(a,a,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=J(s._handlePointerDrag,s),t.ondragend=J(s._handlePointerDragend,s),wV(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){wV(t,s._progressLine,o,n,i)}})},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=dr(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(h)),[a,c]}var PV={min:tt(OV,"min"),max:tt(OV,"max"),average:tt(OV,"average"),median:tt(OV,"median")};function RV(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!et(e.coord)&&i){var r=i.dimensions,o=LV(e,n,i,t);if((e=F(e)).type&&PV[e.type]&&o.baseAxis&&o.valueAxis){var a=G(r,o.baseAxis.dim),s=G(r,o.valueAxis.dim),l=PV[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;c<2;c++)PV[u[c]]&&(u[c]=VV(n,n.mapDimension(r[c]),u[c]));e.coord=u}}return e}function LV(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0&&"number"==typeof l&&(l=+l.toFixed(Math.min(p,20))),d.coord[c]=f.coord[c]=l,r=[d,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[RV(t,r[0]),RV(t,r[1]),B({},r[2])];return g[2].type=g[2].type||null,V(g[2],g[0]),V(g[2],g[1]),g};function YV(t){return!isNaN(t)&&!isFinite(t)}function qV(t,e,n,i){var r=1-t,o=i.dimensions[t];return YV(e[r])&&YV(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function XV(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(qV(1,n,i,t)||qV(0,n,i,t)))return!0}return NV(t,e[0])&&NV(t,e[1])}function ZV(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=cr(s.get("x"),r.getWidth()),u=cr(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=t.get((d=a.dimensions)[0],e),h=t.get(d[1],e);o=a.dataToPoint([c,h])}if(dk(a,"cartesian2d")){var d,f=a.getAxis("x"),p=a.getAxis("y");YV(t.get((d=a.dimensions)[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):YV(t.get(d[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var KV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=DV.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=UV(e).from,o=UV(e).to;r.each(function(e){ZV(r,e,!0,t,n),ZV(o,e,!1,t,n)}),i.each(function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new bI);this.group.add(l.group);var u=function(t,e,n){var i;i=t?X(t&&t.dimensions,function(t){return H({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new ob(i,n),o=new ob(i,n),a=new ob([],n),s=X(n.get("data"),tt(WV,e,t,n));t&&(s=K(s,tt(XV,t)));var l=t?FV:function(t){return t.value};return r.initData(X(s,function(t){return t[0]}),null,l),o.initData(X(s,function(t){return t[1]}),null,l),a.initData(X(s,function(t){return t[2]})),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),c=u.from,h=u.to,d=u.line;UV(e).from=c,UV(e).to=h,e.setData(d);var f=e.get("symbol"),p=e.get("symbolSize"),g=e.get("symbolRotate"),m=e.get("symbolOffset");function v(e,n,r){var o=e.getItemModel(n);ZV(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=jg(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:gt(o.get("symbolOffset"),m[r?0:1]),symbolRotate:gt(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:gt(o.get("symbolSize"),p[r?0:1]),symbol:gt(o.get("symbol",!0),f[r?0:1]),style:s})}et(f)||(f=[f,f]),et(p)||(p=[p,p]),et(g)||(g=[g,g]),et(m)||(m=[m,m]),u.from.each(function(t){v(c,t,!0),v(h,t,!1)}),d.each(function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[c.getItemLayout(t),h.getItemLayout(t)]),null==e.stroke&&(e.stroke=c.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(t,"symbolOffset"),fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(t,"symbolOffset"),toSymbolRotate:h.getItemVisual(t,"symbolRotate"),toSymbolSize:h.getItemVisual(t,"symbolSize"),toSymbol:h.getItemVisual(t,"symbol"),style:e})}),l.updateData(d),u.line.eachItemGraphicEl(function(t,n){t.traverse(function(t){Ls(t).dataModel=e})}),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(BV),$V=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(DV),QV=Ur(),JV=function(t,e,n,i){var r=RV(t,i[0]),o=RV(t,i[1]),a=r.coord,s=o.coord;a[0]=pt(a[0],-1/0),a[1]=pt(a[1],-1/0),s[0]=pt(s[0],1/0),s[1]=pt(s[1],1/0);var l=z([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function tz(t){return!isNaN(t)&&!isFinite(t)}function ez(t,e,n,i){var r=1-t;return tz(e[r])&&tz(n[r])}function nz(t,e){var n=e.coord[0],i=e.coord[1];return!!(dk(t,"cartesian2d")&&n&&i&&(ez(1,n,i)||ez(0,n,i)))||NV(t,{coord:n,x:e.x0,y:e.y0})||NV(t,{coord:i,x:e.x1,y:e.y1})}function iz(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=cr(s.get(n[0]),r.getWidth()),u=cr(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var c=[f=t.get(n[0],e),p=t.get(n[1],e)];a.clampData&&a.clampData(c,c),o=a.dataToPoint(c,!0)}if(dk(a,"cartesian2d")){var h=a.getAxis("x"),d=a.getAxis("y"),f=t.get(n[0],e),p=t.get(n[1],e);tz(f)?o[0]=h.toGlobalCoord(h.getExtent()["x0"===n[0]?0:1]):tz(p)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var rz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],oz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=DV.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each(function(e){var r=X(rz,function(r){return iz(i,e,r,t,n)});i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)})}},this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Qi});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r;t?(i=X(t&&t.dimensions,function(t){var n=e.getData();return H({name:t},n.getDimensionInfo(n.mapDimension(t))||{})}),r=new ob(X(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),n)):r=new ob(i=[{name:"value",type:"float"}],n);var o=X(n.get("data"),tt(JV,e,t,n));return t&&(o=K(o,tt(nz,t))),r.initData(o,null,t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value}),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each(function(e){var n=X(rz,function(n){return iz(u,e,n,t,i)}),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),h=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];dr(h),dr(d),u.setItemLayout(e,{points:n,allClipped:!!(l[0]>h[1]||l[1]d[1]||c[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolSize:"auto",inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",decal:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(dd),sz=tt,lz=q,uz=Qi;function cz(t,e,n,i){fz(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),dz(t,e,n,i)}function hz(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i0?2:0:u[h]=g}var d=e.getModel("lineStyle"),f=Kc.concat([["inactiveColor"],["inactiveWidth"]]),p={};for(c=0;c0?2:0:p[h]=g}if("auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!a){var m=e.get("inactiveBorderWidth"),v=u[t.indexOf("empty")>-1?"fill":"stroke"];u.lineWidth="auto"===m?r.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=n.get("inactiveColor"),p.lineWidth=n.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=y||l||"roundRect",i,r.getModel("lineStyle"),a,s,f,m),b=new uz,w=i.getModel("textStyle");b.add("function"!=typeof t.getLegendIcon||y?((d=Vm(h=(c={itemWidth:p,itemHeight:g,symbolType:l,symbolKeepAspect:v,itemStyle:_.itemStyle,lineStyle:_.lineStyle}).symbolType||"roundRect",0,0,c.itemWidth,c.itemHeight,c.itemStyle.fill,c.symbolKeepAspect)).setStyle(c.itemStyle),h.indexOf("empty")>-1&&(d.style.stroke=d.style.fill,d.style.fill="#fff",d.style.lineWidth=2),d):t.getLegendIcon({itemWidth:p,itemHeight:g,symbolType:l,symbolKeepAspect:v,itemStyle:_.itemStyle,lineStyle:_.lineStyle}));var x="left"===o?p+5:-5,k=o,S=r.get("formatter"),C=e;"string"==typeof S&&S?C=S.replace("{name}",null!=e?e:""):"function"==typeof S&&(C=S(e));var A=i.get("inactiveColor");b.add(new Rs({style:Lc(w,{text:C,x:x,y:g/2,fill:m?w.getTextColor():A,align:k,verticalAlign:"middle"})}));var M=new ks({shape:b.getBoundingRect(),invisible:!0}),I=i.getModel("tooltip");return I.get("show")&&Tc({el:M,componentModel:r,itemName:e,itemTooltipOption:I.option}),b.add(M),b.eachChild(function(t){t.silent=!0}),M.silent=!u,this.getContentGroup().add(b),xl(b),b.__legendDataIndex=n,b},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();id(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){id("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?h[f]+=l[p]+d:u[f]+=c[p]+d,h[1-f]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[p]=l[p]+d+c[p],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-f]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Gp);function gz(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;nn[r],p=[-h.x,-h.y];e||(p[i]=l[s]);var g=[0,0],m=[-d.x,-d.y],v=gt(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?m[i]+=n[r]-d[r]:g[i]+=d[r]+v),m[1-i]+=h[o]/2-d[o]/2,l.setPosition(p),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[r]=f?n[r]:h[r],y[o]=Math.max(h[o],d[o]),y[a]=Math.min(0,d[a]+m[1-i]),u.__rectSize=n[r],f){var _={x:0,y:0};_[r]=Math.max(n[r]-d[r]-v,0),_[o]=y[o],u.setClipPath(new ks({shape:_})),u.__rectSize=_[r]}else c.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(t);return null!=b.pageIndex&&dc(l,{x:b.contentPosition[0],y:b.contentPosition[1]},f?t:null),this._updatePageInfoView(t,b),y},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;q(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",t.get(r?"pageIconColor":"pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",it(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=wz[r],a=xz[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=c;++p)(!(v=y(l[p]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;p>=-1;--p)(v=y(l[p]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild(function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)}),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(pz);function Sz(t){I_(vz),t.registerComponentModel(_z),t.registerComponentView(kz),function(t){t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})}(t)}var Cz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="dataZoom.inside",e.defaultOption=ah(mN.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(mN),Az=Ur();function Mz(t,e,n){Az(t).coordSysRecordMap.each(function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)})}function Iz(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function Tz(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Dz(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}var Ez=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return m(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Mz(i,e,{pan:J(Oz.pan,this),zoom:J(Oz.zoom,this),scrollMove:J(Oz.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=Az(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return fT(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:Pz(function(t,e,n,i,r,o){var a=Rz[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength}),scrollMove:Pz(function(t,e,n,i,r,o){return Rz[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta})};function Pz(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return fT(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var Rz={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},Lz=Ez;function Nz(t){CN(t),t.registerComponentModel(Cz),t.registerComponentView(Lz),function(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=Az(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=Ct());i.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(t){q(fN(t).infoList,function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:tt(Dz,e),dispatchAction:tt(Tz,t),dataZoomInfoMap:null,controller:null},i=n.controller=new kC(t.getZr());return q(["pan","zoom","scrollMove"],function(t){i.on(t,function(e){var i=[];n.dataZoomInfoMap.each(function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}}),i.length&&n.dispatchAction(i)})}),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Ct())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})})}),i.each(function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each(function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),rg(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else Iz(i,t)})})}(t)}var Fz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ah(mN.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(mN),Vz=ks,zz="horizontal",Bz="vertical",Hz=["line","bar","candlestick","scatter"],jz={easing:"cubicOut",duration:100};function Gz(t){return"vertical"===t?"ns-resize":"ew-resize"}var Uz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return m(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=J(this._onBrush,this),this._onBrushEnd=J(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),rg(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){var t;(t=this._dispatchZoomAction)&&t[tg]&&(this._dispatchZoomAction=t[tg]);var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new Qi;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===zz?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=ld(t.option);q(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var s=rd(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===Bz&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==zz||r?n===zz&&r?{scaleY:a?1:-1,scaleX:-1}:n!==Bz||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Vz({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new Vz({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:J(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[[e[0],0],[0,0]],c=[],h=e[0]/(i.count()-1),d=0,f=Math.round(i.count()/e[0]);i.each([r],function(t,e){if(f>0&&e%f)d+=h;else{var n=null==t||isNaN(t)||""===t,i=n?0:ur(t,o,l,!0);n&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!n&&s&&(u.push([d,0]),c.push([d,0])),u.push([d,i]),c.push([d,i]),d+=h,s=n}});for(var p=this.dataZoomModel,g=0;g<3;g++){var m=v(1===g);this._displayables.sliderGroup.add(m),this._displayables.dataShadowSegs.push(m)}}}function v(t){var e=p.getModel(t?"selectedDataBackground":"dataBackground"),n=new Qi,i=new ku({shape:{points:u},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Au({shape:{points:c},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis(function(r,o){q(t.getAxisProxy(r,o).getTargetSeriesModels(),function(t){if(!(n||!0!==e&&G(Hz,t.get("type"))<0)){var a,s=i.getComponent(dN(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new Vz({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new Vz({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),q([0,1],function(e){var o=a.get("handleIcon");!Lm[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Vm(o,-1,0,2,2,null,!0);s.attr({cursor:Gz(this._orient),draggable:!0,drift:J(this._onDragMove,this,e),ondragend:J(this._onDragEnd,this),onmouseover:J(this._showDataInfo,this,!0),onmouseout:J(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=cr(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),xl(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[e]=s);var h=a.getModel("textStyle");t.add(i[e]=new Rs({silent:!0,invisible:!0,style:Lc(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))},this);var h=c;if(u){var d=cr(a.get("moveHandleSize"),o[1]),f=e.moveHandle=new ks({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),p=.8*d,g=e.moveHandleIcon=Vm(a.get("moveHandleIcon"),-p/2,-p/2,p,p,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(d,10));(h=e.moveZone=new ks({invisible:!0,shape:{y:o[1]-m,height:d+m}})).on("mouseover",function(){s.enterEmphasis(f)}).on("mouseout",function(){s.leaveEmphasis(f)}),r.add(f),r.add(g),r.add(h)}h.attr({draggable:!0,cursor:Gz(this._orient),drift:J(this._onDragMove,this,"all"),ondragstart:J(this._showDataInfo,this,!0),ondragend:J(this._onDragEnd,this),onmouseover:J(this._showDataInfo,this,!0),onmouseout:J(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[ur(t[0],[0,100],e,!0),ur(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];fT(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?ur(o.minSpan,a,r,!0):null,null!=o.maxSpan?ur(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=dr([ur(i[0],r,a,!0),ur(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=dr(n.slice()),r=this._size;q([0,1],function(t){var i=this._handleHeight;e.handles[t].attr({scaleX:i/2,scaleY:i/2,x:n[t]+(t?-1:1),y:r[1]/2-i/2})},this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=this._updateInterval("all",n[0]-(i[0]+i[1])/2);this._updateView(),r&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){this._brushStart=new jn(t.offsetX,t.offsetY),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=dr([ur(n.x,i,r,!0),ur(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ye(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=n.brushRect;i||(i=n.brushRect=new Vz({silent:!0,style:this.dataZoomModel.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var r=this._brushStart,o=this._displayables.sliderGroup,a=o.transformCoordToLocal(t,e),s=o.transformCoordToLocal(r.x,r.y),l=this._size;a[0]=Math.max(Math.min(l[0],a[0]),0),i.setShape({x:s[0],y:0,width:a[0]-s[0],height:l[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?jz:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=fN(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(yN);function Wz(t){t.registerComponentModel(Fz),t.registerComponentView(Uz),CN(t)}var Yz={get:function(t,e,n){var i=F((qz[t]||{})[e]);return n&&et(i)?i[i.length-1]:i}},qz={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Xz=Yz,Zz=gM.mapVisual,Kz=gM.eachVisual,$z=et,Qz=q,Jz=dr,tB=ur,eB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return m(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;w.canvasSupported||(n.realtime=!1),!e&&XF(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=J(t,this),this.controllerVisuals=qF(this.option.controller,e,t),this.targetVisuals=qF(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,n){e.push(n)}):e=Pr(t),e},e.prototype.eachTargetSeries=function(t,e){q(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)},this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries(function(n){n===t&&(e=!0)}),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],et(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return it(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):nt(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=Jz([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimension=function(t){var e=this.option.dimension;if(null!=e||t.dimensions.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i];if(!t.getDimensionInfo(r).isCalculationCoord)return r}}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});V(i,n),V(r,n);var o=this.isCategory();function a(n){$z(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),(function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},Qz(i,function(t,e){if(gM.isValidType(e)){var n=Xz.get(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}).call(this,i,"inRange","outOfRange"),(function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";Qz(this.stateList,function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&F(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&F(n)||(o?s[0]:[s[0],s[0]])),l.symbol=Zz(l.symbol,function(t){return"none"===t?r:t});var u=l.symbolSize;if(null!=u){var c=-1/0;Kz(u,function(t){t>c&&(c=t)}),l.symbolSize=Zz(u,function(t){return tB(t,[0,c],[0,s[0]],!0)})}},this)}).call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(dd),nB=[20,140];function iB(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,r=n[0],o=[],a=0;a<=200&&re[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),q(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=dr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries(function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)},this),e.push({seriesId:n.id,dataIndex:i})},this),e},e.prototype.getVisualMeta=function(t){var e=iB(0,0,this.getExtent()),n=iB(0,0,this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Qi("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();cB([0,1],function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var c=uB(t[l],[0,a[1]],s,!0),h=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=h/a[0],u.x=a[0]-h/2;var d=_c(n.handleLabelPoints[l],yc(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),h=this.getControllerVisual(t,"symbolSize"),d=uB(t,o,s,!0),f=a[0]-h/2,p={x:u.x,y:u.y};u.y=d,u.x=f;var g=_c(l.indicatorLabelPoint,yc(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var _={x:f,y:d,style:{fill:c}},b={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=p.x,u.y=p.y,u.animateTo(_,w),m.animateTo(b,w)}else u.attr(_),m.attr(b);this._firstShowIndicator=!1;var x=this._shapes.handleLabels;if(x)for(var k=0;ki[1]&&(l[1]=1/0),e&&(l[0]===-1/0?this._showIndicator(s,l[1],"< ",o):l[1]===1/0?this._showIndicator(s,l[0],"> ",o):this._showIndicator(s,s,"\u2248 ",o));var u=this._hoverLinkDataIndices,c=[];(e||pB(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var h=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),t.registerAction(vB,yB),q(_B,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(xB))}function AB(t){t.registerComponentModel(rB),t.registerComponentView(mB),CB(t)}var MB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return m(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],IB[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=F(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=X(this._pieceList,function(t){return t=F(t),"inRange"!==e&&(t.visual=null),t}))})},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=gM.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}q(e.pieces,function(t){q(i,function(e){t.hasOwnProperty(e)&&(n[e]=1)})}),q(n,function(t,n){var i=!1;q(this.stateList,function(t){i=i||o(e,t,n)||o(e.target,t,n)},this),!i&&q(this.stateList,function(t){(e[t]||(e[t]={}))[n]=Xz.get(n,"inRange"===t?"active":"inactive",r)})},this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,q(i,function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)},this),"single"===n.selectedMode){var o=!1;q(i,function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=F(t)},e.prototype.getValueState=function(t){var e=gM.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries(function(i){var r=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){gM.findPieceIndex(e,n)===t&&r.push(i)},this),e.push({seriesId:i.id,dataIndex:r})},this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return q(r,function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])},this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=ah(eB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(eB),IB={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","\u2265"][e[0]]])},this)}};function TB(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var DB=MB,EB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,c=pt(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,c,a),q(l.viewPieceList,function(i){var l=i.piece,u=new Qi;u.onclick=J(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=e.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new Rs({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===d?.5:1}}))}t.add(u)},this),u&&this._renderEndsText(t,u[1],s,c,a),id(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:lB(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return sB(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new Qi,a=this.visualMapModel.textStyleModel;o.add(new Rs({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=X(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(Vm(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=F(n.selected),r=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[r]=!0,q(i,function(t,e){i[e]=e===r})):i[r]=!i[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},e.type="visualMap.piecewise",e}(oB);function OB(t){t.registerComponentModel(DB),t.registerComponentView(EB),CB(t)}var PB={label:{enabled:!0},decal:{show:!1}},RB=Ur(),LB={};function NB(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=F(PB);V(i.label,t.getLocaleModel().get("aria"),!1),V(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=Ct();t.eachSeries(function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||e.set(t.type,n={}),RB(t).scope=n}}),t.eachRawSeries(function(e){if(!t.isSeriesFiltered(e))if("function"!=typeof e.enableAriaDecal){var n=e.getData();if(e.useColorPaletteOnData){var i=e.getRawData(),r={},o=RB(e).scope;n.each(function(t){var e=n.getRawIndex(t);r[e]=t});var a=i.count();i.each(function(t){var s=r[t],l=i.getName(t)||t+"",c=Vd(e.ecModel,l,o,a),h=n.getItemVisual(s,"decal");n.setItemVisual(s,"decal",u(h,c))})}else{var s=Vd(e.ecModel,e.name,LB,t.getSeriesCount()),l=n.getVisual("decal");n.setVisual("decal",u(l,s))}}else e.enableAriaDecal();function u(t,e){var n=t?B(B({},e),t):e;return n.dirty=!0,n}})}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=H(o.option,i),o.get("enabled")){var a=e.getZr().dom;if(o.get("description"))a.setAttribute("aria-label",o.get("description"));else{var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,c=o.get(["series","maxCount"])||10,h=Math.min(l,c);if(!(l<1)){var d=function(){var e=t.get("title");return e&&e.length&&(e=e[0]),e&&e.text}();s=d?r(o.get(["general","withTitle"]),{title:d}):o.get(["general","withoutTitle"]);var f=[];s+=r(o.get(l>1?["series","multiple","prefix"]:["series","single","prefix"]),{seriesCount:l}),t.eachSeries(function(e,n){if(n1?["series","multiple",a]:["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"\u81ea\u5b9a\u4e49\u56fe")});var s=e.getData();s.count()>u?i+=r(o.get(["data","partialData"]),{displayCnt:u}):i+=o.get(["data","allData"]);for(var c=[],d=0;d":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},zB=function(){function t(t){null==(this._condVal=it(t)?new RegExp(t):dt(t)?t:null)&&Kf("")}return t.prototype.evaluate=function(t){var e=typeof t;return"string"===e?this._condVal.test(t):"number"===e&&this._condVal.test(t+"")},t}(),BB=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),HB=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e=200&&e.status<=299}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype?function(t,e,n){var s=i.URL||i.webkitURL,l=document.createElement("a");l.download=e=e||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin!==location.origin?o(l.href)?r(t,e,n):a(l,l.target="_blank"):a(l)):(l.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){a(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(o(t))r(t,e,n);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){a(i)})}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var a="application/octet-stream"===t.type,s=/constructor/i.test(i.HTMLElement)||i.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&s)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},u.readAsDataURL(t)}else{var c=i.URL||i.webkitURL,h=c.createObjectURL(t);o?o.location=h:location.href=h,o=null,setTimeout(function(){c.revokeObjectURL(h)},4e4)}});i.saveAs=s.saveAs=s,t.exports=s},ls82:function(t,e,n){var i=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(E){l=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=Object.create((e&&e.prototype instanceof m?e:m).prototype),o=new I(i||[]);return r._invoke=function(t,e,n){var i=h;return function(r,o){if(i===f)throw new Error("Generator is already running");if(i===p){if("throw"===r)throw o;return D()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var l=c(t,e,n);if("normal"===l.type){if(i=n.done?p:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=p,n.method="throw",n.arg=l.arg)}}}(t,n,o),r}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(E){return{type:"throw",arg:E}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",f="executing",p="completed",g={};function m(){}function v(){}function y(){}var _={};_[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==n&&i.call(w,o)&&(_=w);var x=y.prototype=m.prototype=Object.create(_);function k(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function S(t,e){function n(r,o,a,s){var l=c(t[r],t,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==typeof h&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,a,s)},function(t){n("throw",t,a,s)}):e.resolve(h).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,s)})}s(l.arg)}var r;this._invoke=function(t,i){function o(){return new e(function(e,r){n(t,i,e,r)})}return r=r?r.then(o,o):o()}}function C(t,n){var i=t.iterator[n.method];if(i===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=c(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,g;var o=r.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;M(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:T(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=i}catch(r){Function("r","regeneratorRuntime = r")(i)}},o0o1:function(t,e,n){t.exports=n("ls82")},zUnb:function(t,e,n){"use strict";function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}(t,e)||m(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e,n){return(w=c()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&l(r,n.prototype),r}).apply(null,arguments)}function x(t){var e="function"==typeof Map?new Map:void 0;return(x=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return w(t,arguments,i(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,t)})(t)}n.r(e);var k=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}();function S(t){return null!==t&&"object"==typeof t}function C(t){return"function"==typeof t}var A=function(){function t(t){return Error.call(this),this.message=t?"".concat(t.length," errors occurred during unsubscription:\n").concat(t.map(function(t,e){return"".concat(e+1,") ").concat(t.toString())}).join("\n ")):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),M=function(){var t=function(){function t(e){o(this,t),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return s(t,[{key:"unsubscribe",value:function(){var e;if(!this.closed){var n=this._parentOrParents,i=this._ctorUnsubscribe,r=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof e?function(i){return i.pipe(st(function(n,i){return it(t(n,i)).pipe(q(function(t,r){return e(n,t,i,r)}))},n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new lt(t,n))})}var lt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;o(this,t),this.project=e,this.concurrent=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new ut(t,this.project,this.concurrent))}}]),t}(),ut=function(t){u(n,t);var e=p(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return o(this,n),(r=e.call(this,t)).project=i,r.concurrent=a,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return s(n,[{key:"_next",value:function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(ot);function ct(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return st(F,t)}function ht(t,e){return e?nt(t,e):new z(K(t))}function dt(){for(var t=Number.POSITIVE_INFINITY,e=null,n=arguments.length,i=new Array(n),r=0;r1&&"number"==typeof i[i.length-1]&&(t=i.pop())):"number"==typeof o&&(t=i.pop()),null===e&&1===i.length&&i[0]instanceof z?i[0]:ct(t)(ht(i,e))}function ft(){return function(t){return t.lift(new pt(t))}}var pt=function(){function t(e){o(this,t),this.connectable=e}return s(t,[{key:"call",value:function(t,e){var n=this.connectable;n._refCount++;var i=new gt(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),t}(),gt=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).connectable=i,r}return s(n,[{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null}}]),n}(R),mt=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).source=t,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return s(n,[{key:"_subscribe",value:function(t){return this.getSubject().subscribe(t)}},{key:"getSubject",value:function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new M).add(this.source.subscribe(new yt(this.getSubject(),this))),t.closed&&(this._connection=null,t=M.EMPTY)),t}},{key:"refCount",value:function(){return ft()(this)}}]),n}(z),vt=function(){var t=mt.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),yt=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).connectable=i,r}return s(n,[{key:"_error",value:function(t){this._unsubscribe(),r(i(n.prototype),"_error",this).call(this,t)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),r(i(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}]),n}(G);function _t(){return new U}function bt(t){for(var e in t)if(t[e]===bt)return e;throw Error("Could not find renamed property on target object.")}function wt(t,e){for(var n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function xt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(xt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function kt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}var St=bt({__forward_ref__:bt});function Ct(t){return t.__forward_ref__=Ct,t.toString=function(){return xt(this())},t}function At(t){return Mt(t)?t():t}function Mt(t){return"function"==typeof t&&t.hasOwnProperty(St)&&t.__forward_ref__===Ct}var It=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,function(t,e){var n=t?"NG0".concat(t,": "):"";return"".concat(n).concat(e)}(t,i))).code=t,r}return n}(x(Error));function Tt(t){return"string"==typeof t?t:null==t?"":String(t)}function Dt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Tt(t)}function Et(t,e){var n=e?" in ".concat(e):"";throw new It("201","No provider for ".concat(Dt(t)," found").concat(n))}function Ot(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Pt(t){return{providers:t.providers||[],imports:t.imports||[]}}function Rt(t){return Lt(t,Vt)||Lt(t,Bt)}function Lt(t,e){return t.hasOwnProperty(e)?t[e]:null}function Nt(t){return t&&(t.hasOwnProperty(zt)||t.hasOwnProperty(Ht))?t[zt]:null}var Ft,Vt=bt({"\u0275prov":bt}),zt=bt({"\u0275inj":bt}),Bt=bt({ngInjectableDef:bt}),Ht=bt({ngInjectorDef:bt}),jt=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function Gt(){return Ft}function Ut(t){var e=Ft;return Ft=t,e}function Wt(t,e,n){var i=Rt(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:n&jt.Optional?null:void 0!==e?e:void Et(xt(t),"Injector")}function Yt(t){return{toString:t}.toString()}var qt=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),Xt=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),Zt="undefined"!=typeof globalThis&&globalThis,Kt="undefined"!=typeof window&&window,$t="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Qt="undefined"!=typeof global&&global,Jt=Zt||Qt||Kt||$t,te={},ee=[],ne=[],ie=bt({"\u0275cmp":bt}),re=bt({"\u0275dir":bt}),oe=bt({"\u0275pipe":bt}),ae=bt({"\u0275mod":bt}),se=bt({"\u0275loc":bt}),le=bt({"\u0275fac":bt}),ue=bt({__NG_ELEMENT_ID__:bt}),ce=0;function he(t){return Yt(function(){var e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===qt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||ne,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Xt.Emulated,id:"c",styles:t.styles||ne,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,o=t.pipes;return n.id+=ce++,n.inputs=me(t.inputs,e),n.outputs=me(t.outputs),r&&r.forEach(function(t){return t(n)}),n.directiveDefs=i?function(){return("function"==typeof i?i():i).map(de)}:null,n.pipeDefs=o?function(){return("function"==typeof o?o():o).map(fe)}:null,n})}function de(t){return _e(t)||function(t){return t[re]||null}(t)}function fe(t){return function(t){return t[oe]||null}(t)}var pe={};function ge(t){var e={type:t.type,bootstrap:t.bootstrap||ne,declarations:t.declarations||ne,imports:t.imports||ne,exports:t.exports||ne,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&Yt(function(){pe[t.id]=t.type}),e}function me(t,e){if(null==t)return te;var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),n[r]=i,e&&(e[r]=o)}return n}var ve=he;function ye(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function _e(t){return t[ie]||null}function be(t,e){var n=t[ae]||null;if(!n&&!0===e)throw new Error("Type ".concat(xt(t)," does not have '\u0275mod' property."));return n}var we=20,xe=10;function ke(t){return Array.isArray(t)&&"object"==typeof t[1]}function Se(t){return Array.isArray(t)&&!0===t[1]}function Ce(t){return 0!=(8&t.flags)}function Ae(t){return 2==(2&t.flags)}function Me(t){return 1==(1&t.flags)}function Ie(t){return null!==t.template}function Te(t,e){return t.hasOwnProperty(le)?t[le]:null}var De=function(){function t(e,n,i){o(this,t),this.previousValue=e,this.currentValue=n,this.firstChange=i}return s(t,[{key:"isFirstChange",value:function(){return this.firstChange}}]),t}();function Ee(){return Oe}function Oe(t){return t.type.prototype.ngOnChanges&&(t.setInput=Re),Pe}function Pe(){var t=Le(this),e=null==t?void 0:t.current;if(e){var n=t.previous;if(n===te)t.previous=e;else for(var i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}}function Re(t,e,n,i){var r=Le(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:te,current:null}),o=r.current||(r.current={}),a=r.previous,s=this.declaredInputs[n],l=a[s];o[s]=new De(l&&l.currentValue,e,a===te),t[i]=e}function Le(t){return t.__ngSimpleChanges__||null}Ee.ngInherit=!0;var Ne="http://www.w3.org/2000/svg",Fe=void 0;function Ve(){return void 0!==Fe?Fe:"undefined"!=typeof document?document:void 0}function ze(t){return!!t.listen}var Be={createRenderer:function(t,e){return Ve()}};function He(t){for(;Array.isArray(t);)t=t[0];return t}function je(t,e){return He(e[t])}function Ge(t,e){return He(e[t.index])}function Ue(t,e){return t.data[e]}function We(t,e){return t[e]}function Ye(t,e){var n=e[t];return ke(n)?n:n[0]}function qe(t){var e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Xe(t){return 4==(4&t[2])}function Ze(t){return 128==(128&t[2])}function Ke(t,e){return null==e?null:t[e]}function $e(t){t[18]=0}function Qe(t,e){t[5]+=e;for(var n=t,i=t[3];null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}var Je={lFrame:Sn(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function tn(){return Je.bindingsEnabled}function en(){return Je.lFrame.lView}function nn(){return Je.lFrame.tView}function rn(t){Je.lFrame.contextLView=t}function on(){for(var t=an();null!==t&&64===t.type;)t=t.parent;return t}function an(){return Je.lFrame.currentTNode}function sn(t,e){var n=Je.lFrame;n.currentTNode=t,n.isParent=e}function ln(){return Je.lFrame.isParent}function un(){Je.lFrame.isParent=!1}function cn(){return Je.isInCheckNoChangesMode}function hn(t){Je.isInCheckNoChangesMode=t}function dn(){var t=Je.lFrame,e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function fn(){return Je.lFrame.bindingIndex}function pn(){return Je.lFrame.bindingIndex++}function gn(t){var e=Je.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function mn(t){Je.lFrame.currentDirectiveIndex=t}function vn(t){var e=Je.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function yn(){return Je.lFrame.currentQueryIndex}function _n(t){Je.lFrame.currentQueryIndex=t}function bn(t){var e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function wn(t,e,n){if(n&jt.SkipSelf){for(var i=e,r=t;!(null!==(i=i.parent)||n&jt.Host||null===(i=bn(r))||(r=r[15],10&i.type)););if(null===i)return!1;e=i,t=r}var o=Je.lFrame=kn();return o.currentTNode=e,o.lView=t,!0}function xn(t){var e=kn(),n=t[1];Je.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function kn(){var t=Je.lFrame,e=null===t?null:t.child;return null===e?Sn(t):e}function Sn(t){var e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Cn(){var t=Je.lFrame;return Je.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var An=Cn;function Mn(){var t=Cn();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function In(t){return(Je.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Je.lFrame.contextLView))[8]}function Tn(){return Je.lFrame.selectedIndex}function Dn(t){Je.lFrame.selectedIndex=t}function En(){var t=Je.lFrame;return Ue(t.tView,t.selectedIndex)}function On(){Je.lFrame.currentNamespace=Ne}function Pn(){Je.lFrame.currentNamespace=null}function Rn(t,e){for(var n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[s]<0&&(t[18]+=65536),(a>11>16&&(3&t[2])===e){t[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}var Bn=-1,Hn=function t(e,n,i){o(this,t),this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function jn(t,e,n){for(var i=ze(t),r=0;re){a=o-1;break}}}for(;o>16,i=e;n>0;)i=i[15],n--;return i}var Kn=!0;function $n(t){var e=Kn;return Kn=t,e}var Qn=0;function Jn(t,e){var n=ei(t,e);if(-1!==n)return n;var i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,ti(i.data,t),ti(e,null),ti(i.blueprint,null));var r=ni(t,e),o=t.injectorIndex;if(qn(r))for(var a=Xn(r),s=Zn(r,e),l=s[1].data,u=0;u<8;u++)e[o+u]=s[a+u]|l[a+u];return e[o+8]=r,o}function ti(t,e){t.push(0,0,0,0,0,0,0,0,e)}function ei(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function ni(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=0,i=null,r=e;null!==r;){var o=r[1],a=o.type;if(null===(i=2===a?o.declTNode:1===a?r[6]:null))return Bn;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return Bn}function ii(t,e,n){!function(t,e,n){var i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(ue)&&(i=n[ue]),null==i&&(i=n[ue]=Qn++);var r=255&i;e.data[t+(r>>5)]|=1<3&&void 0!==arguments[3]?arguments[3]:jt.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==t){var o=di(n);if("function"==typeof o){if(!wn(e,t,i))return i&jt.Host?ri(r,n,i):oi(e,n,i,r);try{var a=o();if(null!=a||i&jt.Optional)return a;Et(n)}finally{An()}}else if("number"==typeof o){var s=null,l=ei(t,e),u=Bn,c=i&jt.Host?e[16][6]:null;for((-1===l||i&jt.SkipSelf)&&((u=-1===l?ni(t,e):e[l+8])!==Bn&&pi(i,!1)?(s=e[1],l=Xn(u),e=Zn(u,e)):l=-1);-1!==l;){var h=e[1];if(fi(o,l,h.data)){var d=ui(l,e,n,s,i,c);if(d!==si)return d}(u=e[l+8])!==Bn&&pi(i,e[1].data[l+8]===c)&&fi(o,l,e)?(s=h,l=Xn(u),e=Zn(u,e)):l=-1}}}return oi(e,n,i,r)}var si={};function li(){return new gi(on(),en())}function ui(t,e,n,i,r,o){var a=e[1],s=a.data[t+8],l=ci(s,a,n,null==i?Ae(s)&&Kn:i!=a&&0!=(3&s.type),r&jt.Host&&o===s);return null!==l?hi(e,a,l,s):si}function ci(t,e,n,i,r){for(var o=t.providerIndexes,a=e.data,s=1048575&o,l=t.directiveStart,u=o>>20,c=r?s+u:t.directiveEnd,h=i?s:s+u;h=l&&d.type===n)return h}if(r){var f=a[l];if(f&&Ie(f)&&f.type===n)return l}return null}function hi(t,e,n,i){var r=t[n],o=e.data;if(r instanceof Hn){var a=r;a.resolving&&function(t,e){throw new It("200","Circular dependency in DI detected for ".concat(t).concat(""))}(Dt(o[n]));var s=$n(a.canSeeViewProviders);a.resolving=!0;var l=a.injectImpl?Ut(a.injectImpl):null;wn(t,i,jt.Default);try{r=t[n]=a.factory(void 0,o,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){var i=e.type.prototype,r=i.ngOnInit,o=i.ngDoCheck;if(i.ngOnChanges){var a=Oe(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,a)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,r),o&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,o))}(n,o[n],e)}finally{null!==l&&Ut(l),$n(s),a.resolving=!1,An()}}return r}function di(t){if("string"==typeof t)return t.charCodeAt(0)||0;var e=t.hasOwnProperty(ue)?t[ue]:void 0;return"number"==typeof e?e>=0?255&e:li:e}function fi(t,e,n){return!!(n[e+(t>>5)]&1<=t.length?t.push(n):t.splice(e,0,n)}function Mi(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Ii(t,e){for(var n=[],i=0;i=0?t[1|i]=n:function(t,e,n,i){var r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i=~i,e,n),i}function Di(t,e){var n=Ei(t,e);if(n>=0)return t[1|n]}function Ei(t,e){return function(t,e,n){for(var i=0,r=t.length>>1;r!==i;){var o=i+(r-i>>1),a=t[o<<1];if(e===a)return o<<1;a>e?r=o:i=o+1}return~(r<<1)}(t,e)}var Oi={},Pi=/\n/gm,Ri="__source",Li=bt({provide:String,useValue:bt}),Ni=void 0;function Fi(t){var e=Ni;return Ni=t,e}function Vi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jt.Default;if(void 0===Ni)throw new Error("inject() must be called from an injection context");return null===Ni?Wt(t,void 0,e):Ni.get(t,e&jt.Optional?null:void 0,e)}function zi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jt.Default;return(Gt()||Vi)(At(t),e)}var Bi=zi;function Hi(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:null;t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;var r=xt(e);if(Array.isArray(e))r=e.map(xt).join(" -> ");else if("object"==typeof e){var o=[];for(var a in e)if(e.hasOwnProperty(a)){var s=e[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):xt(s)))}r="{".concat(o.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(t.replace(Pi,"\n "))}("\n"+t.message,r,n,i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}var Ui,Wi,Yi=ji(bi("Inject",function(t){return{token:t}}),-1),qi=ji(bi("Optional"),8),Xi=ji(bi("SkipSelf"),4);function Zi(t){var e;return(null===(e=function(){if(void 0===Ui&&(Ui=null,Jt.trustedTypes))try{Ui=Jt.trustedTypes.createPolicy("angular",{createHTML:function(t){return t},createScript:function(t){return t},createScriptURL:function(t){return t}})}catch(e){}return Ui}())||void 0===e?void 0:e.createHTML(t))||t}function Ki(t){var e;return(null===(e=function(){if(void 0===Wi&&(Wi=null,Jt.trustedTypes))try{Wi=Jt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:function(t){return t},createScript:function(t){return t},createScriptURL:function(t){return t}})}catch(e){}return Wi}())||void 0===e?void 0:e.createHTML(t))||t}var $i=function(){function t(e){o(this,t),this.changingThisBreaksApplicationSecurity=e}return s(t,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see https://g.co/ng/security#xss)"}}]),t}(),Qi=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}($i),Ji=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}($i),tr=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}($i),er=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}($i),nr=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}($i);function ir(t){return t instanceof $i?t.changingThisBreaksApplicationSecurity:t}function rr(t,e){var n=or(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error("Required a safe ".concat(e,", got a ").concat(n," (see https://g.co/ng/security#xss)"))}return n===e}function or(t){return t instanceof $i&&t.getTypeName()||null}var ar=function(){function t(e){o(this,t),this.inertDocumentHelper=e}return s(t,[{key:"getInertBodyElement",value:function(t){t=""+t;try{var e=(new window.DOMParser).parseFromString(Zi(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(n){return null}}}]),t}(),sr=function(){function t(e){if(o(this,t),this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){var n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);var i=this.inertDocument.createElement("body");n.appendChild(i)}}return s(t,[{key:"getInertBodyElement",value:function(t){var e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Zi(t),e;var n=this.inertDocument.createElement("body");return n.innerHTML=Zi(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(t){for(var e=t.attributes,n=e.length-1;0"),!0}},{key:"endElement",value:function(t){var e=t.nodeName.toLowerCase();yr.hasOwnProperty(e)&&!pr.hasOwnProperty(e)&&(this.buf.push(""))}},{key:"chars",value:function(t){this.buf.push(Ar(t))}},{key:"checkClobberedElement",value:function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(t.outerHTML));return e}}]),t}(),Sr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Cr=/([^\#-~ |!])/g;function Ar(t){return t.replace(/&/g,"&").replace(Sr,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Cr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function Mr(t,e){var n=null;try{fr=fr||function(t){var e=new sr(t);return function(){try{return!!(new window.DOMParser).parseFromString(Zi(""),"text/html")}catch(t){return!1}}()?new ar(e):e}(t);var i=e?String(e):"";n=fr.getInertBodyElement(i);var r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=n.innerHTML,n=fr.getInertBodyElement(i)}while(i!==o);return Zi((new kr).sanitizeChildren(Ir(n)||n))}finally{if(n)for(var a=Ir(n)||n;a.firstChild;)a.removeChild(a.firstChild)}}function Ir(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Tr=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Dr(t){var e=Or();return e?Ki(e.sanitize(Tr.HTML,t)||""):rr(t,"HTML")?Ki(ir(t)):Mr(Ve(),Tt(t))}function Er(t){var e=Or();return e?e.sanitize(Tr.URL,t)||"":rr(t,"URL")?ir(t):cr(Tt(t))}function Or(){var t=en();return t&&t[12]}function Pr(t){return t.ngDebugContext}function Rr(t){return t.ngOriginalError}function Lr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&(t[i-1][4]=r[4]);var a=Mi(t,xe+e);po(r[1],n=r,n[11],2,null,null),n[0]=null,n[6]=null;var s=a[19];null!==s&&s.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}}function Jr(t,e){if(!(256&e[2])){var n=e[11];ze(n)&&n.destroyNode&&po(t,e,n,3,null,null),function(t){var e=t[13];if(!e)return to(t[1],t);for(;e;){var n=null;if(ke(e))n=e[13];else{var i=e[10];i&&(n=i)}if(!n){for(;e&&!e[4]&&e!==t;)ke(e)&&to(e[1],e),e=e[3];null===e&&(e=t),ke(e)&&to(e[1],e),n=e&&e[4]}e=n}}(e)}}function to(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){var n;if(null!=t&&null!=(n=t.destroyHooks))for(var i=0;i=0?i[r=u]():i[r=-u].unsubscribe(),o+=2}else{var c=i[r=n[o+1]];n[o].call(c)}if(null!==i){for(var h=r+1;ho?"":r[c+1].toLowerCase();var d=8&i?h:null;if(d&&-1!==_o(d,u,0)||2&i&&u!==h){if(Co(i))return!1;a=!0}}}}else{if(!a&&!Co(i)&&!Co(l))return!1;if(a&&Co(l))continue;a=!1,i=l|1&i}}return Co(i)||a}function Co(t){return 0==(1&t)}function Ao(t,e,n,i){if(null===e)return-1;var r=0;if(i||!n){for(var o=!1;r-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],i=0;i0?'="'+s+'"':"")+"]"}else 8&i?r+="."+a:4&i&&(r+=" "+a);else""===r||Co(a)||(e+=To(o,r),r=""),i=a,o=o||!Co(i);n++}return""!==r&&(e+=To(o,r)),e}var Eo={};function Oo(t){Po(nn(),en(),Tn()+t,cn())}function Po(t,e,n,i){if(!i)if(3==(3&e[2])){var r=t.preOrderCheckHooks;null!==r&&Ln(e,r,n)}else{var o=t.preOrderHooks;null!==o&&Nn(e,o,0,n)}Dn(n)}function Ro(t,e){return t<<17|e<<2}function Lo(t){return t>>17&32767}function No(t){return 2|t}function Fo(t){return(131068&t)>>2}function Vo(t,e){return-131069&t|e<<2}function zo(t){return 1|t}function Bo(t,e){var n=t.contentQueries;if(null!==n)for(var i=0;iwe&&Po(t,e,we,cn()),n(i,r)}finally{Dn(o)}}function Xo(t,e,n){if(Ce(e))for(var i=e.directiveEnd,r=e.directiveStart;r2&&void 0!==arguments[2]?arguments[2]:Ge,i=e.localNames;if(null!==i)for(var r=e.index+1,o=0;o0;){var n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(s)!=l&&s.push(l),s.push(i,r,a)}}function ra(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function oa(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function aa(t,e,n){if(n){if(e.exportAs)for(var i=0;i0&&pa(n)}}function pa(t){for(var e=Wr(t);null!==e;e=Yr(e))for(var n=xe;n0&&pa(i)}var o=t[1].components;if(null!==o)for(var a=0;a0&&pa(s)}}function ga(t,e){var n=Ye(e,t),i=n[1];!function(t,e){for(var n=e.length;n1&&void 0!==arguments[1]?arguments[1]:Oi;if(e===Oi){var n=new Error("NullInjectorError: No provider for ".concat(xt(t),"!"));throw n.name="NullInjectorError",n}return e}}]),t}(),Ea=new wi("Set Injector scope."),Oa={},Pa={},Ra=[],La=void 0;function Na(){return void 0===La&&(La=new Da),La}function Fa(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return new Va(t,n,e||Na(),i)}var Va=function(){function t(e,n,i){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;o(this,t),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var s=[];n&&Ci(n,function(t){return r.processProvider(t,e,n)}),Ci([e],function(t){return r.processInjectorType(t,[],s)}),this.records.set(Ta,Ha(void 0,this));var l=this.records.get(Ea);this.scope=null!=l?l.value:null,this.source=a||("object"==typeof e?null:xt(e))}return s(t,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(t){return t.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oi,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:jt.Default;this.assertNotDestroyed();var i=Fi(this);try{if(!(n&jt.SkipSelf)){var r=this.records.get(t);if(void 0===r){var o=Ua(t)&&Rt(t);r=o&&this.injectableDefInScope(o)?Ha(za(t),Oa):null,this.records.set(t,r)}if(null!=r)return this.hydrate(t,r)}var a=n&jt.Self?Na():this.parent;return a.get(t,e=n&jt.Optional&&e===Oi?null:e)}catch(l){if("NullInjectorError"===l.name){var s=l.ngTempTokenPath=l.ngTempTokenPath||[];if(s.unshift(xt(t)),i)throw l;return Gi(l,t,"R3InjectorError",this.source)}throw l}finally{Fi(i)}}},{key:"_resolveInjectorDefTypes",value:function(){var t=this;this.injectorDefTypes.forEach(function(e){return t.get(e)})}},{key:"toString",value:function(){var t=[];return this.records.forEach(function(e,n){return t.push(xt(n))}),"R3Injector[".concat(t.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(t,e,n){var i=this;if(!(t=At(t)))return!1;var r=Nt(t),o=null==r&&t.ngModule||void 0,a=void 0===o?t:o,s=-1!==n.indexOf(a);if(void 0!==o&&(r=Nt(o)),null==r)return!1;if(null!=r.imports&&!s){var l;n.push(a);try{Ci(r.imports,function(t){i.processInjectorType(t,e,n)&&(void 0===l&&(l=[]),l.push(t))})}finally{}if(void 0!==l)for(var u=function(t){var e=l[t],n=e.ngModule,r=e.providers;Ci(r,function(t){return i.processProvider(t,n,r||Ra)})},c=0;c0){var n=Ii(e,"?");throw new Error("Can't resolve all parameters for ".concat(xt(t),": (").concat(n.join(", "),")."))}var i=function(t){var e=t&&(t[Vt]||t[Bt]);if(e){var n=function(t){if(t.hasOwnProperty("name"))return t.name;var e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\n')+'This will become an error in a future version of Angular. Please add @Injectable() to the "'.concat(n,'" class.')),e}return null}(t);return null!==i?function(){return i.factory(t)}:function(){return new t}}(t);throw new Error("unreachable")}function Ba(t,e,n){var i,r=void 0;if(Ga(t)){var o=At(t);return Te(o)||za(o)}if(ja(t))r=function(){return At(t.useValue)};else if((i=t)&&i.useFactory)r=function(){return t.useFactory.apply(t,b(Hi(t.deps||[])))};else if(function(t){return!(!t||!t.useExisting)}(t))r=function(){return zi(At(t.useExisting))};else{var a=At(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return Te(a)||za(a);r=function(){return w(a,b(Hi(t.deps)))}}return r}function Ha(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:t,value:e,multi:n?[]:void 0}}function ja(t){return null!==t&&"object"==typeof t&&Li in t}function Ga(t){return"function"==typeof t}function Ua(t){return"function"==typeof t||"object"==typeof t&&t instanceof wi}var Wa=function(t,e,n){return function(t){var e=Fa(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0);return e._resolveInjectorDefTypes(),e}({name:n},e,t,n)},Ya=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"create",value:function(t,e){return Array.isArray(t)?Wa(t,e,""):Wa(t.providers,t.parent,t.name||"")}}]),t}();return t.THROW_IF_NOT_FOUND=Oi,t.NULL=new Da,t.\u0275prov=Ot({token:t,providedIn:"any",factory:function(){return zi(Ta)}}),t.__NG_ELEMENT_ID__=-1,t}();function qa(t,e){Rn(qe(t)[1],on())}function Xa(t){for(var e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0,i=[t];e;){var r=void 0;if(Ie(t))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(n){i.push(r);var o=t;o.inputs=Za(t.inputs),o.declaredInputs=Za(t.declaredInputs),o.outputs=Za(t.outputs);var a=r.hostBindings;a&&Qa(t,a);var s=r.viewQuery,l=r.contentQueries;if(s&&Ka(t,s),l&&$a(t,l),wt(t.inputs,r.inputs),wt(t.declaredInputs,r.declaredInputs),wt(t.outputs,r.outputs),Ie(r)&&r.data.animation){var u=t.data;u.animation=(u.animation||[]).concat(r.data.animation)}}var c=r.features;if(c)for(var h=0;h=0;i--){var r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=Wn(r.hostAttrs,n=Wn(n,r.hostAttrs))}}(i)}function Za(t){return t===te?{}:t===ne?[]:t}function Ka(t,e){var n=t.viewQuery;t.viewQuery=n?function(t,i){e(t,i),n(t,i)}:e}function $a(t,e){var n=t.contentQueries;t.contentQueries=n?function(t,i,r){e(t,i,r),n(t,i,r)}:e}function Qa(t,e){var n=t.hostBindings;t.hostBindings=n?function(t,i){e(t,i),n(t,i)}:e}var Ja=null;function ts(){if(!Ja){var t=Jt.Symbol;if(t&&t.iterator)Ja=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:jt.Default,n=en();if(null===n)return zi(t,e);var i=on();return ai(i,n,At(t),e)}function ds(t,e,n){var i=en();return os(i,pn(),e)&&ea(nn(),En(),i,t,e,i[11],n,!1),ds}function fs(t,e,n,i,r){var o=r?"class":"style";Aa(t,n,e.inputs[o],o,i)}function ps(t,e,n,i){var r=en(),o=nn(),a=we+t,s=r[11],l=r[a]=Kr(s,e,Je.lFrame.currentNamespace),u=o.firstCreatePass?function(t,e,n,i,r,o,a){var s=e.consts,l=jo(e,t,2,r,Ke(s,o));return na(e,n,l,Ke(s,a)),null!==l.attrs&&Ia(l,l.attrs,!1),null!==l.mergedAttrs&&Ia(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(a,o,r,0,e,n,i):o.data[a];sn(u,!0);var c=u.mergedAttrs;null!==c&&jn(s,l,c);var h=u.classes;null!==h&&yo(s,l,h);var d=u.styles;null!==d&&vo(s,l,d),64!=(64&u.flags)&&lo(o,r,l,u),0===Je.lFrame.elementDepthCount&&Fr(l,r),Je.lFrame.elementDepthCount++,Me(u)&&(Zo(o,r,u),Xo(o,u,r)),null!==i&&Ko(r,u)}function gs(){var t=on();ln()?un():sn(t=t.parent,!1);var e=t;Je.lFrame.elementDepthCount--;var n=nn();n.firstCreatePass&&(Rn(n,t),Ce(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&fs(n,e,en(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&fs(n,e,en(),e.stylesWithoutHost,!1)}function ms(t,e,n,i){ps(t,e,n,i),gs()}function vs(t,e,n){var i=en(),r=nn(),o=t+we,a=r.firstCreatePass?function(t,e,n,i,r){var o=e.consts,a=Ke(o,i),s=jo(e,t,8,"ng-container",a);return null!==a&&Ia(s,a,!0),na(e,n,s,Ke(o,r)),null!==e.queries&&e.queries.elementStart(e,s),s}(o,r,i,e,n):r.data[o];sn(a,!0);var s=i[o]=i[11].createComment("");lo(r,i,s,a),Fr(s,i),Me(a)&&(Zo(r,i,a),Xo(r,a,i)),null!=n&&Ko(i,a)}function ys(){var t=on(),e=nn();ln()?un():sn(t=t.parent,!1),e.firstCreatePass&&(Rn(e,t),Ce(t)&&e.queries.elementEnd(t))}function _s(t,e,n){vs(t,e,n),ys()}function bs(){return en()}function ws(t){return!!t&&"function"==typeof t.then}function xs(t){return!!t&&"function"==typeof t.subscribe}var ks=xs;function Ss(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=en(),o=nn(),a=on();return Ms(o,r,r[11],a,t,e,n,i),Ss}function Cs(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=on(),o=en(),a=nn(),s=vn(a.data),l=Sa(s,r,o);return Ms(a,o,l,r,t,e,n,i),Cs}function As(t,e,n,i){var r=t.cleanup;if(null!=r)for(var o=0;ol?s[l]:null}"string"==typeof a&&(o+=2)}return null}function Ms(t,e,n,i,r,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,l=Me(i),u=t.firstCreatePass,c=u&&ka(t),h=xa(e),d=!0;if(3&i.type){var f=Ge(i,e),p=s?s(f):te,g=p.target||f,m=h.length,v=s?function(t){return s(He(t[i.index])).target}:i.index;if(ze(n)){var y=null;if(!s&&l&&(y=As(t,e,r,i.index)),null!==y){var _=y.__ngLastListenerFn__||y;_.__ngNextListenerFn__=o,y.__ngLastListenerFn__=o,d=!1}else{o=Ts(i,e,0,o,!1);var b=n.listen(p.name||g,r,o);h.push(o,b),c&&c.push(r,v,m,m+1)}}else o=Ts(i,e,0,o,!0),g.addEventListener(r,o,a),h.push(o),c&&c.push(r,v,m,a)}else o=Ts(i,e,0,o,!1);var w,x=i.outputs;if(d&&null!==x&&(w=x[r])){var k=w.length;if(k)for(var S=0;S0&&void 0!==arguments[0]?arguments[0]:1;return In(t)}function Es(t,e){for(var n=null,i=function(t){var e=t.attrs;if(null!=e){var n=e.indexOf(5);if(0==(1&n))return e[n+1]}return null}(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=en(),r=nn(),o=jo(r,we+t,16,null,n||null);null===o.projection&&(o.projection=e),un(),64!=(64&o.flags)&&go(r,i,o)}function Rs(t,e,n){return Ls(t,"",e,"",n),Rs}function Ls(t,e,n,i,r){var o=en(),a=ls(o,e,n,i);return a!==Eo&&ea(nn(),En(),o,t,a,o[11],r,!1),Ls}function Ns(t,e,n,i,r){for(var o=t[n+1],a=null===e,s=i?Lo(o):Fo(o),l=!1;0!==s&&(!1===l||a);){var u=t[s+1];Fs(t[s],e)&&(l=!0,t[s+1]=i?zo(u):No(u)),s=i?Lo(u):Fo(u)}l&&(t[n+1]=i?No(o):zo(o))}function Fs(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Ei(t,e)>=0}var Vs={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function zs(t){return t.substring(Vs.key,Vs.keyEnd)}function Bs(t,e){var n=Vs.textEnd;return n===e?-1:(e=Vs.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,Vs.key=e,n),Hs(t,e,n))}function Hs(t,e,n){for(;e=0;n=Bs(e,n))Ti(t,zs(e),!0)}function Ws(t,e,n,i){var r=en(),o=nn(),a=gn(2);o.firstUpdatePass&&qs(o,t,a,i),e!==Eo&&os(r,a,e)&&Ks(o,o.data[Tn()],r,r[11],t,r[a+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=xt(ir(t)))),t}(e,n),i,a)}function Ys(t,e){return e>=t.expandoStartIndex}function qs(t,e,n,i){var r=t.data;if(null===r[n+1]){var o=r[Tn()],a=Ys(t,n);Js(o,i)&&null===e&&!a&&(e=!1),e=function(t,e,n,i){var r=vn(t),o=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=Zs(n=Xs(null,t,e,n,i),e.attrs,i),o=null);else{var a=e.directiveStylingLast;if(-1===a||t[a]!==r)if(n=Xs(r,t,e,n,i),null===o){var s=function(t,e,n){var i=n?e.classBindings:e.styleBindings;if(0!==Fo(i))return t[Lo(i)]}(t,e,i);void 0!==s&&Array.isArray(s)&&function(t,e,n,i){t[Lo(n?e.classBindings:e.styleBindings)]=i}(t,e,i,s=Zs(s=Xs(null,t,e,s[1],i),e.attrs,i))}else o=function(t,e,n){for(var i=void 0,r=e.directiveEnd,o=1+e.directiveStylingLast;o0)&&(c=!0):u=n,r)if(0!==l){var h=Lo(t[s+1]);t[i+1]=Ro(h,s),0!==h&&(t[h+1]=Vo(t[h+1],i)),t[s+1]=131071&t[s+1]|i<<17}else t[i+1]=Ro(s,0),0!==s&&(t[s+1]=Vo(t[s+1],i)),s=i;else t[i+1]=Ro(l,0),0===s?s=i:t[l+1]=Vo(t[l+1],i),l=i;c&&(t[i+1]=No(t[i+1])),Ns(t,u,i,!0),Ns(t,u,i,!1),function(t,e,n,i,r){var o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof e&&Ei(o,e)>=0&&(n[i+1]=zo(n[i+1]))}(e,u,t,i,o),a=Ro(s,l),o?e.classBindings=a:e.styleBindings=a}(r,o,e,n,a,i)}}function Xs(t,e,n,i,r){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var l=t[r],u=Array.isArray(l),c=u?l[1]:l,h=null===c,d=n[r+1];d===Eo&&(d=h?ee:void 0);var f=h?Di(d,i):c===i?d:void 0;if(u&&!Qs(f)&&(f=Di(l,i)),Qs(f)&&(s=f,a))return s;var p=t[r+1];r=a?Lo(p):Fo(p)}if(null!==e){var g=o?e.residualClasses:e.residualStyles;null!=g&&(s=Di(g,i))}return s}function Qs(t){return void 0!==t}function Js(t,e){return 0!=(t.flags&(e?16:32))}function tl(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=en(),i=nn(),r=t+we,o=i.firstCreatePass?jo(i,r,1,e,null):i.data[r],a=n[r]=Zr(n[11],e);lo(i,n,a,o),sn(o,!1)}function el(t){return nl("",t,""),el}function nl(t,e,n){var i=en(),r=ls(i,t,e,n);return r!==Eo&&Ma(i,Tn(),r),nl}function il(t,e,n,i,r){var o=en(),a=function(t,e,n,i,r,o){var a=as(t,fn(),n,r);return gn(2),a?e+Tt(n)+i+Tt(r)+o:Eo}(o,t,e,n,i,r);return a!==Eo&&Ma(o,Tn(),a),il}function rl(t,e,n){var i=en();return os(i,pn(),e)&&ea(nn(),En(),i,t,e,i[11],n,!0),rl}function ol(t,e,n){var i=en();if(os(i,pn(),e)){var r=nn(),o=En();ea(r,o,i,t,e,Sa(vn(r.data),o,i),n,!0)}return ol}var al=void 0,sl=["en",[["a","p"],["AM","PM"],al],[["AM","PM"],al,al],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],al,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],al,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",al,"{1} 'at' {0}",al],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],ll={};function ul(t){return t in ll||(ll[t]=Jt.ng&&Jt.ng.common&&Jt.ng.common.locales&&Jt.ng.common.locales[t]),ll[t]}var cl=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({}),hl="en-US";function dl(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: ".concat(t)+" [Expected=> ".concat(null," ").concat("!="," ").concat(e," <=Actual]"))}(n,e),"string"==typeof t&&t.toLowerCase().replace(/_/g,"-")}function fl(t,e,n){var i=nn();if(i.firstCreatePass){var r=Ie(t);pl(n,i.data,i.blueprint,r,!0),pl(e,i.data,i.blueprint,r,!1)}}function pl(t,e,n,i,r){if(t=At(t),Array.isArray(t))for(var o=0;o>20;if(Ga(t)||!t.multi){var p=new Hn(u,r,hs),g=vl(l,e,r?h:h+f,d);-1===g?(ii(Jn(c,s),a,l),gl(a,t,e.length),e.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(p),s.push(p)):(n[g]=p,s[g]=p)}else{var m=vl(l,e,h+f,d),v=vl(l,e,h,h+f),y=v>=0&&n[v];if(r&&!y||!r&&!(m>=0&&n[m])){ii(Jn(c,s),a,l);var _=function(t,e,n,i,r){var o=new Hn(t,n,hs);return o.multi=[],o.index=e,o.componentProviders=0,ml(o,r,i&&!n),o}(r?_l:yl,n.length,r,i,u);!r&&y&&(n[v].providerFactory=_),gl(a,t,e.length,0),e.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else gl(a,t,m>-1?m:v,ml(n[r?v:m],u,!r&&i));!r&&i&&y&&n[v].componentProviders++}}}function gl(t,e,n,i){var r=Ga(e);if(r||e.useClass){var o=(e.useClass||e).prototype.ngOnDestroy;if(o){var a=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){var s=a.indexOf(n);-1===s?a.push(n,[i,o]):a[s+1].push(i,o)}else a.push(n,o)}}}function ml(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function vl(t,e,n,i){for(var r=n;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return fl(n,i?i(t):t,e)}}}var xl=function t(){o(this,t)},kl=function t(){o(this,t)},Sl=function(){function t(){o(this,t)}return s(t,[{key:"resolveComponentFactory",value:function(t){throw function(t){var e=Error("No component factory found for ".concat(xt(t),". Did you add it to @NgModule.entryComponents?"));return e.ngComponent=t,e}(t)}}]),t}(),Cl=function(){var t=function t(){o(this,t)};return t.NULL=new Sl,t}();function Al(){}function Ml(t,e){return new Tl(Ge(t,e))}var Il=function(){return Ml(on(),en())},Tl=function(){var t=function t(e){o(this,t),this.nativeElement=e};return t.__NG_ELEMENT_ID__=Il,t}();function Dl(t){return t instanceof Tl?t.nativeElement:t}var El=function t(){o(this,t)},Ol=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=function(){return Pl()},t}(),Pl=function(){var t=en(),e=Ye(on().index,t);return function(t){return t[11]}(ke(e)?e:t)},Rl=function(){var t=function t(){o(this,t)};return t.\u0275prov=Ot({token:t,providedIn:"root",factory:function(){return null}}),t}(),Ll=function t(e){o(this,t),this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},Nl=new Ll("11.2.13"),Fl=function(){function t(){o(this,t)}return s(t,[{key:"supports",value:function(t){return ns(t)}},{key:"create",value:function(t){return new zl(t)}}]),t}(),Vl=function(t,e){return e},zl=function(){function t(e){o(this,t),this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Vl}return s(t,[{key:"forEachItem",value:function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)}},{key:"forEachOperation",value:function(t){for(var e=this._itHead,n=this._removalsHead,i=0,r=null;e||n;){var o=!n||e&&e.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==n;){var o=e[n.index];if(null!==o&&i.push(He(o)),Se(o))for(var a=xe;a-1&&(Qr(t,n),Mi(e,n))}this._attachedToViewContainer=!1}Jr(this._lView[1],this._lView)}},{key:"onDestroy",value:function(t){Jo(this._lView[1],this._lView,null,t)}},{key:"markForCheck",value:function(){va(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){ya(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(t,e,n){hn(!0);try{ya(t,e,n)}finally{hn(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}},{key:"detachFromAppRef",value:function(){var t;this._appRef=null,po(this._lView[1],t=this._lView,t[11],2,null,null)}},{key:"attachToAppRef",value:function(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}},{key:"rootNodes",get:function(){var t=this._lView,e=t[1];return $l(e,t,e.firstChild,[])}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),t}(),Jl=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t))._view=t,i}return s(n,[{key:"detectChanges",value:function(){_a(this._view)}},{key:"checkNoChanges",value:function(){!function(t){hn(!0);try{_a(t)}finally{hn(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Ql),tu=nu,eu=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=tu,t.__ChangeDetectorRef__=!0,t}();function nu(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return iu(on(),en(),t)}function iu(t,e,n){if(!n&&Ae(t)){var i=Ye(t.index,e);return new Ql(i,i)}return 47&t.type?new Ql(e[16],e):null}var ru=[new Ul],ou=new Xl([new Fl]),au=new Kl(ru),su=function(){return cu(on(),en())},lu=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=su,t}(),uu=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this))._declarationLView=t,a._declarationTContainer=i,a.elementRef=r,a}return s(n,[{key:"createEmbeddedView",value:function(t){var e=this._declarationTContainer.tViews,n=Ho(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var i=this._declarationLView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),Uo(e,n,t),new Ql(n)}}]),n}(lu);function cu(t,e){return 4&t.type?new uu(e,t,Ml(t,e)):null}var hu=function t(){o(this,t)},du=function t(){o(this,t)},fu=function(){return yu(on(),en())},pu=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=fu,t}(),gu=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this))._lContainer=t,a._hostTNode=i,a._hostLView=r,a}return s(n,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(t){var e=mu(this._lContainer);return null!==e&&e[t]||null}},{key:"createEmbeddedView",value:function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i}},{key:"createComponent",value:function(t,e,n,i,r){var o=n||this.parentInjector;if(!r&&null==t.ngModule&&o){var a=o.get(hu,null);a&&(r=a)}var s=t.create(o,i,void 0,r);return this.insert(s.hostView,e),s}},{key:"insert",value:function(t,e){var n=t._lView,i=n[1];if(Se(n[3])){var r=this.indexOf(t);if(-1!==r)this.detach(r);else{var o=n[3],a=new gu(o,o[6],o[3]);a.detach(a.indexOf(t))}}var s=this._adjustIndex(e),l=this._lContainer;!function(t,e,n,i){var r=xe+i,o=n.length;i>0&&(n[r-1][4]=e),i1&&void 0!==arguments[1]?arguments[1]:0;return null==t?this.length+e:t}},{key:"element",get:function(){return Ml(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new gi(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var t=ni(this._hostTNode,this._hostLView);if(qn(t)){var e=Zn(t,this._hostLView),n=Xn(t);return new gi(e[1].data[n+8],e)}return new gi(null,this._hostLView)}},{key:"length",get:function(){return this._lContainer.length-xe}}]),n}(pu);function mu(t){return t[8]}function vu(t){return t[8]||(t[8]=[])}function yu(t,e){var n,i=e[t.index];if(Se(i))n=i;else{var r;if(8&t.type)r=He(i);else{var o=e[11];r=o.createComment("");var a=Ge(t,e);no(o,oo(o,a),r,function(t,e){return ze(t)?t.nextSibling(e):e.nextSibling}(o,a),!1)}e[t.index]=n=da(i,e,r,t),ma(e,n)}return new gu(n,t,e)}var _u={},bu=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).ngModule=t,i}return s(n,[{key:"resolveComponentFactory",value:function(t){var e=_e(t);return new ku(e,this.ngModule)}}]),n}(Cl);function wu(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}var xu=new wi("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Vr}}),ku=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).componentDef=t,r.ngModule=i,r.componentType=t.type,r.selector=t.selectors.map(Do).join(","),r.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],r.isBoundToModule=!!i,r}return s(n,[{key:"create",value:function(t,e,n,i){var r,o,a=(i=i||this.ngModule)?function(t,e){return{get:function(n,i,r){var o=t.get(n,_u,r);return o!==_u||i===_u?o:e.get(n,i,r)}}}(t,i.injector):t,s=a.get(El,Be),l=a.get(Rl,null),u=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(t,e,n){if(ze(t))return t.selectRootElement(e,n===Xt.ShadowDom);var i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(u,n,this.componentDef.encapsulation):Kr(s.createRenderer(null,this.componentDef),c,function(t){var e=t.toLowerCase();return"svg"===e?Ne:"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,f={components:[],scheduler:Vr,clean:wa,playerHandler:null,flags:0},p=Qo(0,null,null,1,0,null,null,null,null,null),g=Ho(null,p,f,d,null,null,s,u,l,a);xn(g);try{var m=function(t,e,n,i,r,o){var a=n[1];n[20]=t;var s=jo(a,20,2,"#host",null),l=s.mergedAttrs=e.hostAttrs;null!==l&&(Ia(s,l,!0),null!==t&&(jn(r,t,l),null!==s.classes&&yo(r,t,s.classes),null!==s.styles&&vo(r,t,s.styles)));var u=i.createRenderer(t,e),c=Ho(n,$o(e),null,e.onPush?64:16,n[20],s,i,u,null,null);return a.firstCreatePass&&(ii(Jn(s,n),a,e.type),oa(a,s),sa(s,n.length,1)),ma(n,c),n[20]=c}(h,this.componentDef,g,s,u);if(h)if(n)jn(u,h,["ng-version",Nl.full]);else{var v=function(t){for(var e=[],n=[],i=1,r=2;i0&&yo(u,h,_.join(" "))}if(o=Ue(p,we),void 0!==e)for(var b=o.projection=[],w=0;w1&&void 0!==arguments[1]?arguments[1]:Ya.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:jt.Default;return t===Ya||t===hu||t===Ta?this:this._r3Injector.get(t,e,n)}},{key:"destroy",value:function(){var t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null}},{key:"onDestroy",value:function(t){this.destroyCbs.push(t)}}]),n}(hu),Mu=function(t){u(n,t);var e=p(n);function n(t){var i,r,a;return o(this,n),(i=e.call(this)).moduleType=t,null!==be(t)&&(r=t,a=new Set,function t(e){var n=be(e,!0),i=n.id;null!==i&&(function(t,e,n){if(e&&e!==n)throw new Error("Duplicate module registered for ".concat(t," - ").concat(xt(e)," vs ").concat(xt(e.name)))}(i,Cu.get(i),e),Cu.set(i,e));var r,o=v(Hr(n.imports));try{for(o.s();!(r=o.n()).done;){var s=r.value;a.has(s)||(a.add(s),t(s))}}catch(l){o.e(l)}finally{o.f()}}(r)),i}return s(n,[{key:"create",value:function(t){return new Au(this.moduleType,t)}}]),n}(du);function Iu(t,e,n){var i=dn()+t,r=en();return r[i]===Eo?rs(r,i,n?e.call(n):e()):function(t,e){return t[e]}(r,i)}function Tu(t,e,n,i){return Ou(en(),dn(),t,e,n,i)}function Du(t,e,n,i,r){return Pu(en(),dn(),t,e,n,i,r)}function Eu(t,e){var n=t[e];return n===Eo?void 0:n}function Ou(t,e,n,i,r,o){var a=e+n;return os(t,a,r)?rs(t,a+1,o?i.call(o,r):i(r)):Eu(t,a+1)}function Pu(t,e,n,i,r,o,a){var s=e+n;return as(t,s,r,o)?rs(t,s+2,a?i.call(a,r,o):i(r,o)):Eu(t,s+2)}function Ru(t,e){var n,i=nn(),r=t+we;i.firstCreatePass?(n=function(t,e){if(e)for(var n=e.length-1;n>=0;n--){var i=e[n];if(t===i.name)return i}throw new It("302","The pipe '".concat(t,"' could not be found!"))}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var o=n.factory||(n.factory=Te(n.type)),a=Ut(hs);try{var s=$n(!1),l=o();return $n(s),function(t,e,n,i){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=i}(i,en(),r,l),l}finally{Ut(a)}}function Lu(t,e,n){var i=t+we,r=en(),o=We(r,i);return Vu(r,Fu(r,i)?Ou(r,dn(),e,o.transform,n,o):o.transform(n))}function Nu(t,e,n,i){var r=t+we,o=en(),a=We(o,r);return Vu(o,Fu(o,r)?Pu(o,dn(),e,a.transform,n,i,a):a.transform(n,i))}function Fu(t,e){return t[1].data[e].pure}function Vu(t,e){return es.isWrapped(e)&&(e=es.unwrap(e),t[fn()]=Eo),e}function zu(t){return function(e){setTimeout(t,void 0,e)}}var Bu=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return o(this,n),(t=e.call(this)).__isAsync=i,t}return s(n,[{key:"emit",value:function(t){r(i(n.prototype),"next",this).call(this,t)}},{key:"subscribe",value:function(t,e,o){var a,s,l,u=t,c=e||function(){return null},h=o;if(t&&"object"==typeof t){var d=t;u=null===(a=d.next)||void 0===a?void 0:a.bind(d),c=null===(s=d.error)||void 0===s?void 0:s.bind(d),h=null===(l=d.complete)||void 0===l?void 0:l.bind(d)}this.__isAsync&&(c=zu(c),u&&(u=zu(u)),h&&(h=zu(h)));var f=r(i(n.prototype),"subscribe",this).call(this,{next:u,error:c,complete:h});return t instanceof M&&t.add(f),f}}]),n}(U);function Hu(){return this._results[ts()]()}var ju=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o(this,t),this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;var n=ts(),i=t.prototype;i[n]||(i[n]=Hu)}return s(t,[{key:"get",value:function(t){return this._results[t]}},{key:"map",value:function(t){return this._results.map(t)}},{key:"filter",value:function(t){return this._results.filter(t)}},{key:"find",value:function(t){return this._results.find(t)}},{key:"reduce",value:function(t,e){return this._results.reduce(t,e)}},{key:"forEach",value:function(t){this._results.forEach(t)}},{key:"some",value:function(t){return this._results.some(t)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(t,e){var n=this;n.dirty=!1;var i=Si(t);(this._changesDetected=!function(t,e,n){if(t.length!==e.length)return!1;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];o(this,t),this.queries=e}return s(t,[{key:"createEmbeddedView",value:function(e){var n=e.queries;if(null!==n){for(var i=null!==e.contentQueries?e.contentQueries[0]:n.length,r=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:null;o(this,t),this.predicate=e,this.flags=n,this.read=i},Yu=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(this,t),this.queries=e}return s(t,[{key:"elementStart",value:function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;o(this,t),this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return s(t,[{key:"elementStart",value:function(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}},{key:"elementEnd",value:function(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(t,e){this.elementStart(t,e)}},{key:"embeddedTView",value:function(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new t(this.metadata)):null}},{key:"isApplyingToNode",value:function(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){for(var e=this._declarationNodeIndex,n=t.parent;null!==n&&8&n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(t,e){var n=this.metadata.predicate;if(Array.isArray(n))for(var i=0;i0)i.push(a[s/2]);else{for(var u=o[s+1],c=e[-l],h=xe;h0&&(r=setTimeout(function(){i._callbacks=i._callbacks.filter(function(t){return t.timeoutId!==r}),t(i._didWork,i.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}},{key:"whenStable",value:function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(t,e,n){return[]}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Nc=function(){var t=function(){function t(){o(this,t),this._applications=new Map,Fc.addToWindow(this)}return s(t,[{key:"registerApplication",value:function(t,e){this._applications.set(t,e)}},{key:"unregisterApplication",value:function(t){this._applications.delete(t)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(t){return this._applications.get(t)||null}},{key:"getAllTestabilities",value:function(){return Array.from(this._applications.values())}},{key:"getAllRootElements",value:function(){return Array.from(this._applications.keys())}},{key:"findTestabilityInTree",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Fc.findTestabilityInTree(this,t,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Fc=new(function(){function t(){o(this,t)}return s(t,[{key:"addToWindow",value:function(t){}},{key:"findTestabilityInTree",value:function(t,e,n){return null}}]),t}()),Vc=!0,zc=!1;function Bc(){return zc=!0,Vc}var Hc=function(t,e,n){var i=new Mu(n);return Promise.resolve(i)},jc=new wi("AllowMultipleToken"),Gc=function t(e,n){o(this,t),this.name=e,this.token=n};function Uc(t){if(Pc&&!Pc.destroyed&&!Pc.injector.get(jc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Pc=t.get(Xc);var e=t.get(hc,null);return e&&e.forEach(function(t){return t()}),Pc}function Wc(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: ".concat(e),r=new wi(i);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=qc();if(!o||o.injector.get(jc,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var a=n.concat(e).concat({provide:r,useValue:!0},{provide:Ea,useValue:"platform"});Uc(Ya.create({providers:a,name:i}))}return Yc(r)}}function Yc(t){var e=qc();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}function qc(){return Pc&&!Pc.destroyed?Pc:null}var Xc=function(){var t=function(){function t(e){o(this,t),this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return s(t,[{key:"bootstrapModuleFactory",value:function(t,e){var n,i,r=this,o=(i={ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1},"noop"===(n=e?e.ngZone:void 0)?new Rc:("zone.js"===n?void 0:n)||new Mc({enableLongStackTrace:Bc(),shouldCoalesceEventChangeDetection:!!(null==i?void 0:i.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==i?void 0:i.ngZoneRunCoalescing)})),a=[{provide:Mc,useValue:o}];return o.run(function(){var e=Ya.create({providers:a,parent:r.injector,name:t.moduleType.name}),n=t.create(e),i=n.injector.get(Nr,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return o.runOutsideAngular(function(){var t=o.onError.subscribe({next:function(t){i.handleError(t)}});n.onDestroy(function(){$c(r._modules,n),t.unsubscribe()})}),function(t,e,i){try{var o=((a=n.injector.get(sc)).runInitializers(),a.donePromise.then(function(){return dl(n.injector.get(gc,hl)||hl),r._moduleDoBootstrap(n),n}));return ws(o)?o.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):o}catch(s){throw e.runOutsideAngular(function(){return t.handleError(s)}),s}var a}(i,o)})}},{key:"bootstrapModule",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=Zc({},n);return Hc(0,0,t).then(function(t){return e.bootstrapModuleFactory(t,i)})}},{key:"_moduleDoBootstrap",value:function(t){var e=t.injector.get(Kc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module ".concat(xt(t.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ')+"Please define one of these.");t.instance.ngDoBootstrap(e)}this._modules.push(t)}},{key:"onDestroy",value:function(t){this._destroyListeners.push(t)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Ya))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function Zc(t,e){return Array.isArray(e)?e.reduce(Zc,t):Object.assign(Object.assign({},t),e)}var Kc=function(){var t=function(){function t(e,n,i,r,a){var s=this;o(this,t),this._zone=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=a,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var l=new z(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),u=new z(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){Mc.assertNotInAngularZone(),Ac(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Mc.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=dt(l,u.pipe(function(t){return ft()((e=_t,function(t){var n;n="function"==typeof e?e:function(){return e};var i=Object.create(t,vt);return i.source=t,i.subjectFactory=n,i})(t));var e}))}return s(t,[{key:"bootstrap",value:function(t,e){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof kl?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(hu),o=n.create(Ya.NULL,[],e||n.selector,r),a=o.location.nativeElement,s=o.injector.get(Lc,null),l=s&&o.injector.get(Nc);return s&&l&&l.registerApplication(a,s),o.onDestroy(function(){i.detachView(o.hostView),$c(i.components,o),l&&l.unregisterApplication(a)}),this._loadComponent(o),o}},{key:"tick",value:function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var e,n=v(this._views);try{for(n.s();!(e=n.n()).done;)e.value.detectChanges()}catch(i){n.e(i)}finally{n.f()}}catch(r){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(r)})}finally{this._runningTick=!1}}},{key:"attachView",value:function(t){var e=t;this._views.push(e),e.attachToAppRef(this)}},{key:"detachView",value:function(t){var e=t;$c(this._views,e),e.detachFromAppRef()}},{key:"_loadComponent",value:function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(fc,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(t){return t.destroy()}),this._onMicrotaskEmptySubscription.unsubscribe()}},{key:"viewCount",get:function(){return this._views.length}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc),zi(Ya),zi(Nr),zi(Cl),zi(sc))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function $c(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Qc=function t(){o(this,t)},Jc=function t(){o(this,t)},th={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},eh=function(){var t=function(){function t(e,n){o(this,t),this._compiler=e,this._config=n||th}return s(t,[{key:"load",value:function(t){return this.loadAndCompile(t)}},{key:"loadAndCompile",value:function(t){var e=this,i=y(t.split("#"),2),r=i[0],o=i[1];return void 0===o&&(o="default"),n("zn8P")(r).then(function(t){return t[o]}).then(function(t){return nh(t,r,o)}).then(function(t){return e._compiler.compileModuleAsync(t)})}},{key:"loadFactory",value:function(t){var e=y(t.split("#"),2),i=e[0],r=e[1],o="NgFactory";return void 0===r&&(r="default",o=""),n("zn8P")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then(function(t){return t[r+o]}).then(function(t){return nh(t,i,r)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Sc),zi(Jc,8))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function nh(t,e,n){if(!t)throw new Error("Cannot find '".concat(n,"' in '").concat(e,"'"));return t}var ih=Wc(null,"core",[{provide:dc,useValue:"unknown"},{provide:Xc,deps:[Ya]},{provide:Nc,deps:[]},{provide:pc,deps:[]}]),rh=[{provide:Kc,useClass:Kc,deps:[Mc,Ya,Nr,Cl,sc]},{provide:xu,deps:[Mc],useFactory:function(t){var e=[];return t.onStable.subscribe(function(){for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:sc,useClass:sc,deps:[[new qi,ac]]},{provide:Sc,useClass:Sc,deps:[]},uc,{provide:Xl,useFactory:function(){return ou},deps:[]},{provide:Kl,useFactory:function(){return au},deps:[]},{provide:gc,useFactory:function(t){return dl(t=t||"undefined"!=typeof $localize&&$localize.locale||hl),t},deps:[[new Yi(gc),new qi,new Xi]]},{provide:mc,useValue:"USD"}],oh=function(){var t=function t(e){o(this,t)};return t.\u0275fac=function(e){return new(e||t)(zi(Kc))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:rh}),t}(),ah=null;function sh(){return ah}var lh=function t(){o(this,t)},uh=new wi("DocumentToken"),ch=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:hh,token:t,providedIn:"platform"}),t}();function hh(){return zi(fh)}var dh=new wi("Location Initialized"),fh=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this))._doc=t,i._init(),i}return s(n,[{key:"_init",value:function(){this.location=sh().getLocation(),this._history=sh().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return sh().getBaseHref(this._doc)}},{key:"onPopState",value:function(t){sh().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}},{key:"onHashChange",value:function(t){sh().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}},{key:"pushState",value:function(t,e,n){ph()?this._history.pushState(t,e,n):this.location.hash=n}},{key:"replaceState",value:function(t,e,n){ph()?this._history.replaceState(t,e,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{key:"href",get:function(){return this.location.href}},{key:"protocol",get:function(){return this.location.protocol}},{key:"hostname",get:function(){return this.location.hostname}},{key:"port",get:function(){return this.location.port}},{key:"pathname",get:function(){return this.location.pathname},set:function(t){this.location.pathname=t}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}(ch);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:gh,token:t,providedIn:"platform"}),t}();function ph(){return!!window.history.pushState}function gh(){return new fh(zi(uh))}function mh(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function vh(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function yh(t){return t&&"?"!==t[0]?"?"+t:t}var _h=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:bh,token:t,providedIn:"root"}),t}();function bh(t){var e=zi(uh).location;return new xh(zi(ch),e&&e.origin||"")}var wh=new wi("appBaseHref"),xh=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;if(o(this,n),(r=e.call(this))._platformLocation=t,null==i&&(i=r._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=i,r}return s(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(t){return mh(this._baseHref,t)}},{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._platformLocation.pathname+yh(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?"".concat(e).concat(n):e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(_h);return t.\u0275fac=function(e){return new(e||t)(zi(ch),zi(wh,8))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),kh=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._platformLocation=t,r._baseHref="",null!=i&&(r._baseHref=i),r}return s(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}},{key:"prepareExternalUrl",value:function(t){var e=mh(this._baseHref,t);return e.length>0?"#"+e:e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(_h);return t.\u0275fac=function(e){return new(e||t)(zi(ch),zi(wh,8))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Sh=function(){var t=function(){function t(e,n){var i=this;o(this,t),this._subject=new Bu,this._urlChangeListeners=[],this._platformStrategy=e;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=vh(Ah(r)),this._platformStrategy.onPopState(function(t){i._subject.emit({url:i.path(!0),pop:!0,state:t.state,type:t.type})})}return s(t,[{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(t))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(t+yh(e))}},{key:"normalize",value:function(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Ah(e)))}},{key:"prepareExternalUrl",value:function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}},{key:"go",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+yh(e)),n)}},{key:"replaceState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+yh(e)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(t){var e=this;this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(function(t){e._notifyUrlChangeListeners(t.url,t.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach(function(n){return n(t,e)})}},{key:"subscribe",value:function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(_h),zi(ch))},t.normalizeQueryParams=yh,t.joinWithSlash=mh,t.stripTrailingSlash=vh,t.\u0275prov=Ot({factory:Ch,token:t,providedIn:"root"}),t}();function Ch(){return new Sh(zi(_h),zi(ch))}function Ah(t){return t.replace(/\/index.html$/,"")}var Mh=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),Ih=function t(){o(this,t)},Th=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).locale=t,i}return s(n,[{key:"getPluralCategory",value:function(t,e){switch(function(t){return function(t){var e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t),n=ul(e);if(n)return n;var i=e.split("-")[0];if(n=ul(i))return n;if("en"===i)return sl;throw new Error('Missing locale data for the locale "'.concat(t,'".'))}(t)[cl.PluralCase]}(e||this.locale)(t)){case Mh.Zero:return"zero";case Mh.One:return"one";case Mh.Two:return"two";case Mh.Few:return"few";case Mh.Many:return"many";default:return"other"}}}]),n}(Ih);return t.\u0275fac=function(e){return new(e||t)(zi(gc))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function Dh(t,e){e=encodeURIComponent(e);var n,i=v(t.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.indexOf("="),a=y(-1==o?[r,""]:[r.slice(0,o),r.slice(o+1)],2),s=a[1];if(a[0].trim()===e)return decodeURIComponent(s)}}catch(l){i.e(l)}finally{i.f()}return null}var Eh=function(){var t=function(){function t(e,n,i,r){o(this,t),this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=i,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return s(t,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}},{key:"_applyKeyValueChanges",value:function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})}},{key:"_applyIterableChanges",value:function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got ".concat(xt(t.item)));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})}},{key:"_applyClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!0)}):Object.keys(t).forEach(function(n){return e._toggleClass(n,!!t[n])}))}},{key:"_removeClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return e._toggleClass(t,!1)}))}},{key:"_toggleClass",value:function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})}},{key:"klass",set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(ns(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Xl),hs(Kl),hs(Tl),hs(Ol))},t.\u0275dir=ve({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t}(),Oh=function(){function t(e,n,i,r){o(this,t),this.$implicit=e,this.ngForOf=n,this.index=i,this.count=r}return s(t,[{key:"first",get:function(){return 0===this.index}},{key:"last",get:function(){return this.index===this.count-1}},{key:"even",get:function(){return this.index%2==0}},{key:"odd",get:function(){return!this.even}}]),t}(),Ph=function(){var t=function(){function t(e,n,i){o(this,t),this._viewContainer=e,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return s(t,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(i){throw new Error("Cannot find a differ supporting object '".concat(t,"' of type '").concat((e=t).name||typeof e,"'. NgFor only supports binding to Iterables such as Arrays."))}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(t){var e=this,n=[];t.forEachOperation(function(t,i,r){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new Oh(null,e._ngForOf,-1,-1),null===r?void 0:r),a=new Rh(t,o);n.push(a)}else if(null==r)e._viewContainer.remove(null===i?void 0:i);else if(null!==i){var s=e._viewContainer.get(i);e._viewContainer.move(s,r);var l=new Rh(t,s);n.push(l)}});for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:jt.Default,e=nu(!0);if(null!=e||t&jt.Optional)return e;Et("ChangeDetectorRef")}())},t.\u0275pipe=ye({name:"async",type:t,pure:!1}),t}();function qh(t,e){return{key:t,value:e}}var Xh=function(){var t=function(){function t(e){o(this,t),this.differs=e,this.keyValues=[]}return s(t,[{key:"transform",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zh;if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());var i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem(function(t){e.keyValues.push(qh(t.key,t.currentValue))}),this.keyValues.sort(n)),this.keyValues}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Kl))},t.\u0275pipe=ye({name:"keyvalue",type:t,pure:!1}),t}();function Zh(t,e){var n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n1&&void 0!==arguments[1])||arguments[1],i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Jt.getAllAngularTestabilities=function(){return t.getAllTestabilities()},Jt.getAllAngularRootElements=function(){return t.getAllRootElements()},Jt.frameworkStabilizers||(Jt.frameworkStabilizers=[]),Jt.frameworkStabilizers.push(function(t){var e=Jt.getAllAngularTestabilities(),n=e.length,i=!1,r=function(e){i=i||e,0==--n&&t(i)};e.forEach(function(t){t.whenStable(r)})})}},{key:"findTestabilityInTree",value:function(t,e,n){if(null==e)return null;var i=t.getTestability(e);return null!=i?i:n?sh().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}],[{key:"init",value:function(){var e;e=new t,Fc=e}}]),t}(),ad=new wi("EventManagerPlugins"),sd=function(){var t=function(){function t(e,n){var i=this;o(this,t),this._zone=n,this._eventNameToPlugin=new Map,e.forEach(function(t){return t.manager=i}),this._plugins=e.slice().reverse()}return s(t,[{key:"addEventListener",value:function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}},{key:"addGlobalEventListener",value:function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,i=0;i-1&&(e.splice(n,1),o+=t+".")}),o+=r,0!=e.length||0===r.length)return null;var a={};return a.domEventName=i,a.fullKey=o,a}},{key:"getEventFullKey",value:function(t){var e="",n=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&Cd.hasOwnProperty(e)&&(e=Cd[e]))}return Sd[e]||e}(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),kd.forEach(function(i){i!=n&&(0,Ad[i])(t)&&(e+=i+".")}),e+=n}},{key:"eventCallback",value:function(t,e,i){return function(r){n.getEventFullKey(r)===t&&i.runGuarded(function(){return e(r)})}}},{key:"_normalizeKey",value:function(t){switch(t){case"esc":return"escape";default:return t}}}]),n}(ld);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Id=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return zi(Td)},token:t,providedIn:"root"}),t}(),Td=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this))._doc=t,i}return s(n,[{key:"sanitize",value:function(t,e){if(null==e)return null;switch(t){case Tr.NONE:return e;case Tr.HTML:return rr(e,"HTML")?ir(e):Mr(this._doc,String(e)).toString();case Tr.STYLE:return rr(e,"Style")?ir(e):e;case Tr.SCRIPT:if(rr(e,"Script"))return ir(e);throw new Error("unsafe value used in a script context");case Tr.URL:return or(e),rr(e,"URL")?ir(e):cr(String(e));case Tr.RESOURCE_URL:if(rr(e,"ResourceURL"))return ir(e);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(t," (see https://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(t){return new Qi(t)}},{key:"bypassSecurityTrustStyle",value:function(t){return new Ji(t)}},{key:"bypassSecurityTrustScript",value:function(t){return new tr(t)}},{key:"bypassSecurityTrustUrl",value:function(t){return new er(t)}},{key:"bypassSecurityTrustResourceUrl",value:function(t){return new nr(t)}}]),n}(Id);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:function(){return t=zi(Ta),new Td(t.get(uh));var t},token:t,providedIn:"root"}),t}(),Dd=Wc(ih,"browser",[{provide:dc,useValue:"browser"},{provide:hc,useValue:function(){ed.makeCurrent(),od.init()},multi:!0},{provide:uh,useFactory:function(){return function(t){Fe=t}(document),document},deps:[]}]),Ed=[[],{provide:Ea,useValue:"root"},{provide:Nr,useFactory:function(){return new Nr},deps:[]},{provide:ad,useClass:xd,multi:!0,deps:[uh,Mc,dc]},{provide:ad,useClass:Md,multi:!0,deps:[uh]},[],{provide:yd,useClass:yd,deps:[sd,cd,lc]},{provide:El,useExisting:yd},{provide:ud,useExisting:cd},{provide:cd,useClass:cd,deps:[uh]},{provide:Lc,useClass:Lc,deps:[Mc]},{provide:sd,useClass:sd,deps:[ad,Mc]},[]],Od=function(){var t=function(){function t(e){if(o(this,t),e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return s(t,null,[{key:"withServerTransition",value:function(e){return{ngModule:t,providers:[{provide:lc,useValue:e.appId},{provide:id,useExisting:lc},rd]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(t,12))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:Ed,imports:[Kh,oh]}),t}();function Pd(){for(var t=arguments.length,e=new Array(t),n=0;n0){var i=t.slice(0,e),r=i.toLowerCase(),o=t.slice(e+1).trim();n.maybeSetNormalizedName(i,r),n.headers.has(r)?n.headers.get(r).push(o):n.headers.set(r,[o])}})}:function(){n.headers=new Map,Object.keys(e).forEach(function(t){var i=e[t],r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(n.headers.set(r,i),n.maybeSetNormalizedName(t,r))})}:this.headers=new Map}return s(t,[{key:"has",value:function(t){return this.init(),this.headers.has(t.toLowerCase())}},{key:"get",value:function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(t){return this.init(),this.headers.get(t.toLowerCase())||null}},{key:"append",value:function(t,e){return this.clone({name:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({name:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({name:t,value:e,op:"d"})}},{key:"maybeSetNormalizedName",value:function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}},{key:"init",value:function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(t){return e.applyUpdate(t)}),this.lazyUpdate=null))}},{key:"copyFrom",value:function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach(function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))})}},{key:"clone",value:function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}},{key:"applyUpdate",value:function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var i=("a"===t.op?this.headers.get(e):void 0)||[];i.push.apply(i,b(n)),this.headers.set(e,i);break;case"d":var r=t.value;if(r){var o=this.headers.get(e);if(!o)return;0===(o=o.filter(function(t){return-1===r.indexOf(t)})).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}}},{key:"forEach",value:function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return t(e.normalizedNames.get(n),e.headers.get(n))})}}]),t}(),Hd=function(){function t(){o(this,t)}return s(t,[{key:"encodeKey",value:function(t){return Gd(t)}},{key:"encodeValue",value:function(t){return Gd(t)}},{key:"decodeKey",value:function(t){return decodeURIComponent(t)}},{key:"decodeValue",value:function(t){return decodeURIComponent(t)}}]),t}();function jd(t,e){var n=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(function(t){var i=t.indexOf("="),r=y(-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],2),o=r[0],a=r[1],s=n.get(o)||[];s.push(a),n.set(o,s)}),n}function Gd(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Ud=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,t),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new Hd,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=jd(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(function(t){var i=n.fromObject[t];e.map.set(t,Array.isArray(i)?i:[i])})):this.map=null}return s(t,[{key:"has",value:function(t){return this.init(),this.map.has(t)}},{key:"get",value:function(t){this.init();var e=this.map.get(t);return e?e[0]:null}},{key:"getAll",value:function(t){return this.init(),this.map.get(t)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(t,e){return this.clone({param:t,value:e,op:"a"})}},{key:"appendAll",value:function(t){var e=[];return Object.keys(t).forEach(function(n){var i=t[n];Array.isArray(i)?i.forEach(function(t){e.push({param:n,value:t,op:"a"})}):e.push({param:n,value:i,op:"a"})}),this.clone(e)}},{key:"set",value:function(t,e){return this.clone({param:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({param:t,value:e,op:"d"})}},{key:"toString",value:function(){var t=this;return this.init(),this.keys().map(function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map(function(e){return n+"="+t.encoder.encodeValue(e)}).join("&")}).filter(function(t){return""!==t}).join("&")}},{key:"clone",value:function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(e),n}},{key:"init",value:function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(e){return t.map.set(e,t.cloneFrom.map.get(e))}),this.updates.forEach(function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}}),this.cloneFrom=this.updates=null)}}]),t}();function Wd(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Yd(t){return"undefined"!=typeof Blob&&t instanceof Blob}function qd(t){return"undefined"!=typeof FormData&&t instanceof FormData}var Xd=function(){function t(e,n,i,r){var a;if(o(this,t),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,a=r):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new Bd),this.params){var s=this.params.toString();if(0===s.length)this.urlWithParams=n;else{var l=n.indexOf("?");this.urlWithParams=n+(-1===l?"?":l0&&void 0!==arguments[0]?arguments[0]:{},n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,a=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,s=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,l=e.headers||this.headers,u=e.params||this.params;return void 0!==e.setHeaders&&(l=Object.keys(e.setHeaders).reduce(function(t,n){return t.set(n,e.setHeaders[n])},l)),e.setParams&&(u=Object.keys(e.setParams).reduce(function(t,n){return t.set(n,e.setParams[n])},u)),new t(n,i,o,{params:u,headers:l,reportProgress:s,responseType:r,withCredentials:a})}}]),t}(),Zd=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({}),Kd=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";o(this,t),this.headers=e.headers||new Bd,this.status=void 0!==e.status?e.status:n,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300},$d=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=e.call(this,i)).type=Zd.ResponseHeader,t}return s(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Kd),Qd=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=e.call(this,i)).type=Zd.Response,t.body=void 0!==i.body?i.body:null,t}return s(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Kd),Jd=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t,0,"Unknown Error")).name="HttpErrorResponse",i.ok=!1,i.message=i.status>=200&&i.status<300?"Http failure during parsing for ".concat(t.url||"(unknown url)"):"Http failure response for ".concat(t.url||"(unknown url)",": ").concat(t.status," ").concat(t.statusText),i.error=t.error||null,i}return n}(Kd);function tf(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var ef=function(){var t=function(){function t(e){o(this,t),this.handler=e}return s(t,[{key:"request",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t instanceof Xd)n=t;else{var o=void 0;o=r.headers instanceof Bd?r.headers:new Bd(r.headers);var a=void 0;r.params&&(a=r.params instanceof Ud?r.params:new Ud({fromObject:r.params})),n=new Xd(t,e,void 0!==r.body?r.body:null,{headers:o,params:a,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}var s=Pd(n).pipe(Rd(function(t){return i.handler.handle(t)}));if(t instanceof Xd||"events"===r.observe)return s;var l=s.pipe(Ld(function(t){return t instanceof Qd}));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(q(function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return l.pipe(q(function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return l.pipe(q(function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return l.pipe(q(function(t){return t.body}))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type ".concat(r.observe,"}"))}}},{key:"delete",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",t,e)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",t,e)}},{key:"head",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",t,e)}},{key:"jsonp",value:function(t,e){return this.request("JSONP",t,{params:(new Ud).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",t,e)}},{key:"patch",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",t,tf(n,e))}},{key:"post",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",t,tf(n,e))}},{key:"put",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",t,tf(n,e))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Vd))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),nf=function(){function t(e,n){o(this,t),this.next=e,this.interceptor=n}return s(t,[{key:"handle",value:function(t){return this.interceptor.intercept(t,this.next)}}]),t}(),rf=new wi("HTTP_INTERCEPTORS"),of=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"intercept",value:function(t,e){return e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),af=/^\)\]\}',?\n/,sf=function t(){o(this,t)},lf=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"build",value:function(){return new XMLHttpRequest}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),uf=function(){var t=function(){function t(e){o(this,t),this.xhrFactory=e}return s(t,[{key:"handle",value:function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new z(function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach(function(t,e){return i.setRequestHeader(t,e.join(","))}),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var o=t.responseType.toLowerCase();i.responseType="json"!==o?o:"text"}var a=t.serializeBody(),s=null,l=function(){if(null!==s)return s;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new Bd(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new $d({headers:r,status:e,statusText:n,url:o})},u=function(){var e=l(),r=e.headers,o=e.status,a=e.statusText,s=e.url,u=null;204!==o&&(u=void 0===i.response?i.responseText:i.response),0===o&&(o=u?200:0);var c=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof u){var h=u;u=u.replace(af,"");try{u=""!==u?JSON.parse(u):null}catch(d){u=h,c&&(c=!1,u={error:d,text:u})}}c?(n.next(new Qd({body:u,headers:r,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new Jd({error:u,headers:r,status:o,statusText:a,url:s||void 0}))},c=function(t){var e=l(),r=new Jd({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e.url||void 0});n.error(r)},h=!1,d=function(e){h||(n.next(l()),h=!0);var r={type:Zd.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},f=function(t){var e={type:Zd.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",u),i.addEventListener("error",c),i.addEventListener("timeout",c),i.addEventListener("abort",c),t.reportProgress&&(i.addEventListener("progress",d),null!==a&&i.upload&&i.upload.addEventListener("progress",f)),i.send(a),n.next({type:Zd.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("abort",c),i.removeEventListener("load",u),i.removeEventListener("timeout",c),t.reportProgress&&(i.removeEventListener("progress",d),null!==a&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(sf))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),cf=new wi("XSRF_COOKIE_NAME"),hf=new wi("XSRF_HEADER_NAME"),df=function t(){o(this,t)},ff=function(){var t=function(){function t(e,n,i){o(this,t),this.doc=e,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return s(t,[{key:"getToken",value:function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Dh(t,this.cookieName),this.lastCookieString=t),this.lastToken}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(uh),zi(dc),zi(cf))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),pf=function(){var t=function(){function t(e,n){o(this,t),this.tokenService=e,this.headerName=n}return s(t,[{key:"intercept",value:function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(df),zi(hf))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),gf=function(){var t=function(){function t(e,n){o(this,t),this.backend=e,this.injector=n,this.chain=null}return s(t,[{key:"handle",value:function(t){if(null===this.chain){var e=this.injector.get(rf,[]);this.chain=e.reduceRight(function(t,e){return new nf(t,e)},this.backend)}return this.chain.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(zd),zi(Ya))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),mf=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"disable",value:function(){return{ngModule:t,providers:[{provide:pf,useClass:of}]}}},{key:"withOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.cookieName?{provide:cf,useValue:e.cookieName}:[],e.headerName?{provide:hf,useValue:e.headerName}:[]]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[pf,{provide:rf,useExisting:pf,multi:!0},{provide:df,useClass:ff},{provide:cf,useValue:"XSRF-TOKEN"},{provide:hf,useValue:"X-XSRF-TOKEN"}]}),t}(),vf=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[ef,{provide:Vd,useClass:gf},uf,{provide:zd,useExisting:uf},lf,{provide:sf,useExisting:lf}],imports:[[mf.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t}(),yf=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this))._value=t,i}return s(n,[{key:"_subscribe",value:function(t){var e=r(i(n.prototype),"_subscribe",this).call(this,t);return e&&!e.closed&&t.next(this._value),e}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new H;return this._value}},{key:"next",value:function(t){r(i(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(U),_f=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}},{key:"notifyError",value:function(t,e){this.destination.error(t)}},{key:"notifyComplete",value:function(t){this.destination.complete()}}]),n}(R),bf=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this)).parent=t,a.outerValue=i,a.outerIndex=r,a.index=0,a}return s(n,[{key:"_next",value:function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}},{key:"_error",value:function(t){this.parent.notifyError(t,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(R);function wf(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new bf(t,n,i);if(!r.closed)return e instanceof z?e.subscribe(r):et(e)(r)}var xf={};function kf(){for(var t=arguments.length,e=new Array(t),n=0;n=2&&(n=!0),function(i){return i.lift(new Hf(t,e,n))}}var Hf=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o(this,t),this.accumulator=e,this.seed=n,this.hasSeed=i}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new jf(t,this.accumulator,this.seed,this.hasSeed))}}]),t}(),jf=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t)).accumulator=i,s._seed=r,s.hasSeed=a,s.index=0,s}return s(n,[{key:"_next",value:function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}},{key:"_tryNext",value:function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(i){this.destination.error(i)}this.seed=e,this.destination.next(e)}},{key:"seed",get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t}}]),n}(R);function Gf(t){return function(e){var n=new Uf(t),i=e.lift(n);return n.caught=i}}var Uf=function(){function t(e){o(this,t),this.selector=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new Wf(t,this.selector,this.caught))}}]),t}(),Wf=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).selector=i,a.caught=r,a}return s(n,[{key:"error",value:function(t){if(!this.isStopped){var e;try{e=this.selector(t,this.caught)}catch(s){return void r(i(n.prototype),"error",this).call(this,s)}this._unsubscribeAndRecycle();var o=new rt(this);this.add(o);var a=at(e,o);a!==o&&this.add(a)}}}]),n}(ot);function Yf(t){return function(e){return 0===t?Df():e.lift(new qf(t))}}var qf=function(){function t(e){if(o(this,t),this.total=e,this.total<0)throw new Lf}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new Xf(t,this.total))}}]),t}(),Xf=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).total=i,r.ring=new Array,r.count=0,r}return s(n,[{key:"_next",value:function(t){var e=this.ring,n=this.total,i=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r0&&void 0!==arguments[0]?arguments[0]:Qf;return function(e){return e.lift(new Kf(t))}}var Kf=function(){function t(e){o(this,t),this.errorFactory=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new $f(t,this.errorFactory))}}]),t}(),$f=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).errorFactory=i,r.hasValue=!1,r}return s(n,[{key:"_next",value:function(t){this.hasValue=!0,this.destination.next(t)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}]),n}(R);function Qf(){return new Af}function Jf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e){return e.lift(new tp(t))}}var tp=function(){function t(e){o(this,t),this.defaultValue=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new ep(t,this.defaultValue))}}]),t}(),ep=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).defaultValue=i,r.isEmpty=!0,r}return s(n,[{key:"_next",value:function(t){this.isEmpty=!1,this.destination.next(t)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(R);function np(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Ld(function(e,n){return t(e,n,i)}):F,Nf(1),n?Jf(e):Zf(function(){return new Af}))}}function ip(){}function rp(t,e,n){return function(i){return i.lift(new op(t,e,n))}}var op=function(){function t(e,n,i){o(this,t),this.nextOrObserver=e,this.error=n,this.complete=i}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new ap(t,this.nextOrObserver,this.error,this.complete))}}]),t}(),ap=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t))._tapNext=ip,s._tapError=ip,s._tapComplete=ip,s._tapError=r||ip,s._tapComplete=a||ip,C(i)?(s._context=d(s),s._tapNext=i):i&&(s._context=i,s._tapNext=i.next||ip,s._tapError=i.error||ip,s._tapComplete=i.complete||ip),s}return s(n,[{key:"_next",value:function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}},{key:"_error",value:function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}]),n}(R),sp=function(){function t(e){o(this,t),this.callback=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new lp(t,this.callback))}}]),t}(),lp=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).add(new M(i)),r}return n}(R),up=function t(e,n){o(this,t),this.id=e,this.url=n},cp=function(t){u(n,t);var e=p(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return o(this,n),(r=e.call(this,t,i)).navigationTrigger=a,r.restoredState=s,r}return s(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(up),hp=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a}return s(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(up),dp=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t,i)).reason=r,a}return s(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(up),fp=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t,i)).error=r,a}return s(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(up),pp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),gp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),mp=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s){var l;return o(this,n),(l=e.call(this,t,i)).urlAfterRedirects=r,l.state=a,l.shouldActivate=s,l}return s(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(up),vp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),yp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),_p=function(){function t(e){o(this,t),this.route=e}return s(t,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),t}(),bp=function(){function t(e){o(this,t),this.route=e}return s(t,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),t}(),wp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),xp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),kp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),Sp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),Cp=function(){function t(e,n,i){o(this,t),this.routerEvent=e,this.position=n,this.anchor=i}return s(t,[{key:"toString",value:function(){var t=this.position?"".concat(this.position[0],", ").concat(this.position[1]):null;return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(t,"')")}}]),t}(),Ap="primary",Mp=function(){function t(e){o(this,t),this.params=e||{}}return s(t,[{key:"has",value:function(t){return Object.prototype.hasOwnProperty.call(this.params,t)}},{key:"get",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null}},{key:"getAll",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),t}();function Ip(t){return new Mp(t)}function Tp(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function Dp(t,e,n){var i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.length0?t[t.length-1]:null}function Lp(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Np(t){return ks(t)?t:ws(t)?it(Promise.resolve(t)):Pd(t)}function Fp(t,e,n){return n?function(t,e){return Ep(t,e)}(t.queryParams,e.queryParams)&&Vp(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(function(n){return Op(t[n],e[n])})}(t.queryParams,e.queryParams)&&zp(t.root,e.root)}function Vp(t,e){if(!Up(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(var n in e.children){if(!t.children[n])return!1;if(!Vp(t.children[n],e.children[n]))return!1}return!0}function zp(t,e){return Bp(t,e,e.segments)}function Bp(t,e,n){if(t.segments.length>n.length)return!!Up(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!Up(t.segments,n))return!1;for(var i in e.children){if(!t.children[i])return!1;if(!zp(t.children[i],e.children[i]))return!1}return!0}var r=n.slice(0,t.segments.length),o=n.slice(t.segments.length);return!!Up(t.segments,r)&&!!t.children.primary&&Bp(t.children.primary,e,o)}var Hp=function(){function t(e,n,i){o(this,t),this.root=e,this.queryParams=n,this.fragment=i}return s(t,[{key:"toString",value:function(){return qp.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ip(this.queryParams)),this._queryParamMap}}]),t}(),jp=function(){function t(e,n){var i=this;o(this,t),this.segments=e,this.children=n,this.parent=null,Lp(n,function(t,e){return t.parent=i})}return s(t,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return Xp(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),t}(),Gp=function(){function t(e,n){o(this,t),this.path=e,this.parameters=n}return s(t,[{key:"toString",value:function(){return eg(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=Ip(this.parameters)),this._parameterMap}}]),t}();function Up(t,e){return t.length===e.length&&t.every(function(t,n){return t.path===e[n].path})}var Wp=function t(){o(this,t)},Yp=function(){function t(){o(this,t)}return s(t,[{key:"parse",value:function(t){var e=new ag(t);return new Hp(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}},{key:"serialize",value:function(t){var e,n,i="/".concat(Zp(t.root,!0)),r=(e=t.queryParams,(n=Object.keys(e).map(function(t){var n=e[t];return Array.isArray(n)?n.map(function(e){return"".concat($p(t),"=").concat($p(e))}).join("&"):"".concat($p(t),"=").concat($p(n))})).length?"?".concat(n.join("&")):""),o="string"==typeof t.fragment?"#".concat(encodeURI(t.fragment)):"";return"".concat(i).concat(r).concat(o)}}]),t}(),qp=new Yp;function Xp(t){return t.segments.map(function(t){return eg(t)}).join("/")}function Zp(t,e){if(!t.hasChildren())return Xp(t);if(e){var n=t.children.primary?Zp(t.children.primary,!1):"",i=[];return Lp(t.children,function(t,e){e!==Ap&&i.push("".concat(e,":").concat(Zp(t,!1)))}),i.length>0?"".concat(n,"(").concat(i.join("//"),")"):n}var r=function(t,e){var n=[];return Lp(t.children,function(t,i){i===Ap&&(n=n.concat(e(t,i)))}),Lp(t.children,function(t,i){i!==Ap&&(n=n.concat(e(t,i)))}),n}(t,function(e,n){return n===Ap?[Zp(t.children.primary,!1)]:["".concat(n,":").concat(Zp(e,!1))]});return 1===Object.keys(t.children).length&&null!=t.children.primary?"".concat(Xp(t),"/").concat(r[0]):"".concat(Xp(t),"/(").concat(r.join("//"),")")}function Kp(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $p(t){return Kp(t).replace(/%3B/gi,";")}function Qp(t){return Kp(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Jp(t){return decodeURIComponent(t)}function tg(t){return Jp(t.replace(/\+/g,"%20"))}function eg(t){return"".concat(Qp(t.path)).concat((e=t.parameters,Object.keys(e).map(function(t){return";".concat(Qp(t),"=").concat(Qp(e[t]))}).join("")));var e}var ng=/^[^\/()?;=#]+/;function ig(t){var e=t.match(ng);return e?e[0]:""}var rg=/^[^=?&#]+/,og=/^[^?&#]+/,ag=function(){function t(e){o(this,t),this.url=e,this.remaining=e}return s(t,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new jp([],{}):new jp([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new jp(t,e)),n}},{key:"parseSegment",value:function(){var t=ig(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(t),new Gp(Jp(t),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t}},{key:"parseParam",value:function(t){var e=ig(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=ig(this.remaining);i&&this.capture(n=i)}t[Jp(e)]=Jp(n)}}},{key:"parseQueryParam",value:function(t){var e,n=(e=this.remaining.match(rg))?e[0]:"";if(n){this.capture(n);var i="";if(this.consumeOptional("=")){var r=function(t){var e=t.match(og);return e?e[0]:""}(this.remaining);r&&this.capture(i=r)}var o=tg(n),a=tg(i);if(t.hasOwnProperty(o)){var s=t[o];Array.isArray(s)||(t[o]=s=[s]),s.push(a)}else t[o]=a}}},{key:"parseParens",value:function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=ig(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error("Cannot parse url '".concat(this.url,"'"));var r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):t&&(r=Ap);var o=this.parseChildren();e[r]=1===Object.keys(o).length?o.primary:new jp([],o),this.consumeOptional("//")}return e}},{key:"peekStartsWith",value:function(t){return this.remaining.startsWith(t)}},{key:"consumeOptional",value:function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}},{key:"capture",value:function(t){if(!this.consumeOptional(t))throw new Error('Expected "'.concat(t,'".'))}}]),t}(),sg=function(){function t(e){o(this,t),this._root=e}return s(t,[{key:"parent",value:function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}},{key:"children",value:function(t){var e=lg(t,this._root);return e?e.children.map(function(t){return t.value}):[]}},{key:"firstChild",value:function(t){var e=lg(t,this._root);return e&&e.children.length>0?e.children[0].value:null}},{key:"siblings",value:function(t){var e=ug(t,this._root);return e.length<2?[]:e[e.length-2].children.map(function(t){return t.value}).filter(function(e){return e!==t})}},{key:"pathFromRoot",value:function(t){return ug(t,this._root).map(function(t){return t.value})}},{key:"root",get:function(){return this._root.value}}]),t}();function lg(t,e){if(t===e.value)return e;var n,i=v(e.children);try{for(i.s();!(n=i.n()).done;){var r=lg(t,n.value);if(r)return r}}catch(o){i.e(o)}finally{i.f()}return null}function ug(t,e){if(t===e.value)return[e];var n,i=v(e.children);try{for(i.s();!(n=i.n()).done;){var r=ug(t,n.value);if(r.length)return r.unshift(e),r}}catch(o){i.e(o)}finally{i.f()}return[]}var cg=function(){function t(e,n){o(this,t),this.value=e,this.children=n}return s(t,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),t}();function hg(t){var e={};return t&&t.children.forEach(function(t){return e[t.value.outlet]=t}),e}var dg=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).snapshot=i,_g(d(r),t),r}return s(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(sg);function fg(t,e){var n=function(t,e){var n=new vg([],{},{},"",{},Ap,e,null,t.root,-1,{});return new yg("",new cg(n,[]))}(t,e),i=new yf([new Gp("",{})]),r=new yf({}),o=new yf({}),a=new yf({}),s=new yf(""),l=new pg(i,r,a,s,o,Ap,e,n.root);return l.snapshot=n.root,new dg(new cg(l,[]),n)}var pg=function(){function t(e,n,i,r,a,s,l,u){o(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=s,this.component=l,this._futureSnapshot=u}return s(t,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(q(function(t){return Ip(t)}))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(q(function(t){return Ip(t)}))),this._queryParamMap}}]),t}();function gg(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=t.pathFromRoot,i=0;if("always"!==e)for(i=n.length-1;i>=1;){var r=n[i],o=n[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return mg(n.slice(i))}function mg(t){return t.reduce(function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}},{params:{},data:{},resolve:{}})}var vg=function(){function t(e,n,i,r,a,s,l,u,c,h,d){o(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=s,this.component=l,this.routeConfig=u,this._urlSegment=c,this._lastPathIndex=h,this._resolve=d}return s(t,[{key:"toString",value:function(){var t=this.url.map(function(t){return t.toString()}).join("/"),e=this.routeConfig?this.routeConfig.path:"";return"Route(url:'".concat(t,"', path:'").concat(e,"')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=Ip(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ip(this.queryParams)),this._queryParamMap}}]),t}(),yg=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,i)).url=t,_g(d(r),i),r}return s(n,[{key:"toString",value:function(){return bg(this._root)}}]),n}(sg);function _g(t,e){e.value._routerState=t,e.children.forEach(function(e){return _g(t,e)})}function bg(t){var e=t.children.length>0?" { ".concat(t.children.map(bg).join(", ")," } "):"";return"".concat(t.value).concat(e)}function wg(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Ep(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Ep(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;nr;){if(o-=r,!(i=i.parent))throw new Error("Invalid number of '../'");r=i.segments.length}return new Eg(i,!1,r-o)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(o,e,t),s=a.processChildren?Pg(a.segmentGroup,a.index,o.commands):Og(a.segmentGroup,a.index,o.commands);return Ig(a.segmentGroup,s,e,i,r)}function Ag(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Mg(t){return"object"==typeof t&&null!=t&&t.outlets}function Ig(t,e,n,i,r){var o={};return i&&Lp(i,function(t,e){o[e]=Array.isArray(t)?t.map(function(t){return"".concat(t)}):"".concat(t)}),new Hp(n.root===t?e:Tg(n.root,t,e),o,r)}function Tg(t,e,n){var i={};return Lp(t.children,function(t,r){i[r]=t===e?n:Tg(t,e,n)}),new jp(t.segments,i)}var Dg=function(){function t(e,n,i){if(o(this,t),this.isAbsolute=e,this.numberOfDoubleDots=n,this.commands=i,e&&i.length>0&&Ag(i[0]))throw new Error("Root segment cannot have matrix parameters");var r=i.find(Mg);if(r&&r!==Rp(i))throw new Error("{outlets:{}} has to be the last command")}return s(t,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),t}(),Eg=function t(e,n,i){o(this,t),this.segmentGroup=e,this.processChildren=n,this.index=i};function Og(t,e,n){if(t||(t=new jp([],{})),0===t.segments.length&&t.hasChildren())return Pg(t,e,n);var i=function(t,e,n){for(var i=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};r=n.length)return o;var a=t.segments[r],s=n[i];if(Mg(s))break;var l="".concat(s),u=i0&&void 0===l)break;if(l&&u&&"object"==typeof u&&void 0===u.outlets){if(!Fg(l,u,a))return o;i+=2}else{if(!Fg(l,{},a))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex1&&void 0!==arguments[1]?arguments[1]:"",n=0;n0)?Object.assign({},Qg):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};var r=(e.matcher||Dp)(n,t,e);if(!r)return Object.assign({},Qg);var o={};Lp(r.posParams,function(t,e){o[e]=t.path});var a=r.consumed.length>0?Object.assign(Object.assign({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:a,positionalParamSegments:null!==(i=r.posParams)&&void 0!==i?i:{}}}function tm(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"corrected";if(n.length>0&&im(t,n,i)){var o=new jp(e,nm(t,e,i,new jp(n,t.children)));return o._sourceSegment=t,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:[]}}if(0===n.length&&rm(t,n,i)){var a=new jp(t.segments,em(t,e,n,i,t.children,r));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:n}}var s=new jp(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function em(t,e,n,i,r,o){var a,s={},l=v(i);try{for(l.s();!(a=l.n()).done;){var u=a.value;if(om(t,n,u)&&!r[Kg(u)]){var c=new jp([],{});c._sourceSegment=t,c._segmentIndexShift="legacy"===o?t.segments.length:e.length,s[Kg(u)]=c}}}catch(h){l.e(h)}finally{l.f()}return Object.assign(Object.assign({},r),s)}function nm(t,e,n,i){var r={};r.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;var o,a=v(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(""===s.path&&Kg(s)!==Ap){var l=new jp([],{});l._sourceSegment=t,l._segmentIndexShift=e.length,r[Kg(s)]=l}}}catch(u){a.e(u)}finally{a.f()}return r}function im(t,e,n){return n.some(function(n){return om(t,e,n)&&Kg(n)!==Ap})}function rm(t,e,n){return n.some(function(n){return om(t,e,n)})}function om(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path}function am(t,e,n,i){return!!(Kg(t)===i||i!==Ap&&om(e,n,t))&&("**"===t.path||Jg(e,t,n).matched)}function sm(t,e,n){return 0===e.length&&!t.children[n]}var lm=function t(e){o(this,t),this.segmentGroup=e||null},um=function t(e){o(this,t),this.urlTree=e};function cm(t){return new z(function(e){return e.error(new lm(t))})}function hm(t){return new z(function(e){return e.error(new um(t))})}function dm(t){return new z(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(t,"'")))})}var fm=function(){function t(e,n,i,r,a){o(this,t),this.configLoader=n,this.urlSerializer=i,this.urlTree=r,this.config=a,this.allowRedirects=!0,this.ngModule=e.get(hu)}return s(t,[{key:"apply",value:function(){var t=this,e=tm(this.urlTree.root,[],[],this.config).segmentGroup,n=new jp(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,n,Ap).pipe(q(function(e){return t.createUrlTree(pm(e),t.urlTree.queryParams,t.urlTree.fragment)})).pipe(Gf(function(e){if(e instanceof um)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof lm)throw t.noMatchError(e);throw e}))}},{key:"match",value:function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,Ap).pipe(q(function(n){return e.createUrlTree(pm(n),t.queryParams,t.fragment)})).pipe(Gf(function(t){if(t instanceof lm)throw e.noMatchError(t);throw t}))}},{key:"noMatchError",value:function(t){return new Error("Cannot match any routes. URL Segment: '".concat(t.segmentGroup,"'"))}},{key:"createUrlTree",value:function(t,e,n){var i=t.segments.length>0?new jp([],_({},Ap,t)):t;return new Hp(i,e,n)}},{key:"expandSegmentGroup",value:function(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(q(function(t){return new jp([],t)})):this.expandSegment(t,n,e,n.segments,i,!0)}},{key:"expandChildren",value:function(t,e,n){for(var i=this,r=[],o=0,a=Object.keys(n.children);o=2;return function(i){return i.pipe(t?Ld(function(e,n){return t(e,n,i)}):F,Yf(1),n?Jf(e):Zf(function(){return new Af}))}}())}},{key:"expandSegment",value:function(t,e,n,i,r,o){var a=this;return it(n).pipe(Rd(function(s){return a.expandSegmentAgainstRoute(t,e,n,s,i,r,o).pipe(Gf(function(t){if(t instanceof lm)return Pd(null);throw t}))}),np(function(t){return!!t}),Gf(function(t,n){if(t instanceof Af||"EmptyError"===t.name){if(sm(e,i,r))return Pd(new jp([],{}));throw new lm(e)}throw t}))}},{key:"expandSegmentAgainstRoute",value:function(t,e,n,i,r,o,a){return am(i,e,r,o)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,r,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,o):cm(e):cm(e)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,o){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,o)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(t,e,n,i){var r=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?hm(o):this.lineralizeSegments(n,o).pipe(st(function(n){var o=new jp(n,{});return r.expandSegment(t,o,e,n,i,!1)}))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,o){var a=this,s=Jg(e,i,r),l=s.consumedSegments,u=s.lastChild,c=s.positionalParamSegments;if(!s.matched)return cm(e);var h=this.applyRedirectCommands(l,i.redirectTo,c);return i.redirectTo.startsWith("/")?hm(h):this.lineralizeSegments(i,h).pipe(st(function(i){return a.expandSegment(t,e,n,i.concat(r.slice(u)),o,!1)}))}},{key:"matchSegmentAgainstRoute",value:function(t,e,n,i,r){var o=this;if("**"===n.path)return n.loadChildren?(n._loadedConfig?Pd(n._loadedConfig):this.configLoader.load(t.injector,n)).pipe(q(function(t){return n._loadedConfig=t,new jp(i,{})})):Pd(new jp(i,{}));var a=Jg(e,n,i),s=a.consumedSegments,l=a.lastChild;if(!a.matched)return cm(e);var u=i.slice(l);return this.getChildConfig(t,n,i).pipe(st(function(t){var i=t.module,a=t.routes,l=tm(e,s,u,a),c=l.segmentGroup,h=l.slicedSegments,d=new jp(c.segments,c.children);if(0===h.length&&d.hasChildren())return o.expandChildren(i,a,d).pipe(q(function(t){return new jp(s,t)}));if(0===a.length&&0===h.length)return Pd(new jp(s,{}));var f=Kg(n)===r;return o.expandSegment(i,d,a,h,f?Ap:r,!0).pipe(q(function(t){return new jp(s.concat(t.segments),t.children)}))}))}},{key:"getChildConfig",value:function(t,e,n){var i=this;return e.children?Pd(new Bg(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Pd(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(st(function(n){return n?i.configLoader.load(t.injector,e).pipe(q(function(t){return e._loadedConfig=t,t})):function(t){return new z(function(e){return e.error(Tp("Cannot load children because the guard of the route \"path: '".concat(t.path,"'\" returned false")))})}(e)})):Pd(new Bg([],t))}},{key:"runCanLoadGuards",value:function(t,e,n){var i=this,r=e.canLoad;return r&&0!==r.length?Pd(r.map(function(i){var r,o=t.get(i);if(function(t){return t&&Hg(t.canLoad)}(o))r=o.canLoad(e,n);else{if(!Hg(o))throw new Error("Invalid CanLoad guard");r=o(e,n)}return Np(r)})).pipe(Ug(),rp(function(t){if(jg(t)){var e=Tp('Redirecting to "'.concat(i.urlSerializer.serialize(t),'"'));throw e.url=t,e}}),q(function(t){return!0===t})):Pd(!0)}},{key:"lineralizeSegments",value:function(t,e){for(var n=[],i=e.root;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Pd(n);if(i.numberOfChildren>1||!i.children.primary)return dm(t.redirectTo);i=i.children.primary}}},{key:"applyRedirectCommands",value:function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}},{key:"applyRedirectCreatreUrlTree",value:function(t,e,n,i){var r=this.createSegmentGroup(t,e.root,n,i);return new Hp(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}},{key:"createQueryParams",value:function(t,e){var n={};return Lp(t,function(t,i){if("string"==typeof t&&t.startsWith(":")){var r=t.substring(1);n[i]=e[r]}else n[i]=t}),n}},{key:"createSegmentGroup",value:function(t,e,n,i){var r=this,o=this.createSegments(t,e.segments,n,i),a={};return Lp(e.children,function(e,o){a[o]=r.createSegmentGroup(t,e,n,i)}),new jp(o,a)}},{key:"createSegments",value:function(t,e,n,i){var r=this;return e.map(function(e){return e.path.startsWith(":")?r.findPosParam(t,e,i):r.findOrReturn(e,n)})}},{key:"findPosParam",value:function(t,e,n){var i=n[e.path.substring(1)];if(!i)throw new Error("Cannot redirect to '".concat(t,"'. Cannot find '").concat(e.path,"'."));return i}},{key:"findOrReturn",value:function(t,e){var n,i=0,r=v(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.path===t.path)return e.splice(i),o;i++}}catch(a){r.e(a)}finally{r.f()}return t}}]),t}();function pm(t){for(var e={},n=0,i=Object.keys(t.children);n0||o.hasChildren())&&(e[r]=o)}return function(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new jp(t.segments.concat(e.segments),e.children)}return t}(new jp(t.segments,e))}var gm=function t(e){o(this,t),this.path=e,this.route=this.path[this.path.length-1]},mm=function t(e,n){o(this,t),this.component=e,this.route=n};function vm(t,e,n){var i=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function ym(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=hg(e);return t.children.forEach(function(t){_m(t,o[t.value.outlet],n,i.concat([t.value]),r),delete o[t.value.outlet]}),Lp(o,function(t,e){return wm(t,n.getContext(e),r)}),r}function _m(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=t.value,a=e?e.value:null,s=n?n.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){var l=bm(a,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new gm(i)):(o.data=a.data,o._resolvedData=a._resolvedData),ym(t,e,o.component?s?s.children:null:n,i,r),l&&s&&s.outlet&&s.outlet.isActivated&&r.canDeactivateChecks.push(new mm(s.outlet.component,a))}else a&&wm(e,s,r),r.canActivateChecks.push(new gm(i)),ym(t,null,o.component?s?s.children:null:n,i,r);return r}function bm(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Up(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Up(t.url,e.url)||!Ep(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xg(t,e)||!Ep(t.queryParams,e.queryParams);case"paramsChange":default:return!xg(t,e)}}function wm(t,e,n){var i=hg(t),r=t.value;Lp(i,function(t,i){wm(t,r.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new mm(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}var xm=function t(){o(this,t)};function km(t){return new z(function(e){return e.error(t)})}var Sm=function(){function t(e,n,i,r,a,s){o(this,t),this.rootComponentType=e,this.config=n,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=s}return s(t,[{key:"recognize",value:function(){var t=tm(this.urlTree.root,[],[],this.config.filter(function(t){return void 0===t.redirectTo}),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,Ap);if(null===e)return null;var n=new vg([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Ap,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new cg(n,e),r=new yg(this.url,i);return this.inheritParamsAndData(r._root),r}},{key:"inheritParamsAndData",value:function(t){var e=this,n=t.value,i=gg(n,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})}},{key:"processSegmentGroup",value:function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}},{key:"processChildren",value:function(t,e){for(var n=[],i=0,r=Object.keys(e.children);i0?Rp(n).parameters:{};r=new vg(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Im(t),Kg(t),t.component,t,Am(e),Mm(e)+n.length,Tm(t))}else{var l=Jg(e,t,n);if(!l.matched)return null;o=l.consumedSegments,a=n.slice(l.lastChild),r=new vg(o,l.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Im(t),Kg(t),t.component,t,Am(e),Mm(e)+o.length,Tm(t))}var u=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),c=tm(e,o,a,u.filter(function(t){return void 0===t.redirectTo}),this.relativeLinkResolution),h=c.segmentGroup,d=c.slicedSegments;if(0===d.length&&h.hasChildren()){var f=this.processChildren(u,h);return null===f?null:[new cg(r,f)]}if(0===u.length&&0===d.length)return[new cg(r,[])];var p=Kg(t)===i,g=this.processSegment(u,h,d,p?Ap:i);return null===g?null:[new cg(r,g)]}}]),t}();function Cm(t){var e,n=[],i=new Set,r=v(t);try{var o=function(){var t=e.value;if(!function(t){var e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}(t))return n.push(t),"continue";var r,o=n.find(function(e){return t.value.routeConfig===e.value.routeConfig});void 0!==o?((r=o.children).push.apply(r,b(t.children)),i.add(o)):n.push(t)};for(r.s();!(e=r.n()).done;)o()}catch(c){r.e(c)}finally{r.f()}var a,s=v(i);try{for(s.s();!(a=s.n()).done;){var l=a.value,u=Cm(l.children);n.push(new cg(l.value,u))}}catch(c){s.e(c)}finally{s.f()}return n.filter(function(t){return!i.has(t)})}function Am(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function Mm(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function Im(t){return t.data||{}}function Tm(t){return t.resolve||{}}function Dm(t){return Of(function(e){var n=t(e);return n?it(n).pipe(q(function(){return e})):Pd(e)})}var Em=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(function(){function t(){o(this,t)}return s(t,[{key:"shouldDetach",value:function(t){return!1}},{key:"store",value:function(t,e){}},{key:"shouldAttach",value:function(t){return!1}},{key:"retrieve",value:function(t){return null}},{key:"shouldReuseRoute",value:function(t,e){return t.routeConfig===e.routeConfig}}]),t}()),Om=new wi("ROUTES"),Pm=function(){function t(e,n,i,r){o(this,t),this.loader=e,this.compiler=n,this.onLoadStartListener=i,this.onLoadEndListener=r}return s(t,[{key:"load",value:function(t,e){var n=this;if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);var i=this.loadModuleFactory(e.loadChildren).pipe(q(function(i){n.onLoadEndListener&&n.onLoadEndListener(e);var r=i.create(t);return new Bg(Pp(r.injector.get(Om,void 0,jt.Self|jt.Optional)).map(Zg),r)}),Gf(function(t){throw e._loader$=void 0,t}));return e._loader$=new mt(i,function(){return new U}).pipe(ft()),e._loader$}},{key:"loadModuleFactory",value:function(t){var e=this;return"string"==typeof t?it(this.loader.load(t)):Np(t()).pipe(st(function(t){return t instanceof du?Pd(t):it(e.compiler.compileModuleAsync(t))}))}}]),t}(),Rm=function t(){o(this,t),this.outlet=null,this.route=null,this.resolver=null,this.children=new Lm,this.attachRef=null},Lm=function(){function t(){o(this,t),this.contexts=new Map}return s(t,[{key:"onChildOutletCreated",value:function(t,e){var n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}},{key:"onChildOutletDestroyed",value:function(t){var e=this.getContext(t);e&&(e.outlet=null)}},{key:"onOutletDeactivated",value:function(){var t=this.contexts;return this.contexts=new Map,t}},{key:"onOutletReAttached",value:function(t){this.contexts=t}},{key:"getOrCreateContext",value:function(t){var e=this.getContext(t);return e||(e=new Rm,this.contexts.set(t,e)),e}},{key:"getContext",value:function(t){return this.contexts.get(t)||null}}]),t}(),Nm=function(){function t(){o(this,t)}return s(t,[{key:"shouldProcessUrl",value:function(t){return!0}},{key:"extract",value:function(t){return t}},{key:"merge",value:function(t,e){return t}}]),t}();function Fm(t){throw t}function Vm(t,e,n){return e.parse("/")}function zm(t,e){return Pd(null)}var Bm=function(){var t=function(){function t(e,n,i,r,a,s,l,u){var c=this;o(this,t),this.rootComponentType=e,this.urlSerializer=n,this.rootContexts=i,this.location=r,this.config=u,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new U,this.errorHandler=Fm,this.malformedUriErrorHandler=Vm,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:zm,afterPreactivation:zm},this.urlHandlingStrategy=new Nm,this.routeReuseStrategy=new Em,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=a.get(hu),this.console=a.get(pc);var h=a.get(Mc);this.isNgZoneEnabled=h instanceof Mc&&Mc.isInAngularZone(),this.resetConfig(u),this.currentUrlTree=new Hp(new jp([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Pm(s,l,function(t){return c.triggerEvent(new _p(t))},function(t){return c.triggerEvent(new bp(t))}),this.routerState=fg(this.currentUrlTree,this.rootComponentType),this.transitions=new yf({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return s(t,[{key:"setupNavigations",value:function(t){var e=this,n=this.events;return t.pipe(Ld(function(t){return 0!==t.id}),q(function(t){return Object.assign(Object.assign({},t),{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})}),Of(function(t){var i,r,o,a,s=!1,l=!1;return Pd(t).pipe(rp(function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?Object.assign(Object.assign({},e.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Of(function(t){var i,r,o,a,s=!e.navigated||t.extractedUrl.toString()!==e.browserUrlTree.toString();if(("reload"===e.onSameUrlNavigation||s)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Pd(t).pipe(Of(function(t){var i=e.transitions.getValue();return n.next(new cp(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==e.transitions.getValue()?Tf:Promise.resolve(t)}),(i=e.ngModule.injector,r=e.configLoader,o=e.urlSerializer,a=e.config,Of(function(t){return function(t,e,n,i,r){return new fm(t,e,n,i,r).apply()}(i,r,o,t.extractedUrl,a).pipe(q(function(e){return Object.assign(Object.assign({},t),{urlAfterRedirects:e})}))})),rp(function(t){e.currentNavigation=Object.assign(Object.assign({},e.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,n,i,r,o){return st(function(i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";try{var a=new Sm(t,e,n,i,r,o).recognize();return null===a?km(new xm):Pd(a)}catch(s){return km(s)}}(t,n,i.urlAfterRedirects,(a=i.urlAfterRedirects,e.serializeUrl(a)),r,o).pipe(q(function(t){return Object.assign(Object.assign({},i),{targetSnapshot:t})}));var a})}(e.rootComponentType,e.config,0,e.paramsInheritanceStrategy,e.relativeLinkResolution),rp(function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects);var i=new pp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.next(i)}));if(s&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var l=t.extractedUrl,u=t.source,c=t.restoredState,h=t.extras,d=new cp(t.id,e.serializeUrl(l),u,c);n.next(d);var f=fg(l,e.rootComponentType).snapshot;return Pd(Object.assign(Object.assign({},t),{targetSnapshot:f,urlAfterRedirects:l,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),Tf}),Dm(function(t){var n=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})}),rp(function(t){var n=new gp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}),q(function(t){return Object.assign(Object.assign({},t),{guards:(n=t.targetSnapshot,i=t.currentSnapshot,r=e.rootContexts,o=n._root,ym(o,i?i._root:null,r,[o.value]))});var n,i,r,o}),function(t,e){return st(function(n){var i=n.targetSnapshot,r=n.currentSnapshot,o=n.guards,a=o.canActivateChecks,s=o.canDeactivateChecks;return 0===s.length&&0===a.length?Pd(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return it(t).pipe(st(function(t){return function(t,e,n,i,r){var o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?Pd(o.map(function(o){var a,s=vm(o,e,r);if(function(t){return t&&Hg(t.canDeactivate)}(s))a=Np(s.canDeactivate(t,e,n,i));else{if(!Hg(s))throw new Error("Invalid CanDeactivate guard");a=Np(s(t,e,n,i))}return a.pipe(np())})).pipe(Ug()):Pd(!0)}(t.component,t.route,n,e,i)}),np(function(t){return!0!==t},!0))}(s,i,r,t).pipe(st(function(n){return n&&"boolean"==typeof n?function(t,e,n,i){return it(e).pipe(Rd(function(e){return If(function(t,e){return null!==t&&e&&e(new wp(t)),Pd(!0)}(e.route.parent,i),function(t,e){return null!==t&&e&&e(new kp(t)),Pd(!0)}(e.route,i),function(t,e,n){var i=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(function(t){return function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t}).map(function(e){return Ef(function(){return Pd(e.guards.map(function(r){var o,a=vm(r,e.node,n);if(function(t){return t&&Hg(t.canActivateChild)}(a))o=Np(a.canActivateChild(i,t));else{if(!Hg(a))throw new Error("Invalid CanActivateChild guard");o=Np(a(i,t))}return o.pipe(np())})).pipe(Ug())})});return Pd(r).pipe(Ug())}(t,e.path,n),function(t,e,n){var i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Pd(i.map(function(i){return Ef(function(){var r,o=vm(i,e,n);if(function(t){return t&&Hg(t.canActivate)}(o))r=Np(o.canActivate(e,t));else{if(!Hg(o))throw new Error("Invalid CanActivate guard");r=Np(o(e,t))}return r.pipe(np())})})).pipe(Ug()):Pd(!0)}(t,e.route,n))}),np(function(t){return!0!==t},!0))}(i,a,t,e):Pd(n)}),q(function(t){return Object.assign(Object.assign({},n),{guardsResult:t})}))})}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),rp(function(t){if(jg(t.guardsResult)){var n=Tp('Redirecting to "'.concat(e.serializeUrl(t.guardsResult),'"'));throw n.url=t.guardsResult,n}var i=new mp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(i)}),Ld(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var i=new dp(t.id,e.serializeUrl(t.extractedUrl),"");return n.next(i),t.resolve(!1),!1}return!0}),Dm(function(t){if(t.guards.canActivateChecks.length)return Pd(t).pipe(rp(function(t){var n=new vp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}),Of(function(t){var i,r,o=!1;return Pd(t).pipe((i=e.paramsInheritanceStrategy,r=e.ngModule.injector,st(function(t){var e=t.targetSnapshot,n=t.guards.canActivateChecks;if(!n.length)return Pd(t);var o=0;return it(n).pipe(Rd(function(t){return function(t,e,n,i){return function(t,e,n,i){var r=Object.keys(t);if(0===r.length)return Pd({});var o={};return it(r).pipe(st(function(r){return function(t,e,n,i){var r=vm(t,e,i);return Np(r.resolve?r.resolve(e,n):r(e,n))}(t[r],e,n,i).pipe(rp(function(t){o[r]=t}))}),Yf(1),st(function(){return Object.keys(o).length===r.length?Pd(o):Tf}))}(t._resolve,t,e,i).pipe(q(function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),gg(t,n).resolve),null}))}(t.route,e,i,r)}),rp(function(){return o++}),Yf(1),st(function(e){return o===n.length?Pd(t):Tf}))})),rp({next:function(){return o=!0},complete:function(){if(!o){var i=new dp(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");n.next(i),t.resolve(!1)}}}))}),rp(function(t){var n=new yp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}))}),Dm(function(t){var n=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})}),q(function(t){var n,i,r,o=(r=kg(e.routeReuseStrategy,(n=t.targetSnapshot)._root,(i=t.currentRouterState)?i._root:void 0),new dg(r,n));return Object.assign(Object.assign({},t),{targetRouterState:o})}),rp(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)}),(r=e.rootContexts,o=e.routeReuseStrategy,a=function(t){return e.triggerEvent(t)},q(function(t){return new Vg(o,t.targetRouterState,t.currentRouterState,a).activate(r),t})),rp({next:function(){s=!0},complete:function(){s=!0}}),(i=function(){if(!s&&!l){e.resetUrlToCurrentUrlTree();var i=new dp(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID ".concat(t.id," is not equal to the current navigation id ").concat(e.navigationId));n.next(i),t.resolve(!1)}e.currentNavigation=null},function(t){return t.lift(new sp(i))}),Gf(function(i){if(l=!0,(s=i)&&s.ngNavigationCancelingError){var r=jg(i.url);r||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var o=new dp(t.id,e.serializeUrl(t.extractedUrl),i.message);n.next(o),r?setTimeout(function(){var n=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);e.scheduleNavigation(n,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var a=new fp(t.id,e.serializeUrl(t.extractedUrl),i);n.next(a);try{t.resolve(e.errorHandler(i))}catch(u){t.reject(u)}}var s;return Tf}))}))}},{key:"resetRootComponentType",value:function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}},{key:"setTransition",value:function(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var n=t.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,n)&&setTimeout(function(){var e=n.source,i=n.state,r=n.urlTree,o={replaceUrl:!0};if(i){var a=Object.assign({},i);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}t.scheduleNavigation(r,e,i,o)},0),t.lastLocationChangeInfo=n}))}},{key:"extractLocationChangeInfoFromEvent",value:function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}},{key:"shouldScheduleNavigation",value:function(t,e){if(!t)return!0;var n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(t){this.events.next(t)}},{key:"resetConfig",value:function(t){Yg(t),this.config=t.map(Zg),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}},{key:"createUrlTree",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.relativeTo,i=e.queryParams,r=e.fragment,o=e.queryParamsHandling,a=e.preserveFragment,s=n||this.routerState.root,l=a?this.currentUrlTree.fragment:r,u=null;switch(o){case"merge":u=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=i||null}return null!==u&&(u=this.removeEmptyProps(u)),Cg(s,this.currentUrlTree,t,u,l)}},{key:"navigateByUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1},n=jg(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}},{key:"navigate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return Hm(t),this.navigateByUrl(this.createUrlTree(t,e),e)}},{key:"serializeUrl",value:function(t){return this.urlSerializer.serialize(t)}},{key:"parseUrl",value:function(t){var e;try{e=this.urlSerializer.parse(t)}catch(n){e=this.malformedUriErrorHandler(n,this.urlSerializer,t)}return e}},{key:"isActive",value:function(t,e){if(jg(t))return Fp(this.currentUrlTree,t,e);var n=this.parseUrl(t);return Fp(this.currentUrlTree,n,e)}},{key:"removeEmptyProps",value:function(t){return Object.keys(t).reduce(function(e,n){var i=t[n];return null!=i&&(e[n]=i),e},{})}},{key:"processNavigations",value:function(){var t=this;this.navigations.subscribe(function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new hp(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,e.resolve(!0)},function(e){t.console.warn("Unhandled Navigation Error: ")})}},{key:"scheduleNavigation",value:function(t,e,n,i,r){if(this.disposed)return Promise.resolve(!1);var o,a,s,l=this.getTransition(),u="imperative"!==e&&"imperative"===(null==l?void 0:l.source),c=(this.lastSuccessfulId===l.id||this.currentNavigation?l.rawUrl:l.urlAfterRedirects).toString()===t.toString();if(u&&c)return Promise.resolve(!0);r?(o=r.resolve,a=r.reject,s=r.promise):s=new Promise(function(t,e){o=t,a=e});var h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:o,reject:a,promise:s,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),s.catch(function(t){return Promise.reject(t)})}},{key:"setBrowserUrl",value:function(t,e,n,i){var r=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}},{key:"resetStateAndUrl",value:function(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}},{key:"resetUrlToCurrentUrlTree",value:function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}},{key:"url",get:function(){return this.serializeUrl(this.currentUrlTree)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ki),zi(Wp),zi(Lm),zi(Sh),zi(Ya),zi(Qc),zi(Sc),zi(void 0))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function Hm(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};o(this,t),this.router=e,this.viewportScroller=n,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}return s(t,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var t=this;return this.router.events.subscribe(function(e){e instanceof cp?(t.store[t.lastId]=t.viewportScroller.getScrollPosition(),t.lastSource=e.navigationTrigger,t.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof hp&&(t.lastId=e.id,t.scheduleScrollEvent(e,t.router.parseUrl(e.urlAfterRedirects).fragment))})}},{key:"consumeScrollEvents",value:function(){var t=this;return this.router.events.subscribe(function(e){e instanceof Cp&&(e.position?"top"===t.options.scrollPositionRestoration?t.viewportScroller.scrollToPosition([0,0]):"enabled"===t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===t.options.anchorScrolling?t.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition([0,0]))})}},{key:"scheduleScrollEvent",value:function(t,e){this.router.triggerEvent(new Cp(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Bm),zi($h),zi(void 0))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Qm=new wi("ROUTER_CONFIGURATION"),Jm=new wi("ROUTER_FORROOT_GUARD"),tv=[Sh,{provide:Wp,useClass:Yp},{provide:Bm,useFactory:function(t,e,n,i,r,o,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0,c=new Bm(null,t,e,n,i,r,o,Pp(a));if(l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),sv(s,c),s.enableTracing){var h=sh();c.events.subscribe(function(t){h.logGroup("Router Event: ".concat(t.constructor.name)),h.log(t.toString()),h.log(t),h.logGroupEnd()})}return c},deps:[Wp,Lm,Sh,Ya,Qc,Sc,Om,Qm,[function t(){o(this,t)},new qi],[function t(){o(this,t)},new qi]]},Lm,{provide:pg,useFactory:function(t){return t.routerState.root},deps:[Bm]},{provide:Qc,useClass:eh},Km,Zm,Xm,{provide:Qm,useValue:{enableTracing:!1}}];function ev(){return new Gc("Router",Bm)}var nv=function(){var t=function(){function t(e,n){o(this,t)}return s(t,null,[{key:"forRoot",value:function(e,n){return{ngModule:t,providers:[tv,av(e),{provide:Jm,useFactory:ov,deps:[[Bm,new qi,new Xi]]},{provide:Qm,useValue:n||{}},{provide:_h,useFactory:rv,deps:[ch,[new Yi(wh),new qi],Qm]},{provide:$m,useFactory:iv,deps:[Bm,$h,Qm]},{provide:qm,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Zm},{provide:Gc,multi:!0,useFactory:ev},[lv,{provide:ac,multi:!0,useFactory:uv,deps:[lv]},{provide:hv,useFactory:cv,deps:[lv]},{provide:fc,multi:!0,useExisting:hv}]]}}},{key:"forChild",value:function(e){return{ngModule:t,providers:[av(e)]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Jm,8),zi(Bm,8))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}();function iv(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new $m(t,e,n)}function rv(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new kh(t,e):new xh(t,e)}function ov(t){return"guarded"}function av(t){return[{provide:xi,multi:!0,useValue:t},{provide:Om,multi:!0,useValue:t}]}function sv(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}var lv=function(){var t=function(){function t(e){o(this,t),this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new U}return s(t,[{key:"appInitializer",value:function(){var t=this;return this.injector.get(dh,Promise.resolve(null)).then(function(){var e=null,n=new Promise(function(t){return e=t}),i=t.injector.get(Bm),r=t.injector.get(Qm);return"disabled"===r.initialNavigation?(i.setUpLocationChangeListener(),e(!0)):"enabled"===r.initialNavigation||"enabledBlocking"===r.initialNavigation?(i.hooks.afterPreactivation=function(){return t.initNavigation?Pd(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},i.initialNavigation()):e(!0),n})}},{key:"bootstrapListener",value:function(t){var e=this.injector.get(Qm),n=this.injector.get(Km),i=this.injector.get($m),r=this.injector.get(Bm),o=this.injector.get(Kc);t===o.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||r.initialNavigation(),n.setUpPreloading(),i.init(),r.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Ya))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function uv(t){return t.appInitializer.bind(t)}function cv(t){return t.bootstrapListener.bind(t)}var hv=new wi("Router Initializer"),dv=function(){function t(t){this.user=t.user,this.role=t.role,this.admin=t.admin}return Object.defineProperty(t.prototype,"isStaff",{get:function(){return"staff"===this.role||"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdmin",{get:function(){return"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogged",{get:function(){return null!=this.user},enumerable:!1,configurable:!0}),t}();function fv(t){return null!=t&&"false"!=="".concat(t)}function pv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return gv(t)?Number(t):e}function gv(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function mv(t){return Array.isArray(t)?t:[t]}function vv(t){return null==t?"":"string"==typeof t?t:"".concat(t,"px")}function yv(t){return t instanceof Tl?t.nativeElement:t}function _v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\s+/,n=[];if(null!=t){var i,r=Array.isArray(t)?t:"".concat(t).split(e),o=v(r);try{for(o.s();!(i=o.n()).done;){var a=i.value,s="".concat(a).trim();s&&n.push(s)}}catch(l){o.e(l)}finally{o.f()}}return n}function bv(t,e,n,i){return C(n)&&(i=n,n=void 0),i?bv(t,e,n).pipe(q(function(t){return k(t)?i.apply(void 0,b(t)):i(t)})):new z(function(i){wv(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}function wv(t,e,n,i,r){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var a=t;t.addEventListener(e,n,r),o=function(){return a.removeEventListener(e,n,r)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var s=t;t.on(e,n),o=function(){return s.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var l=t;t.addListener(e,n),o=function(){return l.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var u=0,c=t.length;u1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}},{key:"requestAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(t.flush.bind(t,this),n)}},{key:"recycleAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}},{key:"execute",value:function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}]),n}(function(t){u(n,t);var e=p(n);function n(t,i){return o(this,n),e.call(this)}return s(n,[{key:"schedule",value:function(t){return this}}]),n}(M)),kv=function(){var t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.now;o(this,t),this.SchedulerAction=e,this.now=n}return s(t,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,t).schedule(n,e)}}]),t}();return t.now=function(){return Date.now()},t}(),Sv=function(t){u(n,t);var e=p(n);function n(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kv.now;return o(this,n),(i=e.call(this,t,function(){return n.delegate&&n.delegate!==d(i)?n.delegate.now():r()})).actions=[],i.active=!1,i.scheduled=void 0,i}return s(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(t,e,o):r(i(n.prototype),"schedule",this).call(this,t,e,o)}},{key:"flush",value:function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}}]),n}(kv),Cv=1,Av=function(){return Promise.resolve()}(),Mv={};function Iv(t){return t in Mv&&(delete Mv[t],!0)}var Tv=function(t){var e=Cv++;return Mv[e]=!0,Av.then(function(){return Iv(e)&&t()}),e},Dv=function(t){Iv(t)},Ev=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return s(n,[{key:"requestAsyncId",value:function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==o&&o>0?r(i(n.prototype),"requestAsyncId",this).call(this,t,e,o):(t.actions.push(this),t.scheduled||(t.scheduled=Tv(t.flush.bind(t,null))))}},{key:"recycleAsyncId",value:function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==o&&o>0||null===o&&this.delay>0)return r(i(n.prototype),"recycleAsyncId",this).call(this,t,e,o);0===t.actions.length&&(Dv(e),t.scheduled=void 0)}}]),n}(xv),Ov=new(function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i=0}function Hv(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=-1;return Bv(e)?i=Number(e)<1?1:Number(e):Y(e)&&(n=e),Y(n)||(n=Nv),new z(function(e){var r=Bv(t)?t:+t-n.now();return n.schedule(jv,r,{index:0,period:i,subscriber:e})})}function jv(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function Gv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv;return Fv(function(){return Hv(t,e)})}function Uv(t){return function(e){return e.lift(new Wv(t))}}var Wv=function(){function t(e){o(this,t),this.notifier=e}return s(t,[{key:"call",value:function(t,e){var n=new Yv(t),i=at(this.notifier,new rt(n));return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}]),t}(),Yv=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t)).seenValue=!1,i}return s(n,[{key:"notifyNext",value:function(){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(ot);function qv(t,e){return new z(e?function(n){return e.schedule(Xv,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function Xv(t){t.subscriber.error(t.error)}var Zv,Kv=function(){var t=function(){function t(e,n,i){o(this,t),this.kind=e,this.value=n,this.error=i,this.hasValue="N"===e}return s(t,[{key:"observe",value:function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}},{key:"do",value:function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}},{key:"accept",value:function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Pd(this.value);case"E":return qv(this.error);case"C":return Df()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}},{key:"createError",value:function(e){return new t("E",void 0,e)}},{key:"createComplete",value:function(){return t.completeNotification}}]),t}();return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();try{Zv="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(fH){Zv=!1}var $v,Qv,Jv,ty,ey=function(){var t=function t(e){o(this,t),this._platformId=e,this.isBrowser=this._platformId?"browser"===this._platformId:"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Zv)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT};return t.\u0275fac=function(e){return new(e||t)(zi(dc))},t.\u0275prov=Ot({factory:function(){return new t(zi(dc))},token:t,providedIn:"root"}),t}(),ny=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),iy=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function ry(){if($v)return $v;if("object"!=typeof document||!document)return $v=new Set(iy);var t=document.createElement("input");return $v=new Set(iy.filter(function(e){return t.setAttribute("type",e),t.type===e}))}function oy(t){return function(){if(null==Qv&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Qv=!0}}))}finally{Qv=Qv||!1}return Qv}()?t:!!t.capture}function ay(){if(null==Jv){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Jv=!1;if("scrollBehavior"in document.documentElement.style)Jv=!0;else{var t=Element.prototype.scrollTo;Jv=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return Jv}function sy(t){if(function(){if(null==ty){var t="undefined"!=typeof document?document.head:null;ty=!(!t||!t.createShadowRoot&&!t.attachShadow)}return ty}()){var e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}var ly=new wi("cdk-dir-doc",{providedIn:"root",factory:function(){return Bi(uh)}}),uy=function(){var t=function(){function t(e){if(o(this,t),this.value="ltr",this.change=new Bu,e){var n=(e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null);this.value="ltr"===n||"rtl"===n?n:"ltr"}}return s(t,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ly,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(ly,8))},token:t,providedIn:"root"}),t}(),cy=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),hy=function t(){o(this,t)};function dy(t){return t&&"function"==typeof t.connect}var fy=function(){function t(){o(this,t)}return s(t,[{key:"applyChanges",value:function(t,e,n,i,r){t.forEachOperation(function(t,i,o){var a,s;if(null==t.previousIndex){var l=n(t,i,o);a=e.createEmbeddedView(l.templateRef,l.context,l.index),s=1}else null==o?(e.remove(i),s=3):(a=e.get(i),e.move(a,o),s=2);r&&r({context:null==a?void 0:a.context,operation:s,record:t})})}},{key:"detach",value:function(){}}]),t}(),py=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];o(this,t),this._multiple=n,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new U,i&&i.length&&(n?i.forEach(function(t){return e._markSelected(t)}):this._markSelected(i[0]),this._selectedToEmit.length=0)}return s(t,[{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new z(function(n){t._globalSubscription||t._addGlobalListener();var i=e>0?t._scrolled.pipe(Gv(e)).subscribe(n):t._scrolled.subscribe(n);return t._scrolledCount++,function(){i.unsubscribe(),t._scrolledCount--,t._scrolledCount||t._removeGlobalListener()}}):Pd()}},{key:"ngOnDestroy",value:function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)}),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Ld(function(t){return!t||n.indexOf(t)>-1}))}},{key:"getAncestorScrollContainers",value:function(t){var e=this,n=[];return this.scrollContainers.forEach(function(i,r){e._scrollableContainsElement(r,t)&&n.push(r)}),n}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_scrollableContainsElement",value:function(t,e){var n=yv(e),i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return bv(t._getWindow().document,"scroll").subscribe(function(){return t._scrolled.next()})})}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc),zi(ey),zi(uh,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(Mc),zi(ey),zi(uh,8))},token:t,providedIn:"root"}),t}(),vy=function(){var t=function(){function t(e,n,i){var r=this;o(this,t),this._platform=e,this._change=new U,this._changeListener=function(t){r._change.next(t)},this._document=i,n.runOutsideAngular(function(){if(e.isBrowser){var t=r._getWindow();t.addEventListener("resize",r._changeListener),t.addEventListener("orientationchange",r._changeListener)}r.change().subscribe(function(){return r._updateViewportSize()})})}return s(t,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}},{key:"getViewportRect",value:function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,i=e.height;return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+n,height:i,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=this._document,e=this._getWindow(),n=t.documentElement,i=n.getBoundingClientRect();return{top:-i.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-i.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return t>0?this._change.pipe(Gv(t)):this._change}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_updateViewportSize",value:function(){var t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey),zi(Mc),zi(uh,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey),zi(Mc),zi(uh,8))},token:t,providedIn:"root"}),t}(),yy=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),_y=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[cy,ny,yy],cy,yy]}),t}(),by=function(){function t(){o(this,t)}return s(t,[{key:"attach",value:function(t){return this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),wy=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this)).component=t,s.viewContainerRef=i,s.injector=r,s.componentFactoryResolver=a,s}return n}(by),xy=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this)).templateRef=t,a.viewContainerRef=i,a.context=r,a}return s(n,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,r(i(n.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,r(i(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(by),ky=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).element=t instanceof Tl?t.nativeElement:t,i}return n}(by),Sy=function(){function t(){o(this,t),this._isDisposed=!1,this.attachDomPortal=null}return s(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t instanceof wy?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof xy?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof ky?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(t){this._disposeFn=t}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),t}(),Cy=function(t){u(n,t);var e=p(n);function n(t,a,s,l,u){var c,h;return o(this,n),(h=e.call(this)).outletElement=t,h._componentFactoryResolver=a,h._appRef=s,h._defaultInjector=l,h.attachDomPortal=function(t){var e=t.element,o=h._document.createComment("dom-portal");e.parentNode.insertBefore(o,e),h.outletElement.appendChild(e),h._attachedPortal=t,r((c=d(h),i(n.prototype)),"setDisposeFn",c).call(c,function(){o.parentNode&&o.parentNode.replaceChild(e,o)})},h._document=u,h}return s(n,[{key:"attachComponentPortal",value:function(t){var e,n=this,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(function(){return e.destroy()})):(e=i.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){n._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}},{key:"attachTemplatePortal",value:function(t){var e=this,n=t.viewContainerRef,i=n.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),i.detectChanges(),this.setDisposeFn(function(){var t=n.indexOf(i);-1!==t&&n.remove(t)}),this._attachedPortal=t,i}},{key:"dispose",value:function(){r(i(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),n}(Sy),Ay=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){return o(this,n),e.call(this,t,i)}return n}(xy);return t.\u0275fac=function(e){return new(e||t)(hs(lu),hs(pu))},t.\u0275dir=ve({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[Xa]}),t}(),My=function(){var t=function(t){u(n,t);var e=p(n);function n(t,a,s){var l,u;return o(this,n),(u=e.call(this))._componentFactoryResolver=t,u._viewContainerRef=a,u._isInitialized=!1,u.attached=new Bu,u.attachDomPortal=function(t){var e=t.element,o=u._document.createComment("dom-portal");t.setAttachedHost(d(u)),e.parentNode.insertBefore(o,e),u._getRootNode().appendChild(e),u._attachedPortal=t,r((l=d(u),i(n.prototype)),"setDisposeFn",l).call(l,function(){o.parentNode&&o.parentNode.replaceChild(e,o)})},u._document=s,u}return s(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(t){t.setAttachedHost(this);var e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,o=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),a=e.createComponent(o,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),r(i(n.prototype),"setDisposeFn",this).call(this,function(){return a.destroy()}),this._attachedPortal=t,this._attachedRef=a,this.attached.emit(a),a}},{key:"attachTemplatePortal",value:function(t){var e=this;t.setAttachedHost(this);var o=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return r(i(n.prototype),"setDisposeFn",this).call(this,function(){return e._viewContainerRef.clear()}),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}},{key:"_getRootNode",value:function(){var t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&r(i(n.prototype),"detach",this).call(this),t&&r(i(n.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(Sy);return t.\u0275fac=function(e){return new(e||t)(hs(Cl),hs(pu),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Xa]}),t}(),Iy=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),Ty=function(){function t(e,n){o(this,t),this.predicate=e,this.inclusive=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new Dy(t,this.predicate,this.inclusive))}}]),t}(),Dy=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).predicate=i,a.inclusive=r,a.index=0,a}return s(n,[{key:"_next",value:function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(i){return void n.error(i)}this.nextOrComplete(t,e)}},{key:"nextOrComplete",value:function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())}}]),n}(R),Ey=13,Oy=27,Py=32,Ry=35,Ly=36,Ny=37,Fy=38,Vy=39,zy=40;function By(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;ie.height||t.scrollWidth>e.width}}]),t}(),Gy=function(){function t(e,n,i,r){var a=this;o(this,t),this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=function(){a.disable(),a._overlayRef.hasAttached()&&a._ngZone.run(function(){return a._overlayRef.detach()})}}return s(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),Uy=function(){function t(){o(this,t)}return s(t,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),t}();function Wy(t,e){return e.some(function(e){return t.bottome.bottom||t.righte.right})}function Yy(t,e){return e.some(function(e){return t.tope.bottom||t.lefte.right})}var qy=function(){function t(e,n,i,r){o(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}return s(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),i=n.width,r=n.height;Wy(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),Xy=function(){var t=function t(e,n,i,r){var a=this;o(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this.noop=function(){return new Uy},this.close=function(t){return new Gy(a._scrollDispatcher,a._ngZone,a._viewportRuler,t)},this.block=function(){return new jy(a._viewportRuler,a._document)},this.reposition=function(t){return new qy(a._scrollDispatcher,a._viewportRuler,a._ngZone,t)},this._document=r};return t.\u0275fac=function(e){return new(e||t)(zi(my),zi(vy),zi(Mc),zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(my),zi(vy),zi(Mc),zi(uh))},token:t,providedIn:"root"}),t}(),Zy=function t(e){if(o(this,t),this.scrollStrategy=new Uy,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e)for(var n=0,i=Object.keys(e);n-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(uh))},token:t,providedIn:"root"}),t}(),Jy=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t))._keydownListener=function(t){for(var e=i._attachedOverlays,n=e.length-1;n>-1;n--)if(e[n]._keydownEvents.observers.length>0){e[n]._keydownEvents.next(t);break}},i}return s(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),n}(Qy);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(uh))},token:t,providedIn:"root"}),t}(),t_=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t))._platform=i,r._cursorStyleIsSet=!1,r._clickListener=function(t){for(var e=t.composedPath?t.composedPath()[0]:t.target,n=r._attachedOverlays.slice(),i=n.length-1;i>-1;i--){var o=n[i];if(!(o._outsidePointerEvents.observers.length<1)&&o.hasAttached()){if(o.overlayElement.contains(e))break;o._outsidePointerEvents.next(t)}}},r}return s(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}]),n}(Qy);return t.\u0275fac=function(e){return new(e||t)(zi(uh),zi(ey))},t.\u0275prov=Ot({factory:function(){return new t(zi(uh),zi(ey))},token:t,providedIn:"root"}),t}(),e_=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),n_=function(){var t=function(){function t(e,n){o(this,t),this._platform=n,this._document=e}return s(t,[{key:"ngOnDestroy",value:function(){var t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var t="cdk-overlay-container";if(this._platform.isBrowser||e_)for(var e=this._document.querySelectorAll(".".concat(t,'[platform="server"], ')+".".concat(t,'[platform="test"]')),n=0;nf&&(f=m,d=g)}}catch(y){p.e(y)}finally{p.f()}return this._isPushed=!1,void this._applyPosition(d.position,d.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&s_(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(r_),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}},{key:"withScrollableContainers",value:function(t){return this._scrollables=t,this}},{key:"withPositions",value:function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(t){return this._viewportMargin=t,this}},{key:"withFlexibleDimensions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=t,this}},{key:"withGrowAfterOpen",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=t,this}},{key:"withPush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=t,this}},{key:"withLockedPosition",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=t,this}},{key:"setOrigin",value:function(t){return this._origin=t,this}},{key:"withDefaultOffsetX",value:function(t){return this._offsetX=t,this}},{key:"withDefaultOffsetY",value:function(t){return this._offsetY=t,this}},{key:"withTransformOriginOn",value:function(t){return this._transformOriginSelector=t,this}},{key:"_getOriginPoint",value:function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var i=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;n="start"==e.originX?i:r}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}},{key:"_getOverlayPoint",value:function(t,e,n){var i;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}}},{key:"_getOverlayFit",value:function(t,e,n,i){var r=u_(e),o=t.x,a=t.y,s=this._getOffset(i,"x"),l=this._getOffset(i,"y");s&&(o+=s),l&&(a+=l);var u=0-a,c=a+r.height-n.height,h=this._subtractOverflows(r.width,0-o,o+r.width-n.width),d=this._subtractOverflows(r.height,u,c),f=h*d;return{visibleArea:f,isCompletelyWithinViewport:r.width*r.height===f,fitsInViewportVertically:d===r.height,fitsInViewportHorizontally:h==r.width}}},{key:"_canFitWithFlexibleDimensions",value:function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,o=l_(this._overlayRef.getConfig().minHeight),a=l_(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=o&&o<=i)&&(t.fitsInViewportHorizontally||null!=a&&a<=r)}return!1}},{key:"_pushOverlayOnScreen",value:function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var i,r,o=u_(e),a=this._viewportRect,s=Math.max(t.x+o.width-a.width,0),l=Math.max(t.y+o.height-a.height,0),u=Math.max(a.top-n.top-t.y,0),c=Math.max(a.left-n.left-t.x,0);return this._previousPushAmount={x:i=o.width<=a.width?c||-s:t.xh&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-h/2)}if("end"===e.overlayX&&!u||"start"===e.overlayX&&u)s=l.width-t.x+this._viewportMargin,o=t.x-this._viewportMargin;else if("start"===e.overlayX&&!u||"end"===e.overlayX&&u)a=t.x,o=l.right-t.x;else{var d=Math.min(l.right-t.x+l.left,t.x),f=this._lastBoundingBoxSize.width;a=t.x-d,(o=2*d)>f&&!this._isInitialRender&&!this._growAfterOpen&&(a=t.x-f/2)}return{top:i,left:a,bottom:r,right:s,width:o,height:n}}},{key:"_setBoundingBoxStyles",value:function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;i.height=vv(n.height),i.top=vv(n.top),i.bottom=vv(n.bottom),i.width=vv(n.width),i.left=vv(n.left),i.right=vv(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=vv(r)),o&&(i.maxWidth=vv(o))}this._lastBoundingBoxSize=n,s_(this._boundingBox.style,i)}},{key:"_resetBoundingBoxStyles",value:function(){s_(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){s_(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(t,e){var n={},i=this._hasExactPosition(),r=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(i){var a=this._viewportRuler.getViewportScrollPosition();s_(n,this._getExactOverlayY(e,t,a)),s_(n,this._getExactOverlayX(e,t,a))}else n.position="static";var s="",l=this._getOffset(e,"x"),u=this._getOffset(e,"y");l&&(s+="translateX(".concat(l,"px) ")),u&&(s+="translateY(".concat(u,"px)")),n.transform=s.trim(),o.maxHeight&&(i?n.maxHeight=vv(o.maxHeight):r&&(n.maxHeight="")),o.maxWidth&&(i?n.maxWidth=vv(o.maxWidth):r&&(n.maxWidth="")),s_(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(t,e,n){var i={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));var o=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=o,"bottom"===t.overlayY?i.bottom="".concat(this._document.documentElement.clientHeight-(r.y+this._overlayRect.height),"px"):i.top=vv(r.y),i}},{key:"_getExactOverlayX",value:function(t,e,n){var i={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right="".concat(this._document.documentElement.clientWidth-(r.x+this._overlayRect.width),"px"):i.left=vv(r.x),i}},{key:"_getScrollVisibility",value:function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:Yy(t,n),isOriginOutsideView:Wy(t,n),isOverlayClipped:Yy(e,n),isOverlayOutsideView:Wy(e,n)}}},{key:"_subtractOverflows",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}},{key:"left",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}},{key:"right",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}},{key:"width",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}},{key:"height",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}},{key:"centerHorizontally",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(t),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(t),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),i=n.width,r=n.height,o=n.maxWidth,a=n.maxHeight,s=!("100%"!==i&&"100vw"!==i||o&&"100%"!==o&&"100vw"!==o),l=!("100%"!==r&&"100vh"!==r||a&&"100%"!==a&&"100vh"!==a);t.position=this._cssPosition,t.marginLeft=s?"0":this._leftOffset,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,s?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=l?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(h_),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}]),t}(),f_=function(){var t=function(){function t(e,n,i,r){o(this,t),this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r}return s(t,[{key:"global",value:function(){return new d_}},{key:"connectedTo",value:function(t,e,n){return new c_(e,n,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(t){return new a_(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(vy),zi(uh),zi(ey),zi(n_))},t.\u0275prov=Ot({factory:function(){return new t(zi(vy),zi(uh),zi(ey),zi(n_))},token:t,providedIn:"root"}),t}(),p_=0,g_=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d){o(this,t),this.scrollStrategies=e,this._overlayContainer=n,this._componentFactoryResolver=i,this._positionBuilder=r,this._keyboardDispatcher=a,this._injector=s,this._ngZone=l,this._document=u,this._directionality=c,this._location=h,this._outsideClickDispatcher=d}return s(t,[{key:"create",value:function(t){var e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),r=new Zy(t);return r.direction=r.direction||this._directionality.value,new i_(i,e,n,r,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-".concat(p_++),e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}},{key:"_createHostElement",value:function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}},{key:"_createPortalOutlet",value:function(t){return this._appRef||(this._appRef=this._injector.get(Kc)),new Cy(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Xy),zi(n_),zi(Cl),zi(f_),zi(Jy),zi(Ya),zi(Mc),zi(uh),zi(uy),zi(Sh),zi(t_))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),m_=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],v_=new wi("cdk-connected-overlay-scroll-strategy"),y_=function(){var t=function t(e){o(this,t),this.elementRef=e};return t.\u0275fac=function(e){return new(e||t)(hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t}(),__=function(){var t=function(){function t(e,n,i,r,a){o(this,t),this._overlay=e,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=M.EMPTY,this._attachSubscription=M.EMPTY,this._detachSubscription=M.EMPTY,this._positionSubscription=M.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new Bu,this.positionChange=new Bu,this.attach=new Bu,this.detach=new Bu,this.overlayKeydown=new Bu,this.overlayOutsideClick=new Bu,this._templatePortal=new xy(n,i),this._scrollStrategyFactory=r,this.scrollStrategy=this._scrollStrategyFactory()}return s(t,[{key:"ngOnDestroy",value:function(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}},{key:"ngOnChanges",value:function(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var t=this;this.positions&&this.positions.length||(this.positions=m_);var e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(function(){return t.attach.emit()}),this._detachSubscription=e.detachments().subscribe(function(){return t.detach.emit()}),e.keydownEvents().subscribe(function(e){t.overlayKeydown.next(e),e.keyCode!==Oy||t.disableClose||By(e)||(e.preventDefault(),t._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(function(e){t.overlayOutsideClick.next(e)})}},{key:"_buildConfig",value:function(){var t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new Zy({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}},{key:"_updatePositionStrategy",value:function(t){var e=this,n=this.positions.map(function(t){return{originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||e.offsetX,offsetY:t.offsetY||e.offsetY,panelClass:t.panelClass||void 0}});return t.setOrigin(this.origin.elementRef).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}},{key:"_createPositionStrategy",value:function(){var t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}},{key:"_attachOverlay",value:function(){var t=this;this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(function(e){t.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return n.lift(new Ty(t,e))}}(function(){return t.positionChange.observers.length>0})).subscribe(function(e){t.positionChange.emit(e),0===t.positionChange.observers.length&&t._positionSubscription.unsubscribe()}))}},{key:"_detachOverlay",value:function(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}},{key:"offsetX",get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=fv(t)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(t){this._lockPosition=fv(t)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(t){this._flexibleDimensions=fv(t)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(t){this._growAfterOpen=fv(t)}},{key:"push",get:function(){return this._push},set:function(t){this._push=fv(t)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(lu),hs(pu),hs(v_),hs(uy,8))},t.\u0275dir=ve({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[Ee]}),t}(),b_={provide:v_,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},w_=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[g_,b_],imports:[[cy,Iy,_y],_y]}),t}();function x_(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv;return function(n){return n.lift(new k_(t,e))}}var k_=function(){function t(e,n){o(this,t),this.dueTime=e,this.scheduler=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new S_(t,this.dueTime,this.scheduler))}}]),t}(),S_=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).dueTime=i,a.scheduler=r,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return s(n,[{key:"_next",value:function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(C_,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}},{key:"clearDebounce",value:function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}]),n}(R);function C_(t){t.debouncedNext()}var A_=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"create",value:function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),M_=function(){var t=function(){function t(e){o(this,t),this._mutationObserverFactory=e,this._observedElements=new Map}return s(t,[{key:"ngOnDestroy",value:function(){var t=this;this._observedElements.forEach(function(e,n){return t._cleanupObserver(n)})}},{key:"observe",value:function(t){var e=this,n=yv(t);return new z(function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}})}},{key:"_observeElement",value:function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new U,n=this._mutationObserverFactory.create(function(t){return e.next(t)});n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}},{key:"_unobserveElement",value:function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}},{key:"_cleanupObserver",value:function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(A_))},t.\u0275prov=Ot({factory:function(){return new t(zi(A_))},token:t,providedIn:"root"}),t}(),I_=function(){var t=function(){function t(e,n,i){o(this,t),this._contentObserver=e,this._elementRef=n,this._ngZone=i,this.event=new Bu,this._disabled=!1,this._currentSubscription=null}return s(t,[{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(function(){t._currentSubscription=(t.debounce?e.pipe(x_(t.debounce)):e).subscribe(t.event)})}},{key:"_unsubscribe",value:function(){var t;null===(t=this._currentSubscription)||void 0===t||t.unsubscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=fv(t),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(t){this._debounce=pv(t),this._subscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(M_),hs(Tl),hs(Mc))},t.\u0275dir=ve({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t}(),T_=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[A_]}),t}();function D_(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}var E_="cdk-describedby-message-container",O_="cdk-describedby-message",P_="cdk-describedby-host",R_=0,L_=new Map,N_=null,F_=function(){var t=function(){function t(e){o(this,t),this._document=e}return s(t,[{key:"describe",value:function(t,e,n){if(this._canBeDescribed(t,e)){var i=V_(e,n);"string"!=typeof e?(z_(e),L_.set(i,{messageElement:e,referenceCount:0})):L_.has(i)||this._createMessageElement(e,n),this._isElementDescribedByMessage(t,i)||this._addMessageReference(t,i)}}},{key:"removeDescription",value:function(t,e,n){if(e&&this._isElementNode(t)){var i=V_(e,n);if(this._isElementDescribedByMessage(t,i)&&this._removeMessageReference(t,i),"string"==typeof e){var r=L_.get(i);r&&0===r.referenceCount&&this._deleteMessageElement(i)}N_&&0===N_.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var t=this._document.querySelectorAll("[".concat(P_,"]")),e=0;e-1&&e!==n._activeItemIndex&&(n._activeItemIndex=e)}})}return s(t,[{key:"skipPredicate",value:function(t){return this._skipPredicateFn=t,this}},{key:"withWrap",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=t,this}},{key:"withVerticalOrientation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=t,this}},{key:"withHorizontalOrientation",value:function(t){return this._horizontal=t,this}},{key:"withAllowedModifierKeys",value:function(t){return this._allowedModifierKeys=t,this}},{key:"withTypeAhead",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(rp(function(e){return t._pressedLetters.push(e)}),x_(e),Ld(function(){return t._pressedLetters.length>0}),q(function(){return t._pressedLetters.join("")})).subscribe(function(e){for(var n=t._getItemsArray(),i=1;i0&&void 0!==arguments[0])||arguments[0];return this._homeAndEnd=t,this}},{key:"setActiveItem",value:function(t){var e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}},{key:"onKeydown",value:function(t){var e=this,n=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(function(n){return!t[n]||e._allowedModifierKeys.indexOf(n)>-1});switch(n){case 9:return void this.tabOut.next();case zy:if(this._vertical&&i){this.setNextItemActive();break}return;case Fy:if(this._vertical&&i){this.setPreviousItemActive();break}return;case Vy:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case Ny:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case Ly:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case Ry:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||By(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],t.preventDefault()}},{key:"isTyping",value:function(){return this._pressedLetters.length>0}},{key:"setFirstItemActive",value:function(){this._setActiveItemByIndex(0,1)}},{key:"setLastItemActive",value:function(){this._setActiveItemByIndex(this._items.length-1,-1)}},{key:"setNextItemActive",value:function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}},{key:"setPreviousItemActive",value:function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}},{key:"updateActiveItem",value:function(t){var e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t),i=e[n];this._activeItem=null==i?null:i,this._activeItemIndex=n}},{key:"_setActiveItemByDelta",value:function(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}},{key:"_setActiveInWrapMode",value:function(t){for(var e=this._getItemsArray(),n=1;n<=e.length;n++){var i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}}},{key:"_setActiveInDefaultMode",value:function(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}},{key:"_setActiveItemByIndex",value:function(t,e){var n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}},{key:"_getItemsArray",value:function(){return this._items instanceof ju?this._items.toArray():this._items}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}}]),t}(),H_=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"setActiveItem",value:function(t){this.activeItem&&this.activeItem.setInactiveStyles(),r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.setActiveStyles()}}]),n}(B_),j_=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._origin="program",t}return s(n,[{key:"setFocusOrigin",value:function(t){return this._origin=t,this}},{key:"setActiveItem",value:function(t){r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.focus(this._origin)}}]),n}(B_),G_=function(){var t=function(){function t(e){o(this,t),this._platform=e}return s(t,[{key:"isDisabled",value:function(t){return t.hasAttribute("disabled")}},{key:"isVisible",value:function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}},{key:"isTabbable",value:function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(fH){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){if(-1===W_(n))return!1;if(!this.isVisible(n))return!1}var i=t.nodeName.toLowerCase(),r=W_(t);return t.hasAttribute("contenteditable")?-1!==r:"iframe"!==i&&"object"!==i&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&("audio"===i?!!t.hasAttribute("controls")&&-1!==r:"video"===i?-1!==r&&(null!==r||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}},{key:"isFocusable",value:function(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||U_(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey))},token:t,providedIn:"root"}),t}();function U_(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function W_(t){if(!U_(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var Y_=function(){function t(e,n,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o(this,t),this._element=e,this._checker=n,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return a.focusLastTabbableElement()},this.endAnchorListener=function(){return a.focusFirstTabbableElement()},this._enabled=!0,s||this.attachAnchors()}return s(t,[{key:"destroy",value:function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}},{key:"attachAnchors",value:function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t.startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}},{key:"focusInitialElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusInitialElement())})})}},{key:"focusFirstTabbableElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusFirstTabbableElement())})})}},{key:"focusLastTabbableElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusLastTabbableElement())})})}},{key:"_getRegionBoundary",value:function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-".concat(t,"], ")+"[cdkFocusRegion".concat(t,"], ")+"[cdk-focus-".concat(t,"]")),n=0;n=0;n--){var i=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(i)return i}return null}},{key:"_createAnchor",value:function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}},{key:"_toggleAnchorTabIndex",value:function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}},{key:"toggleAnchors",value:function(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}},{key:"_executeOnStable",value:function(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Nf(1)).subscribe(t)}},{key:"enabled",get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}}]),t}(),q_=function(){var t=function(){function t(e,n,i){o(this,t),this._checker=e,this._ngZone=n,this._document=i}return s(t,[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Y_(t,this._checker,this._ngZone,this._document,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(G_),zi(Mc),zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(G_),zi(Mc),zi(uh))},token:t,providedIn:"root"}),t}(),X_=function(){var t=function(){function t(e,n,i){o(this,t),this._elementRef=e,this._focusTrapFactory=n,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return s(t,[{key:"ngOnDestroy",value:function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}},{key:"ngAfterContentInit",value:function(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}},{key:"ngDoCheck",value:function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}},{key:"ngOnChanges",value:function(t){var e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}},{key:"_captureFocus",value:function(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}},{key:"enabled",get:function(){return this.focusTrap.enabled},set:function(t){this.focusTrap.enabled=fv(t)}},{key:"autoCapture",get:function(){return this._autoCapture},set:function(t){this._autoCapture=fv(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(q_),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[Ee]}),t}();"undefined"!=typeof Element&∈var Z_=new wi("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),K_=new wi("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),$_=function(){var t=function(){function t(e,n,i,r){o(this,t),this._ngZone=n,this._defaultOptions=r,this._document=i,this._liveElement=e||this._createLiveElement()}return s(t,[{key:"announce",value:function(t){for(var e,n,i=this,r=this._defaultOptions,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1&&void 0!==arguments[1]&&arguments[1],n=yv(t);if(!this._platform.isBrowser||1!==n.nodeType)return Pd(null);var i=sy(n)||this._getDocument(),r=this._elementInfo.get(n);if(r)return e&&(r.checkChildren=!0),r.subject;var o={checkChildren:e,subject:new U,rootNode:i};return this._elementInfo.set(n,o),this._registerGlobalListeners(o),o.subject}},{key:"stopMonitoring",value:function(t){var e=yv(t),n=this._elementInfo.get(e);n&&(n.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(n))}},{key:"focusVia",value:function(t,e,n){var i=this,r=yv(t);r===this._getDocument().activeElement?this._getClosestElementsInfo(r).forEach(function(t){var n=y(t,2);return i._originChanged(n[0],e,n[1])}):(this._setOriginForCurrentEventQueue(e),"function"==typeof r.focus&&r.focus(n))}},{key:"ngOnDestroy",value:function(){var t=this;this._elementInfo.forEach(function(e,n){return t.stopMonitoring(n)})}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_toggleClass",value:function(t,e,n){n?t.classList.add(e):t.classList.remove(e)}},{key:"_getFocusOrigin",value:function(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}},{key:"_setClasses",value:function(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}},{key:"_setOriginForCurrentEventQueue",value:function(t){var e=this;this._ngZone.runOutsideAngular(function(){e._origin=t,0===e._detectionMode&&(e._originTimeoutId=setTimeout(function(){return e._origin=null},1))})}},{key:"_wasCausedByTouch",value:function(t){var e=rb(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(t,e){var n=this._elementInfo.get(e);n&&(n.checkChildren||e===rb(t))&&this._originChanged(e,this._getFocusOrigin(t),n)}},{key:"_onBlur",value:function(t,e){var n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(t,e){this._ngZone.run(function(){return t.next(e)})}},{key:"_registerGlobalListeners",value:function(t){var e=this;if(this._platform.isBrowser){var n=t.rootNode,i=this._rootNodeFocusListenerCount.get(n)||0;i||this._ngZone.runOutsideAngular(function(){n.addEventListener("focus",e._rootNodeFocusAndBlurListener,nb),n.addEventListener("blur",e._rootNodeFocusAndBlurListener,nb)}),this._rootNodeFocusListenerCount.set(n,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(function(){var t=e._getDocument(),n=e._getWindow();t.addEventListener("keydown",e._documentKeydownListener,nb),t.addEventListener("mousedown",e._documentMousedownListener,nb),t.addEventListener("touchstart",e._documentTouchstartListener,nb),n.addEventListener("focus",e._windowFocusListener)})}}},{key:"_removeGlobalListeners",value:function(t){var e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){var n=this._rootNodeFocusListenerCount.get(e);n>1?this._rootNodeFocusListenerCount.set(e,n-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,nb),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,nb),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){var i=this._getDocument(),r=this._getWindow();i.removeEventListener("keydown",this._documentKeydownListener,nb),i.removeEventListener("mousedown",this._documentMousedownListener,nb),i.removeEventListener("touchstart",this._documentTouchstartListener,nb),r.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}},{key:"_originChanged",value:function(t,e,n){this._setClasses(t,e),this._emitOrigin(n.subject,e),this._lastFocusOrigin=e}},{key:"_getClosestElementsInfo",value:function(t){var e=[];return this._elementInfo.forEach(function(n,i){(i===t||n.checkChildren&&i.contains(t))&&e.push([i,n])}),e}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc),zi(ey),zi(uh,8),zi(eb,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(Mc),zi(ey),zi(uh,8),zi(eb,8))},token:t,providedIn:"root"}),t}();function rb(t){return t.composedPath?t.composedPath()[0]:t.target}var ob=function(){var t=function(){function t(e,n){o(this,t),this._elementRef=e,this._focusMonitor=n,this.cdkFocusChange=new Bu}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(e){return t.cdkFocusChange.emit(e)})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ib))},t.\u0275dir=ve({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t}(),ab="cdk-high-contrast-black-on-white",sb="cdk-high-contrast-white-on-black",lb="cdk-high-contrast-active",ub=function(){var t=function(){function t(e,n){o(this,t),this._platform=e,this._document=n}return s(t,[{key:"getHighContrastMode",value:function(){if(!this._platform.isBrowser)return 0;var t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);var e=this._document.defaultView||window,n=e&&e.getComputedStyle?e.getComputedStyle(t):null,i=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),i){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}},{key:"_applyBodyHighContrastModeCssClasses",value:function(){if(this._platform.isBrowser&&this._document.body){var t=this._document.body.classList;t.remove(lb),t.remove(ab),t.remove(sb);var e=this.getHighContrastMode();1===e?(t.add(lb),t.add(ab)):2===e&&(t.add(lb),t.add(sb))}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey),zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey),zi(uh))},token:t,providedIn:"root"}),t}(),cb=function(){var t=function t(e){o(this,t),e._applyBodyHighContrastModeCssClasses()};return t.\u0275fac=function(e){return new(e||t)(zi(ub))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[ny,T_]]}),t}(),hb=new Ll("11.2.12"),db=function t(){o(this,t)},fb=function t(){o(this,t)},pb="*";function gb(t,e){return{type:7,name:t,definitions:e,options:{}}}function mb(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:e,timings:t}}function vb(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:t,options:e}}function yb(t){return{type:6,styles:t,offset:null}}function _b(t,e,n){return{type:0,name:t,styles:e,options:n}}function bb(t){return{type:5,steps:t}}function wb(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:t,animation:e,options:n}}function xb(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:t}}function kb(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:t,animation:e,options:n}}function Sb(t){Promise.resolve(null).then(t)}var Cb=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o(this,t),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+n}return s(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var t=this;Sb(function(){return t._onFinish()})}},{key:"_onStart",value:function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(t){this._position=this.totalTime?t*this.totalTime:1}},{key:"getPosition",value:function(){return this.totalTime?this._position/this.totalTime:1}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}}]),t}(),Ab=function(){function t(e){var n=this;o(this,t),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;var i=0,r=0,a=0,s=this.players.length;0==s?Sb(function(){return n._onFinish()}):this.players.forEach(function(t){t.onDone(function(){++i==s&&n._onFinish()}),t.onDestroy(function(){++r==s&&n._onDestroy()}),t.onStart(function(){++a==s&&n._onStart()})}),this.totalTime=this.players.reduce(function(t,e){return Math.max(t,e.totalTime)},0)}return s(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach(function(t){return t.init()})}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[])}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(t){return t.play()})}},{key:"pause",value:function(){this.players.forEach(function(t){return t.pause()})}},{key:"restart",value:function(){this.players.forEach(function(t){return t.restart()})}},{key:"finish",value:function(){this._onFinish(),this.players.forEach(function(t){return t.finish()})}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(t){return t.destroy()}),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach(function(t){return t.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(t){var e=t*this.totalTime;this.players.forEach(function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}},{key:"getPosition",value:function(){var t=this.players.reduce(function(t,e){return null===t||e.totalTime>t.totalTime?e:t},null);return null!=t?t.getPosition():0}},{key:"beforeDestroy",value:function(){this.players.forEach(function(t){t.beforeDestroy&&t.beforeDestroy()})}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}}]),t}(),Mb="!";function Ib(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Tb(t){switch(t.length){case 0:return new Cb;case 1:return t[0];default:return new Ab(t)}}function Db(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=[],s=[],l=-1,u=null;if(i.forEach(function(t){var n=t.offset,i=n==l,c=i&&u||{};Object.keys(t).forEach(function(n){var i=n,s=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,a),s){case Mb:s=r[n];break;case pb:s=o[n];break;default:s=e.normalizeStyleValue(n,i,s,a)}c[i]=s}),i||s.push(c),u=c,l=n}),a.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(a.join(c)))}return s}function Eb(t,e,n,i){switch(e){case"start":t.onStart(function(){return i(n&&Ob(n,"start",t))});break;case"done":t.onDone(function(){return i(n&&Ob(n,"done",t))});break;case"destroy":t.onDestroy(function(){return i(n&&Ob(n,"destroy",t))})}}function Ob(t,e,n){var i=n.totalTime,r=Pb(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),o=t._data;return null!=o&&(r._data=o),r}function Pb(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0;return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:o,disabled:!!a}}function Rb(t,e,n){var i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function Lb(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var Nb=function(t,e){return!1},Fb=function(t,e){return!1},Vb=function(t,e,n){return[]},zb=Ib();(zb||"undefined"!=typeof Element)&&(Nb=function(t,e){return t.contains(e)},Fb=function(){if(zb||Element.prototype.matches)return function(t,e){return t.matches(e)};var t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?function(t,n){return e.apply(t,[n])}:Fb}(),Vb=function(t,e,n){var i=[];if(n)for(var r=t.querySelectorAll(e),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function ow(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)for(var i in t)n[i]=t[i];else rw(t,n);return n}function aw(t,e,n){return n?e+":"+n+";":""}function sw(t){for(var e="",n=0;n *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'.concat(t,'" is not supported')),e;var o=r[1],a=r[2],s=r[3];e.push(Sw(o,s)),"<"!=a[0]||o==ww&&s==ww||e.push(Sw(s,o))}(t,r,i)}):r.push(n),r),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:Ew(t.options)}}},{key:"visitSequence",value:function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return _w(n,t,e)}),options:Ew(t.options)}}},{key:"visitGroup",value:function(t,e){var n=this,i=e.currentTime,r=0,o=t.steps.map(function(t){e.currentTime=i;var o=_w(n,t,e);return r=Math.max(r,e.currentTime),o});return e.currentTime=r,{type:3,steps:o,options:Ew(t.options)}}},{key:"visitAnimate",value:function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return Ow(iw(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var r=Ow(0,0,"");return r.dynamic=!0,r.strValue=i,r}return Ow((n=n||iw(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:yb({});if(5==r.type)n=this.visitKeyframes(r,e);else{var o=t.styles,a=!1;if(!o){a=!0;var s={};i.easing&&(s.easing=i.easing),o=yb(s)}e.currentTime+=i.duration+i.delay;var l=this.visitStyle(o,e);l.isEmptyStep=a,n=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}},{key:"_makeStyleAst",value:function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==pb?n.push(t):e.errors.push("The provided style string value ".concat(t," is not allowed.")):n.push(t)}):n.push(t.styles);var i=!1,r=null;return n.forEach(function(t){if(Dw(t)){var e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(var o in e)if(e[o].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(t,e){var n=this,i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(i){if(n._driver.validateStyleProperty(i)){var a,s,l,u=e.collectedStyles[e.currentQuerySelector],c=u[i],h=!0;c&&(o!=r&&o>=c.startTime&&r<=c.endTime&&(e.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(c.startTime,'ms" and "').concat(c.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(o,'ms" and "').concat(r,'ms"')),h=!1),o=c.startTime),h&&(u[i]={startTime:o,endTime:r}),e.options&&(a=e.errors,s=e.options.params||{},(l=dw(t[i])).length&&l.forEach(function(t){s.hasOwnProperty(t)||a.push("Unable to resolve the local animation param ".concat(t," in the given list of values"))}))}else e.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,o=[],a=!1,s=!1,l=0,u=t.steps.map(function(t){var i=n._makeStyleAst(t,e),u=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(Dw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(Dw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),c=0;return null!=u&&(r++,c=i.offset=u),s=s||c<0||c>1,a=a||c0&&r0?r==d?1:h*r:o[r],s=a*g;e.currentTime=f+p.delay+s,p.duration=s,n._validateStyleAst(t,e),t.offset=a,i.styles.push(t)}),i}},{key:"visitReference",value:function(t,e){return{type:8,animation:_w(this,cw(t.animation),e),options:Ew(t.options)}}},{key:"visitAnimateChild",value:function(t,e){return e.depCount++,{type:9,options:Ew(t.options)}}},{key:"visitAnimateRef",value:function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Ew(t.options)}}},{key:"visitQuery",value:function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=y(function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return t==Cw});return e&&(t=t.replace(Aw,"")),[t=t.replace(/@\*/g,Qb).replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,tw),e]}(t.selector),2),o=r[0],a=r[1];e.currentQuerySelector=n.length?n+" "+o:o,Rb(e.collectedStyles,e.currentQuerySelector,{});var s=_w(this,cw(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:s,originalSelector:t.selector,options:Ew(t.options)}}},{key:"visitStagger",value:function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:iw(t.timings,e.errors,!0);return{type:12,animation:_w(this,cw(t.animation),e),timings:n,options:null}}}]),t}(),Tw=function t(e){o(this,t),this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function Dw(t){return!Array.isArray(t)&&"object"==typeof t}function Ew(t){var e;return t?(t=rw(t)).params&&(t.params=(e=t.params)?rw(e):null):t={},t}function Ow(t,e,n){return{duration:t,delay:e,easing:n}}function Pw(t,e,n,i,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:a,subTimeline:s}}var Rw=function(){function t(){o(this,t),this._map=new Map}return s(t,[{key:"consume",value:function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e}},{key:"append",value:function(t,e){var n,i=this._map.get(t);i||this._map.set(t,i=[]),(n=i).push.apply(n,b(e))}},{key:"has",value:function(t){return this._map.has(t)}},{key:"clear",value:function(){this._map.clear()}}]),t}(),Lw=new RegExp(":enter","g"),Nw=new RegExp(":leave","g");function Fw(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new Vw).buildKeyframes(t,e,n,i,r,o,a,s,l,u)}var Vw=function(){function t(){o(this,t)}return s(t,[{key:"buildKeyframes",value:function(t,e,n,i,r,o,a,s,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];l=l||new Rw;var c=new Bw(t,e,l,i,r,u,[]);c.options=s,c.currentTimeline.setStyles([o],null,c.errors,s),_w(this,n,c);var h=c.timelines.filter(function(t){return t.containsAnimation()});if(h.length&&Object.keys(a).length){var d=h[h.length-1];d.allowOnlyTimelineStyles()||d.setStyles([a],null,c.errors,s)}return h.length?h.map(function(t){return t.buildKeyframes()}):[Pw(e,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(t,e){}},{key:"visitState",value:function(t,e){}},{key:"visitTransition",value:function(t,e){}},{key:"visitAnimateChild",value:function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}},{key:"visitAnimateRef",value:function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}},{key:"_visitSubInstructions",value:function(t,e,n){var i=e.currentTimeline.currentTime,r=null!=n.duration?ew(n.duration):null,o=null!=n.delay?ew(n.delay):null;return 0!==r&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,r,o);i=Math.max(i,n.duration+n.delay)}),i}},{key:"visitReference",value:function(t,e){e.updateOptions(t.options,!0),_w(this,t.animation,e),e.previousNode=t}},{key:"visitSequence",value:function(t,e){var n=this,i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&((r=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=zw);var a=ew(o.delay);r.delayNextStep(a)}t.steps.length&&(t.steps.forEach(function(t){return _w(n,t,r)}),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}},{key:"visitGroup",value:function(t,e){var n=this,i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?ew(t.options.delay):0;t.steps.forEach(function(a){var s=e.createSubContext(t.options);o&&s.delayNextStep(o),_w(n,a,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)}),i.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(r),e.previousNode=t}},{key:"_visitTiming",value:function(t,e){if(t.dynamic){var n=t.strValue;return iw(e.params?fw(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}},{key:"visitAnimate",value:function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}},{key:"visitStyle",value:function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}},{key:"visitKeyframes",value:function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){o.forwardTime((t.offset||0)*r),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(i+r),e.previousNode=t}},{key:"visitQuery",value:function(t,e){var n=this,i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?ew(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=zw);var a=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=s.length;var l=null;s.forEach(function(i,r){e.currentQueryIndex=r;var s=e.createSubContext(t.options,i);o&&s.delayNextStep(o),i===e.element&&(l=s.currentTimeline),_w(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}},{key:"visitStagger",value:function(t,e){var n=e.parentContext,i=e.currentTimeline,r=t.timings,o=Math.abs(r.duration),a=o*(e.currentQueryTotal-1),s=o*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var l=e.currentTimeline;s&&l.delayNextStep(s);var u=l.currentTime;_w(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}}]),t}(),zw={},Bw=function(){function t(e,n,i,r,a,s,l,u){o(this,t),this._driver=e,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=a,this.errors=s,this.timelines=l,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=zw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=u||new Hw(this._driver,n,0),l.push(this.currentTimeline)}return s(t,[{key:"updateOptions",value:function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=ew(i.duration)),null!=i.delay&&(r.delay=ew(i.delay));var o=i.params;if(o){var a=r.params;a||(a=this.options.params={}),Object.keys(o).forEach(function(t){e&&a.hasOwnProperty(t)||(a[t]=fw(o[t],a,n.errors))})}}}},{key:"_copyOptions",value:function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t}},{key:"createSubContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=n||this.element,o=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}},{key:"transformIntoNewTimeline",value:function(t){return this.previousNode=zw,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new jw(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}},{key:"incrementTime",value:function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}},{key:"delayNextStep",value:function(t){t>0&&this.currentTimeline.delayNextStep(t)}},{key:"invokeQuery",value:function(t,e,n,i,r,o){var a=[];if(i&&a.push(this.element),t.length>0){t=(t=t.replace(Lw,"."+this._enterClassName)).replace(Nw,"."+this._leaveClassName);var s=this._driver.query(this.element,t,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),a.push.apply(a,b(s))}return r||0!=a.length||o.push('`query("'.concat(e,'")` returned zero elements. (Use `query("').concat(e,'", { optional: true })` if you wish to allow this.)')),a}},{key:"params",get:function(){return this.options.params}}]),t}(),Hw=function(){function t(e,n,i,r){o(this,t),this._driver=e,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return s(t,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"delayNextStep",value:function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}},{key:"fork",value:function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}},{key:"_updateStyle",value:function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){e._backFill[t]=e._globalTimelineStyles[t]||pb,e._currentKeyframe[t]=pb}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(t,e,n,i){var r=this;e&&(this._previousKeyframe.easing=e);var o=i&&i.params||{},a=function(t,e){var n,i={};return t.forEach(function(t){"*"===t?(n=n||Object.keys(e)).forEach(function(t){i[t]=pb}):ow(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(a).forEach(function(t){var e=fw(a[t],o,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:pb),r._updateStyle(t,e)})}},{key:"applyStylesToKeyframe",value:function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))}},{key:"snapshotCurrentStyles",value:function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var i=e._styleSummary[n],r=t._styleSummary[n];(!i||r.time>i.time)&&e._updateStyle(n,r.value)})}},{key:"buildKeyframes",value:function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach(function(o,a){var s=ow(o,!0);Object.keys(s).forEach(function(t){var i=s[t];i==Mb?e.add(t):i==pb&&n.add(t)}),i||(s.offset=a/t.duration),r.push(s)});var o=e.size?pw(e.values()):[],a=n.size?pw(n.values()):[];if(i){var s=r[0],l=rw(s);s.offset=0,l.offset=1,r=[s,l]}return Pw(this.element,r,o,a,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t}}]),t}(),jw=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return o(this,n),(u=e.call(this,t,i,l.delay)).element=i,u.keyframes=r,u.preStyleProps=a,u.postStyleProps=s,u._stretchStartingKeyframe=c,u.timings={duration:l.duration,delay:l.delay,easing:l.easing},u}return s(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,r=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=i+n,s=n/a,l=ow(t[0],!1);l.offset=0,o.push(l);var u=ow(t[0],!1);u.offset=Gw(s),o.push(u);for(var c=t.length-1,h=1;h<=c;h++){var d=ow(t[h],!1);d.offset=Gw((n+d.offset*i)/a),o.push(d)}i=a,n=0,r="",t=o}return Pw(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(Hw);function Gw(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,e-1);return Math.round(t*n)/n}var Uw=function t(){o(this,t)},Ww=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"normalizePropertyName",value:function(t,e){return mw(t)}},{key:"normalizeStyleValue",value:function(t,e,n,i){var r="",o=n.toString().trim();if(Yw[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&i.push("Please provide a CSS unit value for ".concat(t,":").concat(n))}return o+r}}]),n}(Uw),Yw=function(){return t="width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","),e={},t.forEach(function(t){return e[t]=!0}),e;var t,e}();function qw(t,e,n,i,r,o,a,s,l,u,c,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:a,timelines:s,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:d}}var Xw={},Zw=function(){function t(e,n,i){o(this,t),this._triggerName=e,this.ast=n,this._stateStyles=i}return s(t,[{key:"match",value:function(t,e,n,i){return function(t,e,n,i,r){return t.some(function(t){return t(e,n,i,r)})}(this.ast.matchers,t,e,n,i)}},{key:"buildStyles",value:function(t,e,n){var i=this._stateStyles["*"],r=this._stateStyles[t],o=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):o}},{key:"build",value:function(t,e,n,i,r,o,a,s,l,u){var c=[],h=this.ast.options&&this.ast.options.params||Xw,d=this.buildStyles(n,a&&a.params||Xw,c),f=s&&s.params||Xw,p=this.buildStyles(i,f,c),g=new Set,m=new Map,v=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),f)},b=u?[]:Fw(t,e,this.ast.animation,r,o,d,p,_,l,c),w=0;if(b.forEach(function(t){w=Math.max(t.duration+t.delay,w)}),c.length)return qw(e,this._triggerName,n,i,y,d,p,[],[],m,v,w,c);b.forEach(function(t){var n=t.element,i=Rb(m,n,{});t.preStyleProps.forEach(function(t){return i[t]=!0});var r=Rb(v,n,{});t.postStyleProps.forEach(function(t){return r[t]=!0}),n!==e&&g.add(n)});var x=pw(g.values());return qw(e,this._triggerName,n,i,y,d,p,b,x,m,v,w)}}]),t}(),Kw=function(){function t(e,n){o(this,t),this.styles=e,this.defaultParams=n}return s(t,[{key:"buildStyles",value:function(t,e){var n={},i=rw(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var r=t;Object.keys(r).forEach(function(t){var o=r[t];o.length>1&&(o=fw(o,i,e)),n[t]=o})}}),n}}]),t}(),$w=function(){function t(e,n){var i=this;o(this,t),this.name=e,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(t){i.states[t.name]=new Kw(t.style,t.options&&t.options.params||{})}),Qw(this.states,"true","1"),Qw(this.states,"false","0"),n.transitions.forEach(function(t){i.transitionFactories.push(new Zw(e,t,i.states))}),this.fallbackTransition=new Zw(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return s(t,[{key:"matchTransition",value:function(t,e,n,i){return this.transitionFactories.find(function(r){return r.match(t,e,n,i)})||null}},{key:"matchStyles",value:function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),t}();function Qw(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Jw=new Rw,tx=function(){function t(e,n,i){o(this,t),this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return s(t,[{key:"register",value:function(t,e){var n=[],i=Mw(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: ".concat(n.join("\n")));this._animations[t]=i}},{key:"_buildPlayer",value:function(t,e,n){var i=t.element,r=Db(this._driver,this._normalizer,i,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}},{key:"create",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],a=this._animations[t],s=new Map;if(a?(n=Fw(this._driver,e,a,Zb,Kb,{},{},r,Jw,o)).forEach(function(t){var e=Rb(s,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: ".concat(o.join("\n")));s.forEach(function(t,e){Object.keys(t).forEach(function(n){t[n]=i._driver.computeStyle(e,n,pb)})});var l=n.map(function(t){var e=s.get(t.element);return i._buildPlayer(t,{},e)}),u=Tb(l);return this._playersById[t]=u,u.onDestroy(function(){return i.destroy(t)}),this.players.push(u),u}},{key:"destroy",value:function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by ".concat(t));return e}},{key:"listen",value:function(t,e,n,i){var r=Pb(e,"","","");return Eb(this._getPlayer(t),n,r,i),function(){}}},{key:"command",value:function(t,e,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])}}]),t}(),ex="ng-animate-queued",nx="ng-animate-disabled",ix=".ng-animate-disabled",rx="ng-star-inserted",ox=[],ax={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},sx={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},lx=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";o(this,t),this.namespaceId=n;var i=e&&e.hasOwnProperty("value"),r=i?e.value:e;if(this.value=px(r),i){var a=rw(e);delete a.value,this.options=a}else this.options={};this.options.params||(this.options.params={})}return s(t,[{key:"absorbOptions",value:function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}}},{key:"params",get:function(){return this.options.params}}]),t}(),ux="void",cx=new lx(ux),hx=function(){function t(e,n,i){o(this,t),this.id=e,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,_x(n,this._hostClassName)}return s(t,[{key:"listen",value:function(t,e,n,i){var r,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(e,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(e,'" because the provided event is undefined!'));if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(e,'" is not supported!'));var a=Rb(this._elementListeners,t,[]),s={name:e,phase:n,callback:i};a.push(s);var l=Rb(this._engine.statesByElement,t,{});return l.hasOwnProperty(e)||(_x(t,$b),_x(t,"ng-trigger-"+e),l[e]=cx),function(){o._engine.afterFlush(function(){var t=a.indexOf(s);t>=0&&a.splice(t,1),o._triggers[e]||delete l[e]})}}},{key:"register",value:function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}},{key:"_getTrigger",value:function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'.concat(t,'" has not been registered!'));return e}},{key:"trigger",value:function(t,e,n){var i=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this._getTrigger(e),a=new fx(this.id,e,t),s=this._engine.statesByElement.get(t);s||(_x(t,$b),_x(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,s={}));var l=s[e],u=new lx(n,this.id),c=n&&n.hasOwnProperty("value");!c&&l&&u.absorbOptions(l.options),s[e]=u,l||(l=cx);var h=u.value===ux;if(h||l.value!==u.value){var d=Rb(this._engine.playersByElement,t,[]);d.forEach(function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()});var f=o.matchTransition(l.value,u.value,t,u.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:l,toState:u,player:a,isFallbackTransition:p}),p||(_x(t,ex),a.onStart(function(){bx(t,ex)})),a.onDone(function(){var e=i.players.indexOf(a);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(a);r>=0&&n.splice(r,1)}}),this.players.push(a),d.push(a),a}if(!kx(l.params,u.params)){var g=[],m=o.matchStyles(l.value,l.params,g),v=o.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(function(){uw(t,m),lw(t,v)})}}},{key:"deregister",value:function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach(function(e,n){delete e[t]}),this._elementListeners.forEach(function(n,i){e._elementListeners.set(i,n.filter(function(e){return e.name!=t}))})}},{key:"clearElementCache",value:function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach(function(t){return t.destroy()}),this._engine.playersByElement.delete(t))}},{key:"_signalRemovalForInnerTriggers",value:function(t,e){var n=this,i=this._engine.driver.query(t,Qb,!0);i.forEach(function(t){if(!t.__ng_removed){var i=n._engine.fetchNamespacesByElement(t);i.size?i.forEach(function(n){return n.triggerLeaveAnimation(t,e,!1,!0)}):n.clearElementCache(t)}}),this._engine.afterFlushAnimationsDone(function(){return i.forEach(function(t){return n.clearElementCache(t)})})}},{key:"triggerLeaveAnimation",value:function(t,e,n,i){var r=this,o=this._engine.statesByElement.get(t);if(o){var a=[];if(Object.keys(o).forEach(function(e){if(r._triggers[e]){var n=r.trigger(t,e,ux,i);n&&a.push(n)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Tb(a).onDone(function(){return r._engine.processLeaveNode(t)}),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(t){var e=this,n=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(n&&i){var r=new Set;n.forEach(function(n){var o=n.name;if(!r.has(o)){r.add(o);var a=e._triggers[o].fallbackTransition,s=i[o]||cx,l=new lx(ux),u=new fx(e.id,o,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:o,transition:a,fromState:s,toState:l,player:u,isFallbackTransition:!0})}})}}},{key:"removeNode",value:function(t,e){var n=this,i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),!this.triggerLeaveAnimation(t,e,!0)){var r=!1;if(i.totalAnimations){var o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else for(var a=t;a=a.parentNode;)if(i.statesByElement.get(a)){r=!0;break}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{var s=t.__ng_removed;s&&s!==ax||(i.afterFlush(function(){return n.clearElementCache(t)}),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}}},{key:"insertNode",value:function(t,e){_x(t,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(t){var e=this,n=[];return this._queue.forEach(function(i){var r=i.player;if(!r.destroyed){var o=i.element,a=e._elementListeners.get(o);a&&a.forEach(function(e){if(e.name==i.triggerName){var n=Pb(o,i.triggerName,i.fromState.value,i.toState.value);n._data=t,Eb(i.player,e.phase,n,e.callback)}}),r.markedForDestroy?e._engine.afterFlush(function(){r.destroy()}):n.push(i)}}),this._queue=[],n.sort(function(t,n){var i=t.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:e._engine.driver.containsElement(t.element,n.element)?1:-1})}},{key:"destroy",value:function(t){this.players.forEach(function(t){return t.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,t)}},{key:"elementContainsData",value:function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find(function(e){return e.element===t})||e}}]),t}(),dx=function(){function t(e,n,i){o(this,t),this.bodyNode=e,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(t,e){}}return s(t,[{key:"_onRemovalComplete",value:function(t,e){this.onRemovalComplete(t,e)}},{key:"createNamespace",value:function(t,e){var n=new hx(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}},{key:"_balanceNamespaceList",value:function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}},{key:"register",value:function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}},{key:"registerTrigger",value:function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}},{key:"destroy",value:function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return i.destroy(e)})}}},{key:"_fetchNamespace",value:function(t){return this._namespaceLookup[t]}},{key:"fetchNamespacesByElement",value:function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),r=0;r=0&&this.collectedLeaveElements.splice(o,1)}if(t){var a=this._fetchNamespace(t);a&&a.insertNode(e,n)}i&&this.collectEnterElement(e)}}},{key:"collectEnterElement",value:function(t){this.collectedEnterElements.push(t)}},{key:"markElementAsDisabled",value:function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),_x(t,nx)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),bx(t,nx))}},{key:"removeNode",value:function(t,e,n,i){if(gx(e)){var r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){var o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,i)}}else this._onRemovalComplete(e,i)}},{key:"markElementAsRemoved",value:function(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(t,e,n,i,r){return gx(e)?this._fetchNamespace(t).listen(e,n,i,r):function(){}}},{key:"_buildInstruction",value:function(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}},{key:"destroyInnerAnimations",value:function(t){var e=this,n=this.driver.query(t,Qb,!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,tw,!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})}},{key:"destroyActiveAnimationsForElement",value:function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})}},{key:"finishActiveQueriedAnimationOnElement",value:function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})}},{key:"whenRenderingDone",value:function(){var t=this;return new Promise(function(e){if(t.players.length)return Tb(t.players).onDone(function(){return e()});e()})}},{key:"processLeaveNode",value:function(t){var e=this,n=t.__ng_removed;if(n&&n.setForRemoval){if(t.__ng_removed=ax,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,ix)&&this.markElementAsDisabled(t,!1),this.driver.query(t,ix,!0).forEach(function(t){e.markElementAsDisabled(t,!1)})}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(e,n){return t._balanceNamespaceList(e,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i=0;M--)this._namespaceList[M].drainQueuedTransitions(e).forEach(function(t){var e=t.player,o=t.element;if(C.push(e),n.collectedEnterElements.length){var c=o.__ng_removed;if(c&&c.setForMove)return void e.destroy()}var d=!h||!n.driver.containsElement(h,o),f=k.get(o),g=p.get(o),m=n._buildInstruction(t,i,g,f,d);if(m.errors&&m.errors.length)A.push(m);else{if(d)return e.onStart(function(){return uw(o,m.fromStyles)}),e.onDestroy(function(){return lw(o,m.toStyles)}),void r.push(e);if(t.isFallbackTransition)return e.onStart(function(){return uw(o,m.fromStyles)}),e.onDestroy(function(){return lw(o,m.toStyles)}),void r.push(e);m.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),i.append(o,m.timelines),a.push({instruction:m,player:e,element:o}),m.queriedElements.forEach(function(t){return Rb(s,t,[]).push(e)}),m.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var i=l.get(e);i||l.set(e,i=new Set),n.forEach(function(t){return i.add(t)})}}),m.postStyleProps.forEach(function(t,e){var n=Object.keys(t),i=u.get(e);i||u.set(e,i=new Set),n.forEach(function(t){return i.add(t)})})}});if(A.length){var I=[];A.forEach(function(t){I.push("@".concat(t.triggerName," has failed due to:\n")),t.errors.forEach(function(t){return I.push("- ".concat(t,"\n"))})}),C.forEach(function(t){return t.destroy()}),this.reportError(I)}var T=new Map,D=new Map;a.forEach(function(t){var e=t.element;i.has(e)&&(D.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,T))}),r.forEach(function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){Rb(T,e,[]).push(t),t.destroy()})});var E=m.filter(function(t){return Sx(t,l,u)}),O=new Map;vx(O,this.driver,y,u,pb).forEach(function(t){Sx(t,l,u)&&E.push(t)});var P=new Map;f.forEach(function(t,e){vx(P,n.driver,new Set(t),l,Mb)}),E.forEach(function(t){var e=O.get(t),n=P.get(t);O.set(t,Object.assign(Object.assign({},e),n))});var R=[],L=[],N={};a.forEach(function(t){var e=t.element,a=t.player,s=t.instruction;if(i.has(e)){if(c.has(e))return a.onDestroy(function(){return lw(e,s.toStyles)}),a.disabled=!0,a.overrideTotalTime(s.totalTime),void r.push(a);var l=N;if(D.size>1){for(var u=e,h=[];u=u.parentNode;){var d=D.get(u);if(d){l=d;break}h.push(u)}h.forEach(function(t){return D.set(t,l)})}var f=n._buildAnimation(a.namespaceId,s,T,o,P,O);if(a.setRealPlayer(f),l===N)R.push(a);else{var p=n.playersByElement.get(l);p&&p.length&&(a.parentPlayer=Tb(p)),r.push(a)}}else uw(e,s.fromStyles),a.onDestroy(function(){return lw(e,s.toStyles)}),L.push(a),c.has(e)&&r.push(a)}),L.forEach(function(t){var e=o.get(t.element);if(e&&e.length){var n=Tb(e);t.setRealPlayer(n)}}),r.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var F=0;F0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new Cb(t.duration,t.delay)}},{key:"queuedPlayers",get:function(){var t=[];return this._namespaceList.forEach(function(e){e.players.forEach(function(e){e.queued&&t.push(e)})}),t}}]),t}(),fx=function(){function t(e,n,i){o(this,t),this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new Cb,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return s(t,[{key:"setRealPlayer",value:function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return Eb(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(t){this.totalTime=t}},{key:"syncPlayerEvents",value:function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})}},{key:"_queueEvent",value:function(t,e){Rb(this._queuedCallbacks,t,[]).push(e)}},{key:"onDone",value:function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}},{key:"onStart",value:function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}},{key:"onDestroy",value:function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(t){this.queued||this._player.setPosition(t)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)}}]),t}();function px(t){return null!=t?t:null}function gx(t){return t&&1===t.nodeType}function mx(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function vx(t,e,n,i,r){var o=[];n.forEach(function(t){return o.push(mx(t))});var a=[];i.forEach(function(n,i){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=sx,a.push(i))}),t.set(i,o)});var s=0;return n.forEach(function(t){return mx(t,o[s++])}),a}function yx(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var i=new Set(e),r=new Map;function o(t){if(!t)return 1;var e=r.get(t);if(e)return e;var a=t.parentNode;return e=n.has(a)?a:i.has(a)?1:o(a),r.set(t,e),e}return e.forEach(function(t){var e=o(t);1!==e&&n.get(e).push(t)}),n}function _x(t,e){if(t.classList)t.classList.add(e);else{var n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function bx(t,e){if(t.classList)t.classList.remove(e);else{var n=t.$$classes;n&&delete n[e]}}function wx(t,e,n){Tb(n).onDone(function(){return t.processLeaveNode(e)})}function xx(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(t)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),t}();function Ax(t,e){var n=null,i=null;return Array.isArray(e)&&e.length?(n=Ix(e[0]),e.length>1&&(i=Ix(e[e.length-1]))):e&&(n=Ix(e)),n||i?new Mx(t,n,i):null}var Mx=function(){var t=function(){function t(e,n,i){o(this,t),this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;var r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}return s(t,[{key:"start",value:function(){this._state<1&&(this._startStyles&&lw(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(lw(this._element,this._initialStyles),this._endStyles&&(lw(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(uw(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(uw(this._element,this._endStyles),this._endStyles=null),lw(this._element,this._initialStyles),this._state=3)}}]),t}();return t.initialStylesByElement=new WeakMap,t}();function Ix(t){for(var e=null,n=Object.keys(t),i=0;i=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),Nx(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(i=Lx(n=Vx(t=this._element,"").split(","),e))>=0&&(n.splice(i,1),Fx(t,"",n.join(","))))}}]),t}();function Px(t,e,n){Fx(t,"PlayState",n,Rx(t,e))}function Rx(t,e){var n=Vx(t,"");return n.indexOf(",")>0?Lx(n.split(","),e):Lx([n],e)}function Lx(t,e){for(var n=0;n=0)return n;return-1}function Nx(t,e,n){n?t.removeEventListener(Ex,e):t.addEventListener(Ex,e)}function Fx(t,e,n,i){var r=Dx+e;if(null!=i){var o=t.style[r];if(o.length){var a=o.split(",");a[i]=n,n=a.join(",")}}t.style[r]=n}function Vx(t,e){return t.style[Dx+e]||""}var zx=function(){function t(e,n,i,r,a,s,l,u){o(this,t),this.element=e,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=a,this._finalStyles=l,this._specialStyles=u,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=r+a,this._buildStyler()}return s(t,[{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"destroy",value:function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(t){this._styler.setPosition(t)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var t=this;this._styler=new Ox(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}},{key:"beforeDestroy",value:function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:bw(t.element,i))})}this.currentSnapshot=e}}]),t}(),Bx=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).element=t,r._startingStyles={},r.__initialized=!1,r._styles=Yb(i),r}return s(n,[{key:"init",value:function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(e){t._startingStyles[e]=t.element.style[e]}),r(i(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(e){return t.element.style.setProperty(e,t._styles[e])}),r(i(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)}),this._startingStyles=null,r(i(n.prototype),"destroy",this).call(this))}}]),n}(Cb),Hx="gen_css_kf_",jx=function(){function t(){o(this,t),this._count=0,this._head=document.querySelector("head")}return s(t,[{key:"validateStyleProperty",value:function(t){return jb(t)}},{key:"matchesElement",value:function(t,e){return Gb(t,e)}},{key:"containsElement",value:function(t,e){return Ub(t,e)}},{key:"query",value:function(t,e,n){return Wb(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"buildKeyframeElement",value:function(t,e,n){n=n.map(function(t){return Yb(t)});var i="@keyframes ".concat(e," {\n"),r="";n.forEach(function(t){r=" ";var e=parseFloat(t.offset);i+="".concat(r).concat(100*e,"% {\n"),r+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+="".concat(r,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(r).concat(e,": ").concat(n,";\n"))}}),i+="".concat(r,"}\n")}),i+="}\n";var o=document.createElement("style");return o.textContent=i,o}},{key:"animate",value:function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=o.filter(function(t){return t instanceof zx}),s={};vw(n,i)&&a.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return s[t]=e[t]})});var l=Gx(e=yw(t,e,s));if(0==n)return new Bx(t,l);var u="".concat(Hx).concat(this._count++),c=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(c);var h=Ax(t,e),d=new zx(t,e,u,n,i,r,l,h);return d.onDestroy(function(){return Ux(c)}),d}}]),t}();function Gx(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}function Ux(t){t.parentNode.removeChild(t)}var Wx=function(){function t(e,n,i,r){o(this,t),this.element=e,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return s(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(t,e,n){return t.animate(e,n)}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"setPosition",value:function(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:bw(t.element,n))}),this.currentSnapshot=e}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),t}(),Yx=function(){function t(){o(this,t),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(qx().toString()),this._cssKeyframesDriver=new jx}return s(t,[{key:"validateStyleProperty",value:function(t){return jb(t)}},{key:"matchesElement",value:function(t,e){return Gb(t,e)}},{key:"containsElement",value:function(t,e){return Ub(t,e)}},{key:"query",value:function(t,e,n){return Wb(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"overrideWebAnimationsSupport",value:function(t){this._isNativeImpl=t}},{key:"animate",value:function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=arguments.length>6?arguments[6]:void 0,s=!a&&!this._isNativeImpl;if(s)return this._cssKeyframesDriver.animate(t,e,n,i,r,o);var l=0==i?"both":"forwards",u={duration:n,delay:i,fill:l};r&&(u.easing=r);var c={},h=o.filter(function(t){return t instanceof Wx});vw(n,i)&&h.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return c[t]=e[t]})});var d=Ax(t,e=yw(t,e=e.map(function(t){return ow(t,!1)}),c));return new Wx(t,e,u,d)}}]),t}();function qx(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var Xx=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._nextAnimationId=0,r._renderer=t.createRenderer(i.body,{id:"0",encapsulation:Xt.None,styles:[],data:{animation:[]}}),r}return s(n,[{key:"build",value:function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?vb(t):t;return $x(this._renderer,null,e,"register",[n]),new Zx(e,this._renderer)}}]),n}(db);return t.\u0275fac=function(e){return new(e||t)(zi(El),zi(uh))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Zx=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._id=t,r._renderer=i,r}return s(n,[{key:"create",value:function(t,e){return new Kx(this._id,t,e||{},this._renderer)}}]),n}(fb),Kx=function(){function t(e,n,i,r){o(this,t),this.id=e,this.element=n,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return s(t,[{key:"_listen",value:function(t,e){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(t),e)}},{key:"_command",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=0&&t3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,i)}},{key:"removeChild",value:function(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}},{key:"selectRootElement",value:function(t,e){return this.delegate.selectRootElement(t,e)}},{key:"parentNode",value:function(t){return this.delegate.parentNode(t)}},{key:"nextSibling",value:function(t){return this.delegate.nextSibling(t)}},{key:"setAttribute",value:function(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}},{key:"removeAttribute",value:function(t,e,n){this.delegate.removeAttribute(t,e,n)}},{key:"addClass",value:function(t,e){this.delegate.addClass(t,e)}},{key:"removeClass",value:function(t,e){this.delegate.removeClass(t,e)}},{key:"setStyle",value:function(t,e,n,i){this.delegate.setStyle(t,e,n,i)}},{key:"removeStyle",value:function(t,e,n){this.delegate.removeStyle(t,e,n)}},{key:"setProperty",value:function(t,e,n){e.charAt(0)==Qx&&e==Jx?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}},{key:"setValue",value:function(t,e){this.delegate.setValue(t,e)}},{key:"listen",value:function(t,e,n){return this.delegate.listen(t,e,n)}},{key:"disableAnimations",value:function(t,e){this.engine.disableAnimations(t,e)}},{key:"data",get:function(){return this.delegate.data}}]),t}(),nk=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,i,r,a)).factory=t,s.namespaceId=i,s}return s(n,[{key:"setProperty",value:function(t,e,n){e.charAt(0)==Qx?"."==e.charAt(1)&&e==Jx?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}},{key:"listen",value:function(t,e,n){var i,r,o=this;if(e.charAt(0)==Qx){var a=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t),s=e.substr(1),l="";if(s.charAt(0)!=Qx){var u=y((r=(i=s).indexOf("."),[i.substring(0,r),i.substr(r+1)]),2);s=u[0],l=u[1]}return this.engine.listen(this.namespaceId,a,s,l,function(t){o.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}]),n}(ek),ik=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){return o(this,n),e.call(this,t.body,i,r)}return n}(Cx);return t.\u0275fac=function(e){return new(e||t)(zi(uh),zi(Xb),zi(Uw))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),rk=new wi("AnimationModuleType"),ok=[{provide:db,useClass:Xx},{provide:Uw,useFactory:function(){return new Ww}},{provide:Cx,useClass:ik},{provide:El,useFactory:function(t,e,n){return new tk(t,e,n)},deps:[yd,Cx,Mc]}],ak=[{provide:Xb,useFactory:function(){return"function"==typeof qx()?new Yx:new jx}},{provide:rk,useValue:"BrowserAnimations"}].concat(ok),sk=([{provide:Xb,useClass:qb},{provide:rk,useValue:"NoopAnimations"}].concat(ok),function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:ak,imports:[Od]}),t}());function lk(t,e){if(1&t&&ms(0,"mat-pseudo-checkbox",4),2&t){var n=Ds();ds("state",n.selected?"checked":"unchecked")("disabled",n.disabled)}}function uk(t,e){if(1&t&&(ps(0,"span",5),tl(1),gs()),2&t){var n=Ds();Oo(1),nl("(",n.group.label,")")}}var ck=["*"],hk=function(){var t=function t(){o(this,t)};return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t}(),dk=function(){var t=function t(){o(this,t)};return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t}(),fk=new Ll("11.2.12"),pk=new wi("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),gk=function(){var t=function(){function t(e,n,i){o(this,t),this._hasDoneGlobalChecks=!1,this._document=i,e._applyBodyHighContrastModeCssClasses(),this._sanityChecks=n,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return s(t,[{key:"_getWindow",value:function(){var t=this._document.defaultView||window;return"object"==typeof t&&t?t:null}},{key:"_checksAreEnabled",value:function(){return Bc()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var t=this._getWindow();return t&&(t.__karma__||t.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype)&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){if(this._checksAreEnabled()&&!1!==this._sanityChecks&&this._sanityChecks.theme&&this._document.body&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}}},{key:"_checkCdkVersionMatch",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&fk.full!==hb.full&&console.warn("The Angular Material version ("+fk.full+") does not match the Angular CDK version ("+hb.full+").\nPlease ensure the versions of these two packages exactly match.")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ub),zi(pk,8),zi(uh))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[cy],cy]}),t}();function mk(t){return function(t){u(n,t);var e=p(n);function n(){var t;o(this,n);for(var i=arguments.length,r=new Array(i),a=0;a1&&void 0!==arguments[1]?arguments[1]:0,n=function(t){u(i,t);var n=p(i);function i(){var t;o(this,i);for(var r=arguments.length,a=new Array(r),s=0;s0?n:t}}]),t}(),Ck=new wi("mat-date-formats");try{xk="undefined"!=typeof Intl}catch(fH){xk=!1}var Ak={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},Mk=Dk(31,function(t){return String(t+1)}),Ik={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},Tk=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function Dk(t,e){for(var n=Array(t),i=0;i9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())}},{key:"addCalendarYears",value:function(t,e){return this.addCalendarMonths(t,12*e)}},{key:"addCalendarMonths",value:function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n}},{key:"addCalendarDays",value:function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}},{key:"toIso8601",value:function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}},{key:"deserialize",value:function(t){if("string"==typeof t){if(!t)return null;if(Tk.test(t)){var e=new Date(t);if(this.isValid(e))return e}}return r(i(n.prototype),"deserialize",this).call(this,t)}},{key:"isDateInstance",value:function(t){return t instanceof Date}},{key:"isValid",value:function(t){return!isNaN(t.getTime())}},{key:"invalid",value:function(){return new Date(NaN)}},{key:"_createDateWithOverflow",value:function(t,e,n){var i=new Date;return i.setFullYear(t,e,n),i.setHours(0,0,0,0),i}},{key:"_2digit",value:function(t){return("00"+t).slice(-2)}},{key:"_stripDirectionalityCharacters",value:function(t){return t.replace(/[\u200e\u200f]/g,"")}},{key:"_format",value:function(t,e){var n=new Date;return n.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(n)}}]),n}(Sk);return t.\u0275fac=function(e){return new(e||t)(zi(kk,8),zi(ey))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Ok=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[{provide:Sk,useClass:Ek}],imports:[[ny]]}),t}(),Pk={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},Rk=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[{provide:Ck,useValue:Pk}],imports:[[Ok]]}),t}(),Lk=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"isErrorState",value:function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Nk=function(){function t(e,n,i){o(this,t),this._renderer=e,this.element=n,this.config=i,this.state=3}return s(t,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),t}(),Fk={enterDuration:450,exitDuration:400},Vk=oy({passive:!0}),zk=["mousedown","touchstart"],Bk=["mouseup","mouseleave","touchend","touchcancel"],Hk=function(){function t(e,n,i,r){o(this,t),this._target=e,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=yv(i))}return s(t,[{key:"fadeInRipple",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Object.assign(Object.assign({},Fk),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);var a=i.radius||Gk(t,e,r),s=t-r.left,l=e-r.top,u=o.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left="".concat(s-a,"px"),c.style.top="".concat(l-a,"px"),c.style.height="".concat(2*a,"px"),c.style.width="".concat(2*a,"px"),null!=i.color&&(c.style.backgroundColor=i.color),c.style.transitionDuration="".concat(u,"ms"),this._containerElement.appendChild(c),jk(c),c.style.transform="scale(1)";var h=new Nk(this,c,i);return h.state=0,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(function(){var t=h===n._mostRecentTransientRipple;h.state=1,i.persistent||t&&n._isPointerDown||h.fadeOut()},u),h}},{key:"fadeOutRipple",value:function(t){var e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),e){var n=t.element,i=Object.assign(Object.assign({},Fk),t.config.animation);n.style.transitionDuration="".concat(i.exitDuration,"ms"),n.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(function(){t.state=3,n.parentNode.removeChild(n)},i.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach(function(t){return t.fadeOut()})}},{key:"fadeOutAllNonPersistent",value:function(){this._activeRipples.forEach(function(t){t.config.persistent||t.fadeOut()})}},{key:"setupTriggerEvents",value:function(t){var e=yv(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(zk))}},{key:"handleEvent",value:function(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(Bk),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(t){var e=J_(t),n=this._lastTouchStartEvent&&Date.now()1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})}},{key:"_registerEvents",value:function(t){var e=this;this._ngZone.runOutsideAngular(function(){t.forEach(function(t){e._triggerElement.addEventListener(t,e,Vk)})})}},{key:"_removeTriggerEvents",value:function(){var t=this;this._triggerElement&&(zk.forEach(function(e){t._triggerElement.removeEventListener(e,t,Vk)}),this._pointerUpEventsRegistered&&Bk.forEach(function(e){t._triggerElement.removeEventListener(e,t,Vk)}))}}]),t}();function jk(t){window.getComputedStyle(t).getPropertyValue("opacity")}function Gk(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}var Uk=new wi("mat-ripple-global-options"),Wk=function(){var t=function(){function t(e,n,i,r,a){o(this,t),this._elementRef=e,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new Hk(this,n,e,i)}return s(t,[{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"fadeOutAllNonPersistent",value:function(){this._rippleRenderer.fadeOutAllNonPersistent()}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}},{key:"disabled",get:function(){return this._disabled},set:function(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(ey),hs(Uk,8),hs(rk,8))},t.\u0275dir=ve({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&Gs("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),t}(),Yk=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk,ny],gk]}),t}(),qk=function(){var t=function t(e){o(this,t),this._animationMode=e,this.state="unchecked",this.disabled=!1};return t.\u0275fac=function(e){return new(e||t)(hs(rk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&Gs("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),t}(),Xk=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk]]}),t}(),Zk=new wi("MAT_OPTION_PARENT_COMPONENT"),Kk=mk(function t(){o(this,t)}),$k=0,Qk=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i,r;return o(this,n),(i=e.call(this))._labelId="mat-optgroup-label-".concat($k++),i._inert=null!==(r=null==t?void 0:t.inertGroups)&&void 0!==r&&r,i}return n}(Kk);return t.\u0275fac=function(e){return new(e||t)(hs(Zk,8))},t.\u0275dir=ve({type:t,inputs:{label:"label"},features:[Xa]}),t}(),Jk=new wi("MatOptgroup"),tS=0,eS=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o(this,t),this.source=e,this.isUserInput=n},nS=function(){var t=function(){function t(e,n,i,r){o(this,t),this._element=e,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(tS++),this.onSelectionChange=new Bu,this._stateChanges=new U}return s(t,[{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(t){t.keyCode!==Ey&&t.keyCode!==Py||By(t)||(this._selectViaInteraction(),t.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new eS(this,t))}},{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=fv(t)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(void 0),hs(Qk))},t.\u0275dir=ve({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t}(),iS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){return o(this,n),e.call(this,t,i,r,a)}return n}(nS);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(Zk,8),hs(Jk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&Ss("click",function(){return e._selectViaInteraction()})("keydown",function(t){return e._handleKeydown(t)}),2&t&&(rl("id",e.id),ss("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),Gs("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[Xa],ngContentSelectors:ck,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(t,e){1&t&&(Os(),us(0,lk,1,2,"mat-pseudo-checkbox",0),ps(1,"span",1),Ps(2),gs(),us(3,uk,2,1,"span",2),ms(4,"div",3)),2&t&&(ds("ngIf",e.multiple),Oo(3),ds("ngIf",e.group&&e.group._inert),Oo(1),ds("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[Lh,Wk,qk],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t}();function rS(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),o=0,a=0;an+i?Math.max(0,t-i+e):n}var aS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Yk,Kh,gk,Xk]]}),t}();function sS(t,e){}var lS=function t(){o(this,t),this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0},uS={dialogContainer:gb("dialogContainer",[_b("void, exit",yb({opacity:0,transform:"scale(0.7)"})),_b("enter",yb({transform:"none"})),wb("* => enter",mb("150ms cubic-bezier(0, 0, 0.2, 1)",yb({transform:"none",opacity:1}))),wb("* => void, * => exit",mb("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",yb({opacity:0})))])},cS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this))._elementRef=t,u._focusTrapFactory=i,u._changeDetectorRef=r,u._config=s,u._focusMonitor=l,u._animationStateChanged=new Bu,u._elementFocusedBeforeDialogWasOpened=null,u._closeInteractionType=null,u.attachDomPortal=function(t){return u._portalOutlet.hasAttached(),u._portalOutlet.attachDomPortal(t)},u._ariaLabelledBy=s.ariaLabelledBy||null,u._document=a,u}return s(n,[{key:"_initializeWithAttachedContent",value:function(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}},{key:"attachComponentPortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}},{key:"_trapFocus",value:function(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}},{key:"_restoreFocus",value:function(){var t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){var e=this._getActiveElement(),n=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==n&&!n.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}},{key:"_capturePreviouslyFocusedElement",value:function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._getActiveElement())}},{key:"_focusDialogContainer",value:function(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}},{key:"_containsFocus",value:function(){var t=this._elementRef.nativeElement,e=this._getActiveElement();return t===e||t.contains(e)}},{key:"_getActiveElement",value:function(){var t,e=this._document.activeElement;return(null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement)||e}}]),n}(Sy);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(q_),hs(eu),hs(uh,8),hs(lS),hs(ib))},t.\u0275dir=ve({type:t,viewQuery:function(t,e){var n;1&t&&Ju(My,3),2&t&&Qu(n=ec())&&(e._portalOutlet=n.first)},features:[Xa]}),t}(),hS=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._state="enter",t}return s(n,[{key:"_onAnimationDone",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})):"exit"===e&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:n}))}},{key:"_onAnimationStart",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:n}):"exit"!==e&&"void"!==e||this._animationStateChanged.next({state:"closing",totalTime:n})}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(cS);return t.\u0275fac=function(e){return dS(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&Cs("@dialogContainer.start",function(t){return e._onAnimationStart(t)})("@dialogContainer.done",function(t){return e._onAnimationDone(t)}),2&t&&(rl("id",e._id),ss("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),ol("@dialogContainer",e._state))},features:[Xa],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&us(0,sS,0,0,"ng-template",0)},directives:[My],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[uS.dialogContainer]}}),t}(),dS=mi(hS),fS=0,pS=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-".concat(fS++);o(this,t),this._overlayRef=e,this._containerInstance=n,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new U,this._afterClosed=new U,this._beforeClosed=new U,this._state=0,n._id=r,n._animationStateChanged.pipe(Ld(function(t){return"opened"===t.state}),Nf(1)).subscribe(function(){i._afterOpened.next(),i._afterOpened.complete()}),n._animationStateChanged.pipe(Ld(function(t){return"closed"===t.state}),Nf(1)).subscribe(function(){clearTimeout(i._closeFallbackTimeout),i._finishDialogClose()}),e.detachments().subscribe(function(){i._beforeClosed.next(i._result),i._beforeClosed.complete(),i._afterClosed.next(i._result),i._afterClosed.complete(),i.componentInstance=null,i._overlayRef.dispose()}),e.keydownEvents().pipe(Ld(function(t){return t.keyCode===Oy&&!i.disableClose&&!By(t)})).subscribe(function(t){t.preventDefault(),gS(i,"keyboard")}),e.backdropClick().subscribe(function(){i.disableClose?i._containerInstance._recaptureFocus():gS(i,"mouse")})}return s(t,[{key:"close",value:function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(Ld(function(t){return"closing"===t.state}),Nf(1)).subscribe(function(n){e._beforeClosed.next(t),e._beforeClosed.complete(),e._overlayRef.detachBackdrop(),e._closeFallbackTimeout=setTimeout(function(){return e._finishDialogClose()},n.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}},{key:"afterOpened",value:function(){return this._afterOpened}},{key:"afterClosed",value:function(){return this._afterClosed}},{key:"beforeClosed",value:function(){return this._beforeClosed}},{key:"backdropClick",value:function(){return this._overlayRef.backdropClick()}},{key:"keydownEvents",value:function(){return this._overlayRef.keydownEvents()}},{key:"updatePosition",value:function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}},{key:"updateSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this._overlayRef.updateSize({width:t,height:e}),this._overlayRef.updatePosition(),this}},{key:"addPanelClass",value:function(t){return this._overlayRef.addPanelClass(t),this}},{key:"removePanelClass",value:function(t){return this._overlayRef.removePanelClass(t),this}},{key:"getState",value:function(){return this._state}},{key:"_finishDialogClose",value:function(){this._state=2,this._overlayRef.dispose()}},{key:"_getPositionStrategy",value:function(){return this._overlayRef.getConfig().positionStrategy}}]),t}();function gS(t,e,n){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(n)}var mS=new wi("MatDialogData"),vS=new wi("mat-dialog-default-options"),yS=new wi("mat-dialog-scroll-strategy"),_S={provide:yS,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.block()}}},bS=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c){var h=this;o(this,t),this._overlay=e,this._injector=n,this._defaultOptions=i,this._parentDialog=r,this._overlayContainer=a,this._dialogRefConstructor=l,this._dialogContainerType=u,this._dialogDataToken=c,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new U,this._afterOpenedAtThisLevel=new U,this._ariaHiddenElements=new Map,this.afterAllClosed=Ef(function(){return h.openDialogs.length?h._getAfterAllClosed():h._getAfterAllClosed().pipe(zf(void 0))}),this._scrollStrategy=s}return s(t,[{key:"_getAfterAllClosed",value:function(){var t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}},{key:"open",value:function(t,e){var n=this;(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new lS)).id&&this.getDialogById(e.id);var i=this._createOverlay(e),r=this._attachDialogContainer(i,e),o=this._attachDialogContent(t,r,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(o),o.afterClosed().subscribe(function(){return n._removeOpenDialog(o)}),this.afterOpened.next(o),r._initializeWithAttachedContent(),o}},{key:"closeAll",value:function(){this._closeDialogs(this.openDialogs)}},{key:"getDialogById",value:function(t){return this.openDialogs.find(function(e){return e.id===t})}},{key:"ngOnDestroy",value:function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}},{key:"_createOverlay",value:function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)}},{key:"_getOverlayConfig",value:function(t){var e=new Zy({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}},{key:"_attachDialogContainer",value:function(t,e){var n=Ya.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:lS,useValue:e}]}),i=new wy(this._dialogContainerType,e.viewContainerRef,n,e.componentFactoryResolver);return t.attach(i).instance}},{key:"_attachDialogContent",value:function(t,e,n,i){var r=new this._dialogRefConstructor(n,e,i.id);if(t instanceof lu)e.attachTemplatePortal(new xy(t,null,{$implicit:i.data,dialogRef:r}));else{var o=this._createInjector(i,r,e),a=e.attachComponentPortal(new wy(t,i.viewContainerRef,o));r.componentInstance=a.instance}return r.updateSize(i.width,i.height).updatePosition(i.position),r}},{key:"_createInjector",value:function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=[{provide:this._dialogContainerType,useValue:n},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||i&&i.get(uy,null)||r.push({provide:uy,useValue:{value:t.direction,change:Pd()}}),Ya.create({parent:i||this._injector,providers:r})}},{key:"_removeOpenDialog",value:function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}},{key:"_hideNonDialogContentFromAssistiveTechnology",value:function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var i=e[n];i===t||"SCRIPT"===i.nodeName||"STYLE"===i.nodeName||i.hasAttribute("aria-live")||(this._ariaHiddenElements.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}}},{key:"_closeDialogs",value:function(t){for(var e=t.length;e--;)t[e].close()}},{key:"openDialogs",get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}},{key:"afterOpened",get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(Ya),hs(void 0),hs(void 0),hs(n_),hs(void 0),hs(ki),hs(ki),hs(wi))},t.\u0275dir=ve({type:t}),t}(),wS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){return o(this,n),e.call(this,t,i,a,l,u,s,pS,hS,mS)}return n}(bS);return t.\u0275fac=function(e){return new(e||t)(zi(g_),zi(Ya),zi(Sh,8),zi(vS,8),zi(yS),zi(t,12),zi(n_))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),xS=0,kS=function(){var t=function(){function t(e,n,i){o(this,t),this.dialogRef=e,this._elementRef=n,this._dialog=i,this.type="button"}return s(t,[{key:"ngOnInit",value:function(){this.dialogRef||(this.dialogRef=MS(this._elementRef,this._dialog.openDialogs))}},{key:"ngOnChanges",value:function(t){var e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}},{key:"_onButtonClick",value:function(t){gS(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(pS,8),hs(Tl),hs(wS))},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&Ss("click",function(t){return e._onButtonClick(t)}),2&t&&ss("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Ee]}),t}(),SS=function(){var t=function(){function t(e,n,i){o(this,t),this._dialogRef=e,this._elementRef=n,this._dialog=i,this.id="mat-dialog-title-".concat(xS++)}return s(t,[{key:"ngOnInit",value:function(){var t=this;this._dialogRef||(this._dialogRef=MS(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(function(){var e=t._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=t.id)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(pS,8),hs(Tl),hs(wS))},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&rl("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t}(),CS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t}(),AS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t}();function MS(t,e){for(var n=t.nativeElement.parentElement;n&&!n.classList.contains("mat-dialog-container");)n=n.parentElement;return n?e.find(function(t){return t.id===n.id}):null}var IS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[wS,_S],imports:[[w_,Iy,gk],gk]}),t}();function TS(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}var DS=["mat-button",""],ES=["*"],OS=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",PS=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],RS=vk(mk(yk(function t(e){o(this,t),this._elementRef=e}))),LS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;o(this,n),(a=e.call(this,t))._focusMonitor=i,a._animationMode=r,a.isRoundButton=a._hasHostAttributes("mat-fab","mat-mini-fab"),a.isIconButton=a._hasHostAttributes("mat-icon-button");var s,l=v(PS);try{for(l.s();!(s=l.n()).done;){var u=s.value;a._hasHostAttributes(u)&&a._getHostElement().classList.add(u)}}catch(c){l.e(c)}finally{l.f()}return t.nativeElement.classList.add("mat-button-base"),a.isRoundButton&&(a.color="accent"),a}return s(n,[{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(t,e){t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&(this.dialogRef.afterClosed().subscribe(function(e){t.closed()}),this.setExtra(this.data.autoclose),this.subscription=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv;return(!Bv(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Nv),new z(function(n){return n.add(e.schedule(TS,t,{subscriber:n,counter:0,period:t})),n})}(1e3).subscribe(function(e){var n=t.data.autoclose-1e3*(e+1);t.setExtra(n),n<=0&&t.close()}))},t.prototype.initYesNo=function(){},t.prototype.ngOnInit=function(){!0===this.data.warnOnYes&&(this.yesColor="warn",this.noColor="primary"),this.data.type===GS.yesno?this.initYesNo():this.initAlert()},t.\u0275fac=function(e){return new(e||t)(hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-modal"]],decls:8,vars:9,consts:[["mat-dialog-title","",3,"innerHtml"],[3,"innerHTML"],["mat-raised-button","","mat-dialog-close","",3,"click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"color","click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"click"],["mat-raised-button","","mat-dialog-close","",3,"color","click"]],template:function(t,e){1&t&&(ms(0,"h4",0),Ru(1,"safeHtml"),ms(2,"mat-dialog-content",1),Ru(3,"safeHtml"),ps(4,"mat-dialog-actions"),us(5,BS,4,1,"button",2),us(6,HS,3,1,"button",3),us(7,jS,3,1,"button",3),gs()),2&t&&(ds("innerHtml",Lu(1,5,e.data.title),Dr),Oo(2),ds("innerHTML",Lu(3,7,e.data.body),Dr),Oo(3),ds("ngIf",0==e.data.type),Oo(1),ds("ngIf",1==e.data.type),Oo(1),ds("ngIf",1==e.data.type))},directives:[SS,CS,AS,Lh,LS,kS,VS],pipes:[zS],styles:[".uds-modal-footer[_ngcontent-%COMP%]{display:flex;justify-content:left}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),WS=function(t){return t.TEXT="text",t.TEXTBOX="textbox",t.NUMERIC="numeric",t.PASSWORD="password",t.HIDDEN="hidden",t.CHOICE="choice",t.MULTI_CHOICE="multichoice",t.EDITLIST="editlist",t.CHECKBOX="checkbox",t.IMAGECHOICE="imgchoice",t.DATE="date",t.DATETIME="datetime",t.TAGLIST="taglist",t}({}),YS=function(){function t(){}return t.locateChoice=function(t,e){var n=e.gui.values.find(function(e){return e.id===t});if(void 0===n)try{n=e.gui.values[0]}catch(i){n={id:"",img:"",text:""}}return n},t}();function qS(t,e){return new z(function(n){var i=t.length;if(0!==i)for(var r=new Array(i),o=0,a=0,s=function(s){var l=it(t[s]),u=!1;n.add(l.subscribe({next:function(t){u||(u=!0,a++),r[s]=t},error:function(t){return n.error(t)},complete:function(){++o!==i&&u||(a===i&&n.next(e?e.reduce(function(t,e,n){return t[e]=r[n],t},{}):r),n.complete())}}))},l=0;le?{max:{max:e,actual:t.value}}:null};var e}},{key:"required",value:function(t){return oC(t)}},{key:"requiredTrue",value:function(t){return aC(t)}},{key:"email",value:function(t){return function(t){return JS(t.value)||iC.test(t.value)?null:{email:!0}}(t)}},{key:"minLength",value:function(t){return e=t,function(t){return JS(t.value)||!tC(t.value)?null:t.value.lengtht?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}}function lC(t){return null}function uC(t){return null!=t}function cC(t){var e=ws(t)?it(t):t;return ks(e),e}function hC(t){var e={};return t.forEach(function(t){e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function dC(t,e){return e.map(function(e){return e(t)})}function fC(t){return t.map(function(t){return function(t){return!t.validate}(t)?t:function(e){return t.validate(e)}})}function pC(t){if(!t)return null;var e=t.filter(uC);return 0==e.length?null:function(t){return hC(dC(t,e))}}function gC(t){return null!=t?pC(fC(t)):null}function mC(t){if(!t)return null;var e=t.filter(uC);return 0==e.length?null:function(t){return function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0;this.control&&this.control.reset(t)}},{key:"hasError",value:function(t,e){return!!this.control&&this.control.hasError(t,e)}},{key:"getError",value:function(t,e){return this.control?this.control.getError(t,e):null}},{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t}),t}(),xC=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(wC);return t.\u0275fac=function(e){return kC(e||t)},t.\u0275dir=ve({type:t,features:[Xa]}),t}(),kC=mi(xC),SC=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._parent=null,t.name=null,t.valueAccessor=null,t}return n}(wC),CC=function(){function t(e){o(this,t),this._cd=e}return s(t,[{key:"is",value:function(t){var e,n;return!!(null===(n=null===(e=this._cd)||void 0===e?void 0:e.control)||void 0===n?void 0:n[t])}}]),t}(),AC=function(){var t=function(t){u(n,t);var e=p(n);function n(t){return o(this,n),e.call(this,t)}return n}(CC);return t.\u0275fac=function(e){return new(e||t)(hs(SC,2))},t.\u0275dir=ve({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&Gs("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[Xa]}),t}(),MC=function(){var t=function(t){u(n,t);var e=p(n);function n(t){return o(this,n),e.call(this,t)}return n}(CC);return t.\u0275fac=function(e){return new(e||t)(hs(xC,10))},t.\u0275dir=ve({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&Gs("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[Xa]}),t}();function IC(t,e){EC(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&PC(t,e)})}(t,e),function(t,e){var n=function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};t.registerOnChange(n),e._registerOnDestroy(function(){t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&PC(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){var n=function(t){e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(n),e._registerOnDestroy(function(){t._unregisterOnDisabledChange(n)})}}(t,e)}function TC(t,e){var n=function(){};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),OC(t,e,!0),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(function(){}))}function DC(t,e){t.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function EC(t,e,n){var i=_C(t);null!==e.validator?t.setValidators(yC(i,e.validator)):"function"==typeof i&&t.setValidators([i]);var r=bC(t);if(null!==e.asyncValidator?t.setAsyncValidators(yC(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]),n){var o=function(){return t.updateValueAndValidity()};DC(e._rawValidators,o),DC(e._rawAsyncValidators,o)}}function OC(t,e,n){var i=!1;if(null!==t){if(null!==e.validator){var r=_C(t);if(Array.isArray(r)&&r.length>0){var o=r.filter(function(t){return t!==e.validator});o.length!==r.length&&(i=!0,t.setValidators(o))}}if(null!==e.asyncValidator){var a=bC(t);if(Array.isArray(a)&&a.length>0){var s=a.filter(function(t){return t!==e.asyncValidator});s.length!==a.length&&(i=!0,t.setAsyncValidators(s))}}}if(n){var l=function(){};DC(e._rawValidators,l),DC(e._rawAsyncValidators,l)}return i}function PC(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function RC(t,e){EC(t,e,!1)}function LC(t,e){t._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function NC(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var FC="VALID",VC="INVALID",zC="PENDING",BC="DISABLED";function HC(t){return(WC(t)?t.validators:t)||null}function jC(t){return Array.isArray(t)?gC(t):t||null}function GC(t,e){return(WC(e)?e.asyncValidators:t)||null}function UC(t){return Array.isArray(t)?vC(t):t||null}function WC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var YC=function(){function t(e,n){o(this,t),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=n,this._composedValidatorFn=jC(this._rawValidators),this._composedAsyncValidatorFn=UC(this._rawAsyncValidators)}return s(t,[{key:"setValidators",value:function(t){this._rawValidators=t,this._composedValidatorFn=jC(t)}},{key:"setAsyncValidators",value:function(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=UC(t)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild(function(t){return t.markAllAsTouched()})}},{key:"markAsUntouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(t){t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"markAsDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}},{key:"markAsPristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(t){t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"markAsPending",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status=zC,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}},{key:"disable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=BC,this.errors=null,this._forEachChild(function(e){e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(function(t){return t(!0)})}},{key:"enable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=FC,this._forEachChild(function(e){e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(function(t){return t(!1)})}},{key:"_updateAncestors",value:function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(t){this._parent=t}},{key:"updateValueAndValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==FC&&this.status!==zC||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}},{key:"_updateTreeValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild(function(e){return e._updateTreeValidity(t)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?BC:FC}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(t){var e=this;if(this.asyncValidator){this.status=zC,this._hasOwnPendingAsyncValidator=!0;var n=cC(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){e._hasOwnPendingAsyncValidator=!1,e.setErrors(n,{emitEvent:t})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}},{key:"get",value:function(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;var i=t;return e.forEach(function(t){i=i instanceof XC?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof ZC&&i.at(t)||null}),i}(this,t)}},{key:"getError",value:function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}},{key:"hasError",value:function(t,e){return!!this.getError(t,e)}},{key:"_updateControlsErrors",value:function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}},{key:"_initObservables",value:function(){this.valueChanges=new Bu,this.statusChanges=new Bu}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?BC:this.errors?VC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zC)?zC:this._anyControlsHaveStatus(VC)?VC:FC}},{key:"_anyControlsHaveStatus",value:function(t){return this._anyControls(function(e){return e.status===t})}},{key:"_anyControlsDirty",value:function(){return this._anyControls(function(t){return t.dirty})}},{key:"_anyControlsTouched",value:function(){return this._anyControls(function(t){return t.touched})}},{key:"_updatePristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"_updateTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"_isBoxedValue",value:function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}},{key:"_registerOnCollectionChange",value:function(t){this._onCollectionChange=t}},{key:"_setUpdateStrategy",value:function(t){WC(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}},{key:"_parentMarkedDirty",value:function(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(t){this._rawValidators=this._composedValidatorFn=t}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return this.status===FC}},{key:"invalid",get:function(){return this.status===VC}},{key:"pending",get:function(){return this.status==zC}},{key:"disabled",get:function(){return this.status===BC}},{key:"enabled",get:function(){return this.status!==BC}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"root",get:function(){for(var t=this;t._parent;)t=t._parent;return t}}]),t}(),qC=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return o(this,n),(t=e.call(this,HC(r),GC(a,r)))._onChange=[],t._applyFormState(i),t._setUpdateStrategy(r),t._initObservables(),t.updateValueAndValidity({onlySelf:!0,emitEvent:!!a}),t}return s(n,[{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(function(t){return t(e.value,!1!==n.emitViewToModelChange)}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(t,e)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(t){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(t){this._onChange.push(t)}},{key:"_unregisterOnChange",value:function(t){NC(this._onChange,t)}},{key:"registerOnDisabledChange",value:function(t){this._onDisabledChange.push(t)}},{key:"_unregisterOnDisabledChange",value:function(t){NC(this._onDisabledChange,t)}},{key:"_forEachChild",value:function(t){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}]),n}(YC),XC=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,HC(i),GC(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),a}return s(n,[{key:"registerControl",value:function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}},{key:"addControl",value:function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),Object.keys(t).forEach(function(i){e._throwIfControlMissing(i),e.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null!=t&&(Object.keys(t).forEach(function(i){e.controls[i]&&e.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this._reduceChildren({},function(t,e,n){return t[n]=e instanceof qC?e.value:e.getRawValue(),t})}},{key:"_syncPendingControls",value:function(){var t=this._reduceChildren(!1,function(t,e){return!!e._syncPendingControls()||t});return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error("Cannot find form control with name: ".concat(t,"."))}},{key:"_forEachChild",value:function(t){var e=this;Object.keys(this.controls).forEach(function(n){var i=e.controls[n];i&&t(i,n)})}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild(function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)})}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(t){for(var e=0,n=Object.keys(this.controls);e0||this.disabled}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))})}}]),n}(YC),ZC=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,HC(i),GC(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),a}return s(n,[{key:"at",value:function(t){return this.controls[t]}},{key:"push",value:function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}},{key:"removeAt",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),t.forEach(function(t,i){e._throwIfControlMissing(i),e.at(i).setValue(t,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null!=t&&(t.forEach(function(t,i){e.at(i)&&e.at(i).patchValue(t,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this.controls.map(function(t){return t instanceof qC?t.value:t.getRawValue()})}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild(function(t){return t._registerOnCollectionChange(function(){})}),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index ".concat(t))}},{key:"_forEachChild",value:function(t){this.controls.forEach(function(e,n){t(e,n)})}},{key:"_updateValue",value:function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})}},{key:"_anyControls",value:function(t){return this.controls.some(function(e){return e.enabled&&t(e)})}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))})}},{key:"_allControlsDisabled",value:function(){var t,e=v(this.controls);try{for(e.s();!(t=e.n()).done;)if(t.value.enabled)return!1}catch(n){e.e(n)}finally{e.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(YC),KC={provide:xC,useExisting:Ct(function(){return QC})},$C=function(){return Promise.resolve(null)}(),QC=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new Bu,r.form=new XC({},gC(t),vC(i)),r}return s(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),IC(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),NC(e._directives,t)})}},{key:"addFormGroup",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path),i=new XC({});RC(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){var n=this;$C.then(function(){n.form.get(t.path).setValue(e)})}},{key:"setValue",value:function(t){this.control.setValue(t)}},{key:"onSubmit",value:function(t){return this.submitted=!0,LC(this.form,this._directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(t){return t.pop(),t.length?this.form.get(t):this.form}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"controls",get:function(){return this.form.controls}}]),n}(xC);return t.\u0275fac=function(e){return new(e||t)(hs(eC,10),hs(nC,10))},t.\u0275dir=ve({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&Ss("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[wl([KC]),Xa]}),t}(),JC={provide:SC,useExisting:Ct(function(){return eA})},tA=function(){return Promise.resolve(null)}(),eA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this)).control=new qC,s._registered=!1,s.update=new Bu,s._parent=t,s._setValidators(i),s._setAsyncValidators(r),s.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e);var n=void 0,i=void 0,r=void 0;return e.forEach(function(t){t.constructor===QS?n=t:Object.getPrototypeOf(t.constructor)===XS?i=t:r=t}),r||i||n||null}(d(s),a),s}return s(n,[{key:"ngOnChanges",value:function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_setUpControl",value:function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}},{key:"_isStandalone",value:function(){return!this._parent||!(!this.options||!this.options.standalone)}},{key:"_setUpStandalone",value:function(){IC(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(t){var e=this;tA.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})}},{key:"_updateDisabled",value:function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;tA.then(function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()})}},{key:"path",get:function(){return this._parent?(t=this.name,[].concat(b(this._parent.path),[t])):[this.name];var t}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(SC);return t.\u0275fac=function(e){return new(e||t)(hs(xC,9),hs(eC,10),hs(nC,10),hs(ZS,10))},t.\u0275dir=ve({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[wl([JC]),Xa,Ee]}),t}(),nA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t}(),iA={provide:ZS,useExisting:Ct(function(){return rA}),multi:!0},rA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._renderer=t,r._elementRef=i,r.onChange=function(t){},r.onTouched=function(){},r}return s(n,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),n}(XS);return t.\u0275fac=function(e){return new(e||t)(hs(Ol),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&Ss("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[wl([iA]),Xa]}),t}(),oA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),aA=new wi("NgModelWithFormControlWarning"),sA={provide:xC,useExisting:Ct(function(){return lA})},lA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).validators=t,r.asyncValidators=i,r.submitted=!1,r._onCollectionChange=function(){return r._updateDomValue()},r.directives=[],r.form=null,r.ngSubmit=new Bu,r._setValidators(t),r._setAsyncValidators(i),r}return s(n,[{key:"ngOnChanges",value:function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"ngOnDestroy",value:function(){this.form&&(OC(this.form,this,!1),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(function(){}))}},{key:"addControl",value:function(t){var e=this.form.get(t.path);return IC(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){TC(t.control||null,t),NC(this.directives,t)}},{key:"addFormGroup",value:function(t){this._setUpFormContainer(t)}},{key:"removeFormGroup",value:function(t){this._cleanUpFormContainer(t)}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"addFormArray",value:function(t){this._setUpFormContainer(t)}},{key:"removeFormArray",value:function(t){this._cleanUpFormContainer(t)}},{key:"getFormArray",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){this.form.get(t.path).setValue(e)}},{key:"onSubmit",value:function(t){return this.submitted=!0,LC(this.form,this.directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_updateDomValue",value:function(){var t=this;this.directives.forEach(function(e){var n=e.control,i=t.form.get(e.path);n!==i&&(TC(n||null,e),i instanceof qC&&(IC(i,e),e.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_setUpFormContainer",value:function(t){var e=this.form.get(t.path);RC(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"_cleanUpFormContainer",value:function(t){if(this.form){var e=this.form.get(t.path);e&&function(t,e){return OC(t,e,!1)}(e,t)&&e.updateValueAndValidity({emitEvent:!1})}}},{key:"_updateRegistrations",value:function(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){EC(this.form,this,!1),this._oldForm&&OC(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(xC);return t.\u0275fac=function(e){return new(e||t)(hs(eC,10),hs(nC,10))},t.\u0275dir=ve({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&Ss("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[wl([sA]),Xa,Ee]}),t}(),uA={provide:eC,useExisting:Ct(function(){return hA}),multi:!0},cA={provide:eC,useExisting:Ct(function(){return dA}),multi:!0},hA=function(){var t=function(){function t(){o(this,t),this._required=!1}return s(t,[{key:"validate",value:function(t){return this.required?oC(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"required",get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&"false"!=="".concat(t),this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&ss("required",e.required?"":null)},inputs:{required:"required"},features:[wl([uA])]}),t}(),dA=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"validate",value:function(t){return this.required?aC(t):null}}]),n}(hA);return t.\u0275fac=function(e){return fA(e||t)},t.\u0275dir=ve({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&ss("required",e.required?"":null)},features:[wl([cA]),Xa]}),t}(),fA=mi(dA),pA={provide:eC,useExisting:Ct(function(){return gA}),multi:!0},gA=function(){var t=function(){function t(){o(this,t),this._validator=lC}return s(t,[{key:"ngOnChanges",value:function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null!=this.maxlength?this._validator(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=sC("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&ss("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[wl([pA]),Ee]}),t}(),mA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[oA]]}),t}(),vA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[mA]}),t}(),yA=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"withConfig",value:function(e){return{ngModule:t,providers:[{provide:aA,useValue:e.warnOnNgModelWithFormControl}]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[mA]}),t}();function _A(t,e){1&t&&Ps(0)}var bA=["*"];function wA(t,e){}var xA=function(t){return{animationDuration:t}},kA=function(t,e){return{value:t,params:e}},SA=["tabBodyWrapper"],CA=["tabHeader"];function AA(t,e){}function MA(t,e){1&t&&us(0,AA,0,0,"ng-template",9),2&t&&ds("cdkPortalOutlet",Ds().$implicit.templateLabel)}function IA(t,e){1&t&&tl(0),2&t&&el(Ds().$implicit.textLabel)}function TA(t,e){if(1&t){var n=bs();ps(0,"div",6),Ss("click",function(){rn(n);var t=e.$implicit,i=e.index,r=Ds(),o=cs(1);return r._handleClick(t,o,i)})("cdkFocusChange",function(t){rn(n);var i=e.index;return Ds()._tabFocusChanged(t,i)}),ps(1,"div",7),us(2,MA,1,1,"ng-template",8),us(3,IA,1,1,"ng-template",8),gs(),gs()}if(2&t){var i=e.$implicit,r=e.index,o=Ds();Gs("mat-tab-label-active",o.selectedIndex==r),ds("id",o._getTabLabelId(r))("disabled",i.disabled)("matRippleDisabled",i.disabled||o.disableRipple),ss("tabIndex",o._getTabIndex(i,r))("aria-posinset",r+1)("aria-setsize",o._tabs.length)("aria-controls",o._getTabContentId(r))("aria-selected",o.selectedIndex==r)("aria-label",i.ariaLabel||null)("aria-labelledby",!i.ariaLabel&&i.ariaLabelledby?i.ariaLabelledby:null),Oo(2),ds("ngIf",i.templateLabel),Oo(1),ds("ngIf",!i.templateLabel)}}function DA(t,e){if(1&t){var n=bs();ps(0,"mat-tab-body",10),Ss("_onCentered",function(){return rn(n),Ds()._removeTabBodyWrapperHeight()})("_onCentering",function(t){return rn(n),Ds()._setTabBodyWrapperHeight(t)}),gs()}if(2&t){var i=e.$implicit,r=e.index,o=Ds();Gs("mat-tab-body-active",o.selectedIndex==r),ds("id",o._getTabContentId(r))("content",i.content)("position",i.position)("origin",i.origin)("animationDuration",o.animationDuration),ss("aria-labelledby",o._getTabLabelId(r))}}var EA=["tabListContainer"],OA=["tabList"],PA=["nextPaginator"],RA=["previousPaginator"],LA=new wi("MatInkBarPositioner",{providedIn:"root",factory:function(){return function(t){return{left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"}}}}),NA=function(){var t=function(){function t(e,n,i,r){o(this,t),this._elementRef=e,this._ngZone=n,this._inkBarPositioner=i,this._animationMode=r}return s(t,[{key:"alignToElement",value:function(t){var e=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return e._setStyles(t)})}):this._setStyles(t)}},{key:"show",value:function(){this._elementRef.nativeElement.style.visibility="visible"}},{key:"hide",value:function(){this._elementRef.nativeElement.style.visibility="hidden"}},{key:"_setStyles",value:function(t){var e=this._inkBarPositioner(t),n=this._elementRef.nativeElement;n.style.left=e.left,n.style.width=e.width}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(LA),hs(rk,8))},t.\u0275dir=ve({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&Gs("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t}(),FA=new wi("MatTabContent"),VA=new wi("MatTabLabel"),zA=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(Ay);return t.\u0275fac=function(e){return BA(e||t)},t.\u0275dir=ve({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[wl([{provide:VA,useExisting:t}]),Xa]}),t}(),BA=mi(zA),HA=mk(function t(){o(this,t)}),jA=new wi("MAT_TAB_GROUP"),GA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._viewContainerRef=t,r._closestTabGroup=i,r.textLabel="",r._contentPortal=null,r._stateChanges=new U,r.position=null,r.origin=null,r.isActive=!1,r}return s(n,[{key:"ngOnChanges",value:function(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"ngOnInit",value:function(){this._contentPortal=new xy(this._explicitContent||this._implicitContent,this._viewContainerRef)}},{key:"_setTemplateLabelInput",value:function(t){t&&(this._templateLabel=t)}},{key:"templateLabel",get:function(){return this._templateLabel},set:function(t){this._setTemplateLabelInput(t)}},{key:"content",get:function(){return this._contentPortal}}]),n}(HA);return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(jA))},t.\u0275cmp=he({type:t,selectors:[["mat-tab"]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,VA,1),tc(n,FA,3,lu)),2&t&&(Qu(i=ec())&&(e.templateLabel=i.first),Qu(i=ec())&&(e._explicitContent=i.first))},viewQuery:function(t,e){var n;1&t&&Ju(lu,3),2&t&&Qu(n=ec())&&(e._implicitContent=n.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[Xa,Ee],ngContentSelectors:bA,decls:1,vars:0,template:function(t,e){1&t&&(Os(),us(0,_A,1,0,"ng-template"))},encapsulation:2}),t}(),UA={translateTab:gb("translateTab",[_b("center, void, left-origin-center, right-origin-center",yb({transform:"none"})),_b("left",yb({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),_b("right",yb({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),wb("* => left, * => right, left => center, right => center",mb("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),wb("void => left-origin-center",[yb({transform:"translate3d(-100%, 0, 0)"}),mb("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),wb("void => right-origin-center",[yb({transform:"translate3d(100%, 0, 0)"}),mb("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},WA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i,a))._host=r,s._centeringSub=M.EMPTY,s._leavingSub=M.EMPTY,s}return s(n,[{key:"ngOnInit",value:function(){var t=this;r(i(n.prototype),"ngOnInit",this).call(this),this._centeringSub=this._host._beforeCentering.pipe(zf(this._host._isCenterPosition(this._host._position))).subscribe(function(e){e&&!t.hasAttached()&&t.attach(t._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(function(){t.detach()})}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"ngOnDestroy",this).call(this),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}]),n}(My);return t.\u0275fac=function(e){return new(e||t)(hs(Cl),hs(pu),hs(Ct(function(){return qA})),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","matTabBodyHost",""]],features:[Xa]}),t}(),YA=function(){var t=function(){function t(e,n,i){var r=this;o(this,t),this._elementRef=e,this._dir=n,this._dirChangeSubscription=M.EMPTY,this._translateTabComplete=new U,this._onCentering=new Bu,this._beforeCentering=new Bu,this._afterLeavingCenter=new Bu,this._onCentered=new Bu(!0),this.animationDuration="500ms",n&&(this._dirChangeSubscription=n.change.subscribe(function(t){r._computePositionAnimationState(t),i.markForCheck()})),this._translateTabComplete.pipe(Pv(function(t,e){return t.fromState===e.fromState&&t.toState===e.toState})).subscribe(function(t){r._isCenterPosition(t.toState)&&r._isCenterPosition(r._position)&&r._onCentered.emit(),r._isCenterPosition(t.fromState)&&!r._isCenterPosition(r._position)&&r._afterLeavingCenter.emit()})}return s(t,[{key:"ngOnInit",value:function(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}},{key:"ngOnDestroy",value:function(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}},{key:"_onTranslateTabStarted",value:function(t){var e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_isCenterPosition",value:function(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}},{key:"_computePositionAnimationState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getLayoutDirection();this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}},{key:"_computePositionFromOrigin",value:function(t){var e=this._getLayoutDirection();return"ltr"==e&&t<=0||"rtl"==e&&t>0?"left-origin-center":"right-origin-center"}},{key:"position",set:function(t){this._positionIndex=t,this._computePositionAnimationState()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(uy,8),hs(eu))},t.\u0275dir=ve({type:t,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),t}(),qA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){return o(this,n),e.call(this,t,i,r)}return n}(YA);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(uy,8),hs(eu))},t.\u0275cmp=he({type:t,selectors:[["mat-tab-body"]],viewQuery:function(t,e){var n;1&t&&Ju(My,1),2&t&&Qu(n=ec())&&(e._portalHost=n.first)},hostAttrs:[1,"mat-tab-body"],features:[Xa],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(t,e){1&t&&(ps(0,"div",0,1),Ss("@translateTab.start",function(t){return e._onTranslateTabStarted(t)})("@translateTab.done",function(t){return e._translateTabComplete.next(t)}),us(2,wA,0,0,"ng-template",2),gs()),2&t&&ds("@translateTab",Du(3,kA,e._position,Tu(1,xA,e.animationDuration)))},directives:[WA],styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}\n"],encapsulation:2,data:{animation:[UA.translateTab]}}),t}(),XA=new wi("MAT_TABS_CONFIG"),ZA=0,KA=function t(){o(this,t)},$A=vk(yk(function t(e){o(this,t),this._elementRef=e}),"primary"),QA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t))._changeDetectorRef=i,s._animationMode=a,s._tabs=new ju,s._indexToSelect=0,s._tabBodyWrapperHeight=0,s._tabsSubscription=M.EMPTY,s._tabLabelSubscription=M.EMPTY,s._selectedIndex=null,s.headerPosition="above",s.selectedIndexChange=new Bu,s.focusChange=new Bu,s.animationDone=new Bu,s.selectedTabChange=new Bu(!0),s._groupId=ZA++,s.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",s.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,s.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,s}return s(n,[{key:"ngAfterContentChecked",value:function(){var t=this,e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){var n=null==this._selectedIndex;if(!n){this.selectedTabChange.emit(this._createChangeEvent(e));var i=this._tabBodyWrapper.nativeElement;i.style.minHeight=i.clientHeight+"px"}Promise.resolve().then(function(){t._tabs.forEach(function(t,n){return t.isActive=n===e}),n||(t.selectedIndexChange.emit(e),t._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach(function(n,i){n.position=i-e,null==t._selectedIndex||0!=n.position||n.origin||(n.origin=e-t._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._changeDetectorRef.markForCheck())}},{key:"ngAfterContentInit",value:function(){var t=this;this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(function(){if(t._clampTabIndex(t._indexToSelect)===t._selectedIndex)for(var e=t._tabs.toArray(),n=0;n.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\n"],encapsulation:2}),t}(),tM=mk(function t(){o(this,t)}),eM=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).elementRef=t,i}return s(n,[{key:"focus",value:function(){this.elementRef.nativeElement.focus()}},{key:"getOffsetLeft",value:function(){return this.elementRef.nativeElement.offsetLeft}},{key:"getOffsetWidth",value:function(){return this.elementRef.nativeElement.offsetWidth}}]),n}(tM);return t.\u0275fac=function(e){return new(e||t)(hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(t,e){2&t&&(ss("aria-disabled",!!e.disabled),Gs("mat-tab-disabled",e.disabled))},inputs:{disabled:"disabled"},features:[Xa]}),t}(),nM=oy({passive:!0}),iM=function(){var t=function(){function t(e,n,i,r,a,s,l){var u=this;o(this,t),this._elementRef=e,this._changeDetectorRef=n,this._viewportRuler=i,this._dir=r,this._ngZone=a,this._platform=s,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new U,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new U,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new Bu,this.indexFocused=new Bu,a.runOutsideAngular(function(){bv(e.nativeElement,"mouseleave").pipe(Uv(u._destroyed)).subscribe(function(){u._stopInterval()})})}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this;bv(this._previousPaginator.nativeElement,"touchstart",nM).pipe(Uv(this._destroyed)).subscribe(function(){t._handlePaginatorPress("before")}),bv(this._nextPaginator.nativeElement,"touchstart",nM).pipe(Uv(this._destroyed)).subscribe(function(){t._handlePaginatorPress("after")})}},{key:"ngAfterContentInit",value:function(){var t=this,e=this._dir?this._dir.change:Pd(null),n=this._viewportRuler.change(150),i=function(){t.updatePagination(),t._alignInkBarToSelectedTab()};this._keyManager=new j_(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),dt(e,n,this._items.changes).pipe(Uv(this._destroyed)).subscribe(function(){t._ngZone.run(function(){return Promise.resolve().then(i)}),t._keyManager.withHorizontalOrientation(t._getLayoutDirection())}),this._keyManager.change.pipe(Uv(this._destroyed)).subscribe(function(e){t.indexFocused.emit(e),t._setTabFocus(e)})}},{key:"ngAfterContentChecked",value:function(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}},{key:"_handleKeydown",value:function(t){if(!By(t))switch(t.keyCode){case Ey:case Py:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}},{key:"_onContentChanges",value:function(){var t=this,e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(function(){t.updatePagination(),t._alignInkBarToSelectedTab(),t._changeDetectorRef.markForCheck()}))}},{key:"updatePagination",value:function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}},{key:"_isValidIndex",value:function(t){if(!this._items)return!0;var e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}},{key:"_setTabFocus",value:function(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();var e=this._tabListContainer.nativeElement,n=this._getLayoutDirection();e.scrollLeft="ltr"==n?0:e.scrollWidth-e.offsetWidth}}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_updateTabScrollPosition",value:function(){if(!this.disablePagination){var t=this.scrollDistance,e="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform="translateX(".concat(Math.round(e),"px)"),(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}}},{key:"_scrollHeader",value:function(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}},{key:"_handlePaginatorClick",value:function(t){this._stopInterval(),this._scrollHeader(t)}},{key:"_scrollToLabel",value:function(t){if(!this.disablePagination){var e=this._items?this._items.toArray()[t]:null;if(e){var n,i,r=this._tabListContainer.nativeElement.offsetWidth,o=e.elementRef.nativeElement,a=o.offsetLeft,s=o.offsetWidth;"ltr"==this._getLayoutDirection()?i=(n=a)+s:n=(i=this._tabList.nativeElement.offsetWidth-a)-s;var l=this.scrollDistance,u=this.scrollDistance+r;nu&&(this.scrollDistance+=i-u+60)}}}},{key:"_checkPaginationEnabled",value:function(){if(this.disablePagination)this._showPaginationControls=!1;else{var t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}},{key:"_checkScrollingControls",value:function(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}},{key:"_getMaxScrollDistance",value:function(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}},{key:"_alignInkBarToSelectedTab",value:function(){var t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}},{key:"_stopInterval",value:function(){this._stopScrolling.next()}},{key:"_handlePaginatorPress",value:function(t,e){var n=this;e&&null!=e.button&&0!==e.button||(this._stopInterval(),Hv(650,100).pipe(Uv(dt(this._stopScrolling,this._destroyed))).subscribe(function(){var e=n._scrollHeader(t),i=e.distance;(0===i||i>=e.maxScrollDistance)&&n._stopInterval()}))}},{key:"_scrollTo",value:function(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};var e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}},{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(t){t=pv(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}},{key:"focusIndex",get:function(){return this._keyManager?this._keyManager.activeItemIndex:0},set:function(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}},{key:"scrollDistance",get:function(){return this._scrollDistance},set:function(t){this._scrollTo(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(vy),hs(uy,8),hs(Mc),hs(ey),hs(rk,8))},t.\u0275dir=ve({type:t,inputs:{disablePagination:"disablePagination"}}),t}(),rM=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){var c;return o(this,n),(c=e.call(this,t,i,r,a,s,l,u))._disableRipple=!1,c}return s(n,[{key:"_itemSelected",value:function(t){t.preventDefault()}},{key:"disableRipple",get:function(){return this._disableRipple},set:function(t){this._disableRipple=fv(t)}}]),n}(iM);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(vy),hs(uy,8),hs(Mc),hs(ey),hs(rk,8))},t.\u0275dir=ve({type:t,inputs:{disableRipple:"disableRipple"},features:[Xa]}),t}(),oM=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){return o(this,n),e.call(this,t,i,r,a,s,l,u)}return n}(rM);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(vy),hs(uy,8),hs(Mc),hs(ey),hs(rk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-tab-header"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,eM,0),2&t&&Qu(i=ec())&&(e._items=i)},viewQuery:function(t,e){var n;1&t&&(Ju(NA,3),Ju(EA,3),Ju(OA,3),Ju(PA,1),Ju(RA,1)),2&t&&(Qu(n=ec())&&(e._inkBar=n.first),Qu(n=ec())&&(e._tabListContainer=n.first),Qu(n=ec())&&(e._tabList=n.first),Qu(n=ec())&&(e._nextPaginator=n.first),Qu(n=ec())&&(e._previousPaginator=n.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(t,e){2&t&&Gs("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[Xa],ngContentSelectors:bA,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-labels"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(Os(),ps(0,"div",0,1),Ss("click",function(){return e._handlePaginatorClick("before")})("mousedown",function(t){return e._handlePaginatorPress("before",t)})("touchend",function(){return e._stopInterval()}),ms(2,"div",2),gs(),ps(3,"div",3,4),Ss("keydown",function(t){return e._handleKeydown(t)}),ps(5,"div",5,6),Ss("cdkObserveContent",function(){return e._onContentChanges()}),ps(7,"div",7),Ps(8),gs(),ms(9,"mat-ink-bar"),gs(),gs(),ps(10,"div",8,9),Ss("mousedown",function(t){return e._handlePaginatorPress("after",t)})("click",function(){return e._handlePaginatorClick("after")})("touchend",function(){return e._stopInterval()}),ms(12,"div",2),gs()),2&t&&(Gs("mat-tab-header-pagination-disabled",e._disableScrollBefore),ds("matRippleDisabled",e._disableScrollBefore||e.disableRipple),Oo(5),Gs("_mat-animation-noopable","NoopAnimations"===e._animationMode),Oo(5),Gs("mat-tab-header-pagination-disabled",e._disableScrollAfter),ds("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[Wk,I_,NA],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\n'],encapsulation:2}),t}(),aM=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Kh,gk,Iy,Yk,T_,cb],gk]}),t}();function sM(t,e){if(1&t){var n=bs();ps(0,"uds-field-text",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function lM(t,e){if(1&t){var n=bs();ps(0,"uds-field-textbox",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function uM(t,e){if(1&t){var n=bs();ps(0,"uds-field-numeric",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function cM(t,e){if(1&t){var n=bs();ps(0,"uds-field-password",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function hM(t,e){if(1&t){var n=bs();ps(0,"uds-field-hidden",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function dM(t,e){if(1&t){var n=bs();ps(0,"uds-field-choice",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function fM(t,e){if(1&t){var n=bs();ps(0,"uds-field-multichoice",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function pM(t,e){if(1&t){var n=bs();ps(0,"uds-field-editlist",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function gM(t,e){if(1&t){var n=bs();ps(0,"uds-field-checkbox",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function mM(t,e){if(1&t){var n=bs();ps(0,"uds-field-imgchoice",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function vM(t,e){if(1&t){var n=bs();ps(0,"uds-field-date",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function yM(t,e){if(1&t){var n=bs();ps(0,"uds-field-tags",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}var _M=function(){function t(){this.changed=new Bu,this.udsGuiFieldType=WS}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:13,vars:14,consts:[["matTooltipShowDelay","1000",1,"field",3,"ngSwitch","matTooltip"],[3,"field","changed",4,"ngSwitchCase"],[3,"field","changed"]],template:function(t,e){1&t&&(ps(0,"div",0),us(1,sM,1,1,"uds-field-text",1),us(2,lM,1,1,"uds-field-textbox",1),us(3,uM,1,1,"uds-field-numeric",1),us(4,cM,1,1,"uds-field-password",1),us(5,hM,1,1,"uds-field-hidden",1),us(6,dM,1,1,"uds-field-choice",1),us(7,fM,1,1,"uds-field-multichoice",1),us(8,pM,1,1,"uds-field-editlist",1),us(9,gM,1,1,"uds-field-checkbox",1),us(10,mM,1,1,"uds-field-imgchoice",1),us(11,vM,1,1,"uds-field-date",1),us(12,yM,1,1,"uds-field-tags",1),gs()),2&t&&(ds("ngSwitch",e.field.gui.type)("matTooltip",e.field.gui.tooltip),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.TEXT),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.TEXTBOX),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.NUMERIC),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.PASSWORD),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.HIDDEN),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.CHOICE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.MULTI_CHOICE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.EDITLIST),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.CHECKBOX),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.IMAGECHOICE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.DATE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.TAGLIST))},styles:["uds-field[_ngcontent-%COMP%]{flex:1 50%} .mat-form-field{width:calc(100% - 1px)} .mat-form-field-flex{padding-top:0!important} .mat-tooltip{font-size:.9rem!important;margin:0!important;max-width:26em!important}"]}),t}();function bM(t,e){1&t&&tl(0),2&t&&nl(" ",Ds().$implicit," ")}function wM(t,e){if(1&t){var n=bs();ps(0,"uds-field",7),Ss("changed",function(t){return rn(n),Ds(3).changed.emit(t)}),gs()}2&t&&ds("field",e.$implicit)}function xM(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,bM,1,1,"ng-template",4),ps(2,"div",5),us(3,wM,1,1,"uds-field",6),gs(),gs()),2&t){var n=e.$implicit,i=Ds(2);Oo(3),ds("ngForOf",i.fieldsByTab[n])}}function kM(t,e){if(1&t&&(ps(0,"mat-tab-group",2),us(1,xM,4,1,"mat-tab",3),gs()),2&t){var n=Ds();ds("disableRipple",!0)("@.disabled",!0),Oo(1),ds("ngForOf",n.tabs)}}function SM(t,e){if(1&t&&(ps(0,"div"),ms(1,"uds-field",8),gs()),2&t){var n=e.$implicit;Oo(1),ds("field",n)}}function CM(t,e){1&t&&us(0,SM,2,1,"div",3),2&t&&ds("ngForOf",Ds().fields)}var AM=django.gettext("Main"),MM=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){var t=this;this.tabs=new Array,this.fieldsByTab={},this.fields.forEach(function(e){var n=void 0===e.gui.tab?AM:e.gui.tab;t.tabs.includes(n)||(t.tabs.push(n),t.fieldsByTab[n]=new Array),t.fieldsByTab[n].push(e)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-form"]],inputs:{fields:"fields"},outputs:{changed:"changed"},decls:3,vars:2,consts:[[3,"disableRipple",4,"ngIf","ngIfElse"],["onlyone",""],[3,"disableRipple"],[4,"ngFor","ngForOf"],["mat-tab-label",""],[1,"content"],[3,"field","changed",4,"ngFor","ngForOf"],[3,"field","changed"],[3,"field"]],template:function(t,e){if(1&t&&(us(0,kM,2,3,"mat-tab-group",0),us(1,CM,1,1,"ng-template",null,1,oc)),2&t){var n=cs(2);ds("ngIf",e.tabs.length>1)("ngIfElse",n)}},directives:[Lh,JA,Ph,GA,zA,_M],styles:[".content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap} .mat-form-field-wrapper{padding-bottom:1em} .mat-tab-label{height:32px!important}"]}),t}();function IM(t,e){if(1&t){var n=bs();ps(0,"button",10),Ss("click",function(){return rn(n),Ds().customButtonClicked()}),tl(1),gs()}if(2&t){var i=Ds();Oo(1),el(i.data.customButton)}}var TM,DM=function(){function t(t,e){this.dialogRef=t,this.data=e,this.onEvent=new Bu(!0),this.saving=!1}return t.prototype.ngOnInit=function(){this.onEvent.emit({type:"init",data:null,dialog:this.dialogRef})},t.prototype.changed=function(t){this.onEvent.emit({type:"changed",data:t,dialog:this.dialogRef})},t.prototype.getFields=function(){var t={},e=[];return this.data.guiFields.forEach(function(n){var i=void 0!==n.values?n.values:n.value;n.gui.required&&0!==i&&(!i||i instanceof Array&&0===i.length)&&e.push(n.gui.label),"number"==typeof i&&(i=i.toString()),t[n.name]=i}),{data:t,errors:e}},t.prototype.save=function(){var t=this.getFields();t.errors.length>0?this.data.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+t.errors.join(", ")):this.onEvent.emit({data:t.data,type:"save",dialog:this.dialogRef})},t.prototype.customButtonClicked=function(){var t=this.getFields();this.onEvent.emit({data:t.data,type:this.data.customButton,errors:t.errors,dialog:this.dialogRef})},t.\u0275fac=function(e){return new(e||t)(hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-modal-form"]],decls:17,vars:7,consts:[["mat-dialog-title","",3,"innerHtml"],["vc",""],["autocomplete","off"],[3,"fields","changed"],[1,"buttons"],[1,"group1"],["ngClass","custom","mat-raised-button","",3,"click",4,"ngIf"],[1,"group2"],["mat-raised-button","",3,"disabled","click"],["mat-raised-button","","color","primary",3,"disabled","click"],["ngClass","custom","mat-raised-button","",3,"click"]],template:function(t,e){1&t&&(ms(0,"h4",0),Ru(1,"safeHtml"),ps(2,"mat-dialog-content",null,1),ps(4,"form",2),ps(5,"uds-form",3),Ss("changed",function(t){return e.changed(t)}),gs(),gs(),gs(),ps(6,"mat-dialog-actions"),ps(7,"div",4),ps(8,"div",5),us(9,IM,2,1,"button",6),gs(),ps(10,"div",7),ps(11,"button",8),Ss("click",function(){return e.dialogRef.close()}),ps(12,"uds-translate"),tl(13,"Discard & close"),gs(),gs(),ps(14,"button",9),Ss("click",function(){return e.save()}),ps(15,"uds-translate"),tl(16,"Save"),gs(),gs(),gs(),gs(),gs()),2&t&&(ds("innerHtml",Lu(1,5,e.data.title),Dr),Oo(5),ds("fields",e.data.guiFields),Oo(4),ds("ngIf",null!=e.data.customButton),Oo(2),ds("disabled",e.saving),Oo(3),ds("disabled",e.saving))},directives:[SS,CS,nA,MC,QC,MM,AS,Lh,LS,VS,Eh],pipes:[zS],styles:["h4[_ngcontent-%COMP%]{margin-bottom:0}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%} uds-field{flex:1 100%}button.custom[_ngcontent-%COMP%]{background-color:#4682b4;color:#fff}"]}),t}(),EM=function(){function t(t){this.gui=t}return t.prototype.modalForm=function(t,e,n,i){void 0===n&&(n=null),e.sort(function(t,e){return t.gui.order>e.gui.order?1:-1});var r=null!=n;n=r?n:{},e.forEach(function(t){!1!==r&&void 0!==t.gui.rdonly||(t.gui.rdonly=!1),t.gui.type===WS.TEXT&&t.gui.multiline&&(t.gui.type=WS.TEXTBOX);var e=n[t.name];void 0!==e&&(e instanceof Array?(t.values=new Array,e.forEach(function(e){return t.values.push(e)})):t.value=e)});var o=window.innerWidth<800?"80%":"50%";return this.gui.dialog.open(DM,{position:{top:"64px"},width:o,data:{title:t,guiFields:e,customButton:i,gui:this.gui},disableClose:!0}).componentInstance.onEvent},t.prototype.typedForm=function(t,e,n,i,r,o,a){var s=this;a=a||{};var l=new Bu,u=n?django.gettext("Test"):void 0,c={},h={},d=function(e){h.hasOwnProperty(e.name)&&""!==e.value&&void 0!==e.value&&s.executeCallback(t,e,c)};return a.snack||(a.snack=this.gui.snackbar.open(django.gettext("Loading data..."),django.gettext("dismiss"))),t.table.rest.gui(o).subscribe(function(n){a.snack.dismiss(),void 0!==i&&i.forEach(function(t){n.push(t)}),n.forEach(function(t){c[t.name]=t,void 0!==t.gui.fills&&(h[t.name]=t.gui.fills)}),s.modalForm(e,n,r,u).subscribe(function(e){switch(e.data&&(e.data.data_type=o),e.type){case u:if(e.errors.length>0)return void s.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+e.errors.join(", "));s.gui.snackbar.open(django.gettext("Testing..."),django.gettext("dismiss")),t.table.rest.test(o,e.data).subscribe(function(t){"ok"!==t?s.gui.snackbar.open(django.gettext("Test failed:")+" "+t,django.gettext("dismiss")):s.gui.snackbar.open(django.gettext("Test passed successfully"),django.gettext("dismiss"),{duration:2e3})});break;case"changed":case"init":if(null===e.data)for(var i=0,h=n;i"+i.join(", ")+"";this.gui.yesno(e,o,!0).subscribe(function(e){if(e){var i=r.length,o=function(){n.gui.snackbar.open(django.gettext("Deletion finished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()};r.forEach(function(e){t.table.rest.delete(e).subscribe(function(t){0==--i&&o()},function(t){0==--i&&o()})})}})},t.prototype.executeCallback=function(t,e,n,i){var r=this;void 0===i&&(i={});var o=new Array;e.gui.fills.parameters.forEach(function(t){o.push(t+"="+encodeURIComponent(n[t].value))}),t.table.rest.callback(e.gui.fills.callbackName,o.join("&")).subscribe(function(e){var o=new Array;e.forEach(function(t){var e=n[t.name];void 0!==e&&(void 0!==e.gui.fills&&o.push(e),e.gui.values.length=0,t.values.forEach(function(t){return e.gui.values.push(t)}),e.value||(e.value=t.values.length>0?t.values[0].id:""))}),o.forEach(function(e){void 0===i[e.name]&&(i[e.name]=!0,r.executeCallback(t,e,n,i))})})},t}(),OM=function(){function t(t,e){this.dialog=t,this.snackbar=e,this.forms=new EM(this)}return t.prototype.alert=function(t,e,n,i){void 0===n&&(n=0);var r=i||(window.innerWidth<800?"80%":"40%");return this.dialog.open(US,{width:r,data:{title:t,body:e,autoclose:n,type:GS.alert},disableClose:!0}).componentInstance.yesno},t.prototype.yesno=function(t,e,n){void 0===n&&(n=!1);var i=window.innerWidth<800?"80%":"40%";return this.dialog.open(US,{width:i,data:{title:t,body:e,type:GS.yesno,warnOnYes:n},disableClose:!0}).componentInstance.yesno},t.prototype.icon=function(t,e){return void 0===e&&(e="24px"),''},t}(),PM=function(t){return t.NUMERIC="numeric",t.ALPHANUMERIC="alphanumeric",t.DATETIME="datetime",t.DATETIMESEC="datetimesec",t.DATE="date",t.TIME="time",t.ICON="iconType",t.CALLBACK="callback",t.DICTIONARY="dict",t.IMAGE="image",t}({}),RM=function(t){return t[t.ALWAYS=0]="ALWAYS",t[t.SINGLE_SELECT=1]="SINGLE_SELECT",t[t.MULTI_SELECT=2]="MULTI_SELECT",t[t.ONLY_MENU=3]="ONLY_MENU",t[t.ACCELERATOR=4]="ACCELERATOR",t}({}),LM="provider",NM="service",FM="pool",VM="user",zM="group",BM="transport",HM="osmanager",jM="calendar",GM="poolgroup",UM={provider:django.gettext("provider"),service:django.gettext("service"),pool:django.gettext("service pool"),authenticator:django.gettext("authenticator"),user:django.gettext("user"),group:django.gettext("group"),transport:django.gettext("transport"),osmanager:django.gettext("OS manager"),calendar:django.gettext("calendar"),poolgroup:django.gettext("pool group")},WM=function(){function t(t){this.router=t}return t.getGotoButton=function(t,e,n){return{id:t,html:'link'+django.gettext("Go to")+" "+UM[t]+"",type:RM.ACCELERATOR,acceleratorProperties:[e,n]}},t.prototype.gotoProvider=function(t){this.router.navigate(void 0!==t?["providers",t]:["providers"])},t.prototype.gotoService=function(t,e){this.router.navigate(void 0!==e?["providers",t,"detail",e]:["providers",t,"detail"])},t.prototype.gotoServicePool=function(t){this.router.navigate(["pools","service-pools",t])},t.prototype.gotoServicePoolDetail=function(t){this.router.navigate(["pools","service-pools",t,"detail"])},t.prototype.gotoMetapool=function(t){this.router.navigate(["pools","meta-pools",t])},t.prototype.gotoMetapoolDetail=function(t){this.router.navigate(["pools","meta-pools",t,"detail"])},t.prototype.gotoCalendar=function(t){this.router.navigate(["pools","calendars",t])},t.prototype.gotoCalendarDetail=function(t){this.router.navigate(["pools","calendars",t,"detail"])},t.prototype.gotoAccount=function(t){this.router.navigate(["pools","accounts",t])},t.prototype.gotoAccountDetail=function(t){this.router.navigate(["pools","accounts",t,"detail"])},t.prototype.gotoPoolGroup=function(t){this.router.navigate(["pools","pool-groups",t=t||""])},t.prototype.gotoAuthenticator=function(t){this.router.navigate(["authenticators",t])},t.prototype.gotoAuthenticatorDetail=function(t){this.router.navigate(["authenticators",t,"detail"])},t.prototype.gotoUser=function(t,e){this.router.navigate(["authenticators",t,"detail","users",e])},t.prototype.gotoGroup=function(t,e){this.router.navigate(["authenticators",t,"detail","groups",e])},t.prototype.gotoTransport=function(t){this.router.navigate(["transports",t])},t.prototype.gotoOSManager=function(t){this.router.navigate(["osmanagers",t])},t.prototype.goto=function(t,e,n){var i=function(t){var i=e;if(n[t].split(".").forEach(function(t){return i=i[t]}),!i)throw new Error("not going :)");return i};try{switch(t){case LM:this.gotoProvider(i(0));break;case NM:this.gotoService(i(0),i(1));break;case FM:this.gotoServicePool(i(0));break;case"authenticator":this.gotoAuthenticator(i(0));break;case VM:this.gotoUser(i(0),i(1));break;case zM:this.gotoGroup(i(0),i(1));break;case BM:this.gotoTransport(i(0));break;case HM:this.gotoOSManager(i(0));break;case jM:this.gotoCalendar(i(0));break;case GM:this.gotoPoolGroup(i(0))}}catch(r){}},t}(),YM=function(){function t(e){o(this,t),this.total=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new qM(t,this.total))}}]),t}(),qM=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return s(n,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),n}(R),XM=new Set,ZM=function(){var t=function(){function t(e){o(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):KM}return s(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!XM.has(t))try{TM||((TM=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(TM)),TM.sheet&&(TM.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),XM.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey))},token:t,providedIn:"root"}),t}();function KM(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var $M=function(){var t=function(){function t(e,n){o(this,t),this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new U}return s(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return QM(mv(t)).some(function(t){return e._registerQuery(t).mql.matches})}},{key:"observe",value:function(t){var e=this,n=kf(QM(mv(t)).map(function(t){return e._registerQuery(t).observable}));return(n=If(n.pipe(Nf(1)),n.pipe(function(t){return t.lift(new YM(1))},x_(0)))).pipe(q(function(t){var e={matches:!1,breakpoints:{}};return t.forEach(function(t){var n=t.matches,i=t.query;e.matches=e.matches||n,e.breakpoints[i]=n}),e}))}},{key:"_registerQuery",value:function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i={observable:new z(function(t){var i=function(n){return e._zone.run(function(){return t.next(n)})};return n.addListener(i),function(){n.removeListener(i)}}).pipe(zf(n),q(function(e){return{query:t,matches:e.matches}}),Uv(this._destroySubject)),mql:n};return this._queries.set(t,i),i}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ZM),zi(Mc))},t.\u0275prov=Ot({factory:function(){return new t(zi(ZM),zi(Mc))},token:t,providedIn:"root"}),t}();function QM(t){return t.map(function(t){return t.split(",")}).reduce(function(t,e){return t.concat(e)}).map(function(t){return t.trim()})}function JM(t,e){if(1&t){var n=bs();ps(0,"div",1),ps(1,"button",2),Ss("click",function(){return rn(n),Ds().action()}),tl(2),gs(),gs()}if(2&t){var i=Ds();Oo(2),el(i.data.action)}}function tI(t,e){}var eI=new wi("MatSnackBarData"),nI=function t(){o(this,t),this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},iI=Math.pow(2,31)-1,rI=function(){function t(e,n){var i=this;o(this,t),this._overlayRef=n,this._afterDismissed=new U,this._afterOpened=new U,this._onAction=new U,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe(function(){return i.dismiss()}),e._onExit.subscribe(function(){return i._finishDismiss()})}return s(t,[{key:"dismiss",value:function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}},{key:"dismissWithAction",value:function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete()),clearTimeout(this._durationTimeoutId)}},{key:"closeWithAction",value:function(){this.dismissWithAction()}},{key:"_dismissAfter",value:function(t){var e=this;this._durationTimeoutId=setTimeout(function(){return e.dismiss()},Math.min(t,iI))}},{key:"_open",value:function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}},{key:"_finishDismiss",value:function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}},{key:"afterDismissed",value:function(){return this._afterDismissed}},{key:"afterOpened",value:function(){return this.containerInstance._onEnter}},{key:"onAction",value:function(){return this._onAction}}]),t}(),oI=function(){var t=function(){function t(e,n){o(this,t),this.snackBarRef=e,this.data=n}return s(t,[{key:"action",value:function(){this.snackBarRef.dismissWithAction()}},{key:"hasAction",get:function(){return!!this.data.action}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(rI),hs(eI))},t.\u0275cmp=he({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(ps(0,"span"),tl(1),gs(),us(2,JM,3,1,"div",0)),2&t&&(Oo(1),el(e.data.message),Oo(1),ds("ngIf",e.hasAction))},directives:[Lh,LS],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t}(),aI={snackBarState:gb("state",[_b("void, hidden",yb({transform:"scale(0.8)",opacity:0})),_b("visible",yb({transform:"scale(1)",opacity:1})),wb("* => visible",mb("150ms cubic-bezier(0, 0, 0.2, 1)")),wb("* => void, * => hidden",mb("75ms cubic-bezier(0.4, 0.0, 1, 1)",yb({opacity:0})))])},sI=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s){var l;return o(this,n),(l=e.call(this))._ngZone=t,l._elementRef=i,l._changeDetectorRef=r,l._platform=a,l.snackBarConfig=s,l._announceDelay=150,l._destroyed=!1,l._onAnnounce=new U,l._onExit=new U,l._onEnter=new U,l._animationState="void",l.attachDomPortal=function(t){return l._assertNotAttached(),l._applySnackBarClasses(),l._portalOutlet.attachDomPortal(t)},l._live="assertive"!==s.politeness||s.announcementMessage?"off"===s.politeness?"off":"polite":"assertive",l._platform.FIREFOX&&("polite"===l._live&&(l._role="status"),"assertive"===l._live&&(l._role="alert")),l}return s(n,[{key:"attachComponentPortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}},{key:"onAnimationEnd",value:function(t){var e=t.toState;if(("void"===e&&"void"!==t.fromState||"hidden"===e)&&this._completeExit(),"visible"===e){var n=this._onEnter;this._ngZone.run(function(){n.next(),n.complete()})}}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}},{key:"exit",value:function(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}},{key:"ngOnDestroy",value:function(){this._destroyed=!0,this._completeExit()}},{key:"_completeExit",value:function(){var t=this;this._ngZone.onMicrotaskEmpty.pipe(Nf(1)).subscribe(function(){t._onExit.next(),t._onExit.complete()})}},{key:"_applySnackBarClasses",value:function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(function(e){return t.classList.add(e)}):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}},{key:"_assertNotAttached",value:function(){this._portalOutlet.hasAttached()}},{key:"_screenReaderAnnounce",value:function(){var t=this;this._announceTimeoutId||this._ngZone.runOutsideAngular(function(){t._announceTimeoutId=setTimeout(function(){var e=t._elementRef.nativeElement.querySelector("[aria-hidden]"),n=t._elementRef.nativeElement.querySelector("[aria-live]");if(e&&n){var i=null;t._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(i=document.activeElement),e.removeAttribute("aria-hidden"),n.appendChild(e),null==i||i.focus(),t._onAnnounce.next(),t._onAnnounce.complete()}},t._announceDelay)})}}]),n}(Sy);return t.\u0275fac=function(e){return new(e||t)(hs(Mc),hs(Tl),hs(eu),hs(ey),hs(nI))},t.\u0275cmp=he({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var n;1&t&&Ju(My,3),2&t&&Qu(n=ec())&&(e._portalOutlet=n.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&Cs("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&ol("@state",e._animationState)},features:[Xa],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(ps(0,"div",0),us(1,tI,0,0,"ng-template",1),gs(),ms(2,"div")),2&t&&(Oo(2),ss("aria-live",e._live)("role",e._role))},directives:[My],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[aI.snackBarState]}}),t}(),lI=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[w_,Iy,Kh,FS,gk],gk]}),t}(),uI=new wi("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new nI}}),cI=function(){var t=function(){function t(e,n,i,r,a,s){o(this,t),this._overlay=e,this._live=n,this._injector=i,this._breakpointObserver=r,this._parentSnackBar=a,this._defaultConfig=s,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=oI,this.snackBarContainerComponent=sI,this.handsetCssClass="mat-snack-bar-handset"}return s(t,[{key:"openFromComponent",value:function(t,e){return this._attach(t,e)}},{key:"openFromTemplate",value:function(t,e){return this._attach(t,e)}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=Object.assign(Object.assign({},this._defaultConfig),n);return i.data={message:t,action:e},i.announcementMessage===t&&(i.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,i)}},{key:"dismiss",value:function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}},{key:"ngOnDestroy",value:function(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}},{key:"_attachSnackBarContainer",value:function(t,e){var n=Ya.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:nI,useValue:e}]}),i=new wy(this.snackBarContainerComponent,e.viewContainerRef,n),r=t.attach(i);return r.instance.snackBarConfig=e,r.instance}},{key:"_attach",value:function(t,e){var n=this,i=Object.assign(Object.assign(Object.assign({},new nI),this._defaultConfig),e),r=this._createOverlay(i),o=this._attachSnackBarContainer(r,i),a=new rI(o,r);if(t instanceof lu){var s=new xy(t,null,{$implicit:i.data,snackBarRef:a});a.instance=o.attachTemplatePortal(s)}else{var l=this._createInjector(i,a),u=new wy(t,void 0,l),c=o.attachComponentPortal(u);a.instance=c.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Uv(r.detachments())).subscribe(function(t){var e=r.overlayElement.classList;t.matches?e.add(n.handsetCssClass):e.remove(n.handsetCssClass)}),i.announcementMessage&&o._onAnnounce.subscribe(function(){n._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(a,i),this._openedSnackBarRef=a,this._openedSnackBarRef}},{key:"_animateSnackBar",value:function(t,e){var n=this;t.afterDismissed().subscribe(function(){n._openedSnackBarRef==t&&(n._openedSnackBarRef=null),e.announcementMessage&&n._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(function(){t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(function(){return t._dismissAfter(e.duration)})}},{key:"_createOverlay",value:function(t){var e=new Zy;e.direction=t.direction;var n=this._overlay.position().global(),i="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!i||"end"===t.horizontalPosition&&i,o=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):o?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)}},{key:"_createInjector",value:function(t,e){return Ya.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:rI,useValue:e},{provide:eI,useValue:t.data}]})}},{key:"_openedSnackBarRef",get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(g_),zi($_),zi(Ya),zi($M),zi(t,12),zi(uI))},t.\u0275prov=Ot({factory:function(){return new t(zi(g_),zi($_),zi(Ta),zi($M),zi(t,12),zi(uI))},token:t,providedIn:lI}),t}(),hI=function(){function t(t,e,n,i,r,o){this.http=t,this.router=e,this.dialog=n,this.snackbar=i,this.sanitizer=r,this.dateAdapter=o,this.user=new dv(udsData.profile),this.navigation=new WM(this.router),this.gui=new OM(this.dialog,this.snackbar),this.dateAdapter.setLocale(this.config.language)}return Object.defineProperty(t.prototype,"config",{get:function(){return udsData.config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"notices",{get:function(){return udsData.errors},enumerable:!1,configurable:!0}),t.prototype.restPath=function(t){return this.config.urls.rest+t},t.prototype.staticURL=function(t){return this.config.urls.static+t},t.prototype.logout=function(){window.location.href=this.config.urls.logout},t.prototype.gotoUser=function(){window.location.href=this.config.urls.user},t.prototype.putOnStorage=function(t,e){void 0!==typeof Storage&&sessionStorage.setItem(t,e)},t.prototype.getFromStorage=function(t){return void 0!==typeof Storage?sessionStorage.getItem(t):null},t.prototype.safeString=function(t){return this.sanitizer.bypassSecurityTrustHtml(t)},t.prototype.yesno=function(t){return t?django.gettext("yes"):django.gettext("no")},t.\u0275prov=Ot({token:t,factory:t.\u0275fac=function(e){return new(e||t)(zi(ef),zi(Bm),zi(wS),zi(cI),zi(Id),zi(Sk))},providedIn:"root"}),t}(),dI=function(){function t(t){this.api=t}return t.prototype.canActivate=function(t,e){return!!this.api.user.isStaff||(window.location.href=this.api.config.urls.user,!1)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac=function(e){return new(e||t)(zi(hI))},providedIn:"root"}),t}(),fI=function(t,e){return(fI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function pI(t,e){function n(){this.constructor=t}fI(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function gI(t,e,n,i){return new(n||(n=Promise))(function(r,o){function a(t){try{l(i.next(t))}catch(e){o(e)}}function s(t){try{l(i.throw(t))}catch(e){o(e)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((i=i.apply(t,e||[])).next())})}var mI=function(t){return t[t.NONE=0]="NONE",t[t.READ=32]="READ",t[t.MANAGEMENT=64]="MANAGEMENT",t[t.ALL=96]="ALL",t}({}),vI=function(){function t(t,e,n){this.api=t,void 0===n&&(n={}),void 0===n.base&&(n.base=e);var i=function(t,e){return void 0===t?e:t};this.id=e,this.paths={base:n.base,get:i(n.get,n.base),log:i(n.log,n.base),put:i(n.put,n.base),test:i(n.test,n.base+"/test"),delete:i(n.delete,n.base),types:i(n.types,n.base+"/types"),gui:i(n.gui,n.base+"/gui"),tableInfo:i(n.tableInfo,n.base+"/tableinfo")},this.headers=(new Bd).set("Content-Type","application/json; charset=utf8").set(this.api.config.auth_header,this.api.config.auth_token)}return t.prototype.get=function(t){return this.doGet(this.getPath(this.paths.get,t))},t.prototype.getLogs=function(t){return this.doGet(this.getPath(this.paths.log,t)+"/log")},t.prototype.overview=function(t){return this.get("overview"+(void 0!==t?"?filter="+t:""))},t.prototype.summary=function(t){return this.get("overview?summarize"+(void 0!==t?"&filter="+t:""))},t.prototype.put=function(t,e){var n=this;return this.api.http.put(this.getPath(this.paths.put,e),t,{headers:this.headers}).pipe(Gf(function(t){return n.handleError(t,!0)}))},t.prototype.create=function(t){return this.put(t)},t.prototype.save=function(t,e){return this.put(t,e=void 0!==e?e:t.id)},t.prototype.test=function(t,e){var n=this;return this.api.http.post(this.getPath(this.paths.test,t),e,{headers:this.headers}).pipe(Gf(function(t){return n.handleError(t)}))},t.prototype.delete=function(t){var e=this;return this.api.http.delete(this.getPath(this.paths.delete,t),{headers:this.headers}).pipe(Gf(function(t){return e.handleError(t)}))},t.prototype.permision=function(){return this.api.user.isAdmin?mI.ALL:mI.NONE},t.prototype.getPermissions=function(t){return this.doGet(this.getPath("permissions/"+this.paths.base+"/"+t))},t.prototype.addPermission=function(t,e,n,i){var r=this,o=this.getPath("permissions/"+this.paths.base+"/"+t+"/"+e+"/add/"+n);return this.api.http.put(o,{perm:i},{headers:this.headers}).pipe(Gf(function(t){return r.handleError(t)}))},t.prototype.revokePermission=function(t){var e=this,n=this.getPath("permissions/revoke");return this.api.http.put(n,{items:t},{headers:this.headers}).pipe(Gf(function(t){return e.handleError(t)}))},t.prototype.types=function(){return this.doGet(this.getPath(this.paths.types))},t.prototype.gui=function(t){var e=this.getPath(this.paths.gui+(void 0!==t?"/"+t:""));return this.doGet(e)},t.prototype.callback=function(t,e){var n=this.getPath("gui/callback/"+t+"?"+e);return this.doGet(n)},t.prototype.tableInfo=function(){return this.doGet(this.getPath(this.paths.tableInfo))},t.prototype.detail=function(t,e){return new yI(this,t,e)},t.prototype.invoke=function(t,e){var n=t;return e&&(n=n+"?"+e),this.get(n)},t.prototype.getPath=function(t,e){return this.api.restPath(t+(void 0!==e?"/"+e:""))},t.prototype.doGet=function(t){var e=this;return this.api.http.get(t,{headers:this.headers}).pipe(Gf(function(t){return e.handleError(t)}))},t.prototype.handleError=function(t,e){var n;return void 0===e&&(e=!1),n=t.error instanceof ErrorEvent?t.error.message:e?django.gettext("Error saving: ")+t.error:"Error "+t.status+": "+t.error,this.api.gui.alert(e?django.gettext("Error saving element"):django.gettext("Error handling your request"),n),qv(n)},t}(),yI=function(t){function e(e,n,i,r){var o=t.call(this,e.api,[e.paths.base,n,i].join("/"))||this;return o.parentModel=e,o.parentId=n,o.model=i,o.perm=r,o}return pI(e,t),e.prototype.permision=function(){return this.perm||mI.ALL},e}(vI),_I=function(t){function e(e){var n=t.call(this,e,"providers")||this;return n.api=e,n}return pI(e,t),e.prototype.allServices=function(){return this.get("allservices")},e.prototype.service=function(t){return this.get("service/"+t)},e.prototype.maintenance=function(t){return this.get(t+"/maintenance")},e}(vI),bI=function(t){function e(e){var n=t.call(this,e,"authenticators")||this;return n.api=e,n}return pI(e,t),e.prototype.search=function(t,e,n,i){return void 0===i&&(i=12),this.get(t+"/search?type="+encodeURIComponent(e)+"&term="+encodeURIComponent(n)+"&limit="+i)},e}(vI),wI=function(t){function e(e){var n=t.call(this,e,"osmanagers")||this;return n.api=e,n}return pI(e,t),e}(vI),xI=function(t){function e(e){var n=t.call(this,e,"transports")||this;return n.api=e,n}return pI(e,t),e}(vI),kI=function(t){function e(e){var n=t.call(this,e,"networks")||this;return n.api=e,n}return pI(e,t),e}(vI),SI=function(t){function e(e){var n=t.call(this,e,"servicespools")||this;return n.api=e,n}return pI(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e.prototype.actionsList=function(t){return this.get(t+"/actionsList")},e.prototype.listAssignables=function(t){return this.get(t+"/listAssignables")},e.prototype.createFromAssignable=function(t,e,n){return this.get(t+"/createFromAssignable?user_id="+encodeURIComponent(e)+"&assignable_id="+encodeURIComponent(n))},e}(vI),CI=function(t){function e(e){var n=t.call(this,e,"metapools")||this;return n.api=e,n}return pI(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e}(vI),AI=function(t){function e(e){var n=t.call(this,e,"config")||this;return n.api=e,n}return pI(e,t),e}(vI),MI=function(t){function e(e){var n=t.call(this,e,"gallery/images")||this;return n.api=e,n}return pI(e,t),e}(vI),II=function(t){function e(e){var n=t.call(this,e,"gallery/servicespoolgroups")||this;return n.api=e,n}return pI(e,t),e}(vI),TI=function(t){function e(e){var n=t.call(this,e,"system")||this;return n.api=e,n}return pI(e,t),e.prototype.information=function(){return this.get("overview")},e.prototype.stats=function(t,e){var n="stats/"+t;return e&&(n+="/"+e),this.get(n)},e.prototype.flushCache=function(){return this.doGet(this.getPath("cache","flush"))},e}(vI),DI=function(t){function e(e){var n=t.call(this,e,"reports")||this;return n.api=e,n}return pI(e,t),e.prototype.types=function(){return Pd([])},e}(vI),EI=function(t){function e(e){var n=t.call(this,e,"calendars")||this;return n.api=e,n}return pI(e,t),e}(vI),OI=function(t){function e(e){var n=t.call(this,e,"accounts")||this;return n.api=e,n}return pI(e,t),e.prototype.timemark=function(t){return this.get(t+"/timemark")},e}(vI),PI=function(t){function e(e){var n=t.call(this,e,"proxies")||this;return n.api=e,n}return pI(e,t),e}(vI),RI=function(t){function e(e){var n=t.call(this,e,"actortokens")||this;return n.api=e,n}return pI(e,t),e}(vI),LI=function(){function t(t){this.api=t,this.providers=new _I(t),this.authenticators=new bI(t),this.osManagers=new wI(t),this.transports=new xI(t),this.networks=new kI(t),this.servicesPools=new SI(t),this.metaPools=new CI(t),this.gallery=new MI(t),this.servicesPoolGroups=new II(t),this.calendars=new EI(t),this.accounts=new OI(t),this.proxy=new PI(t),this.system=new TI(t),this.configuration=new AI(t),this.actorToken=new RI(t),this.reports=new DI(t)}return t.\u0275prov=Ot({token:t,factory:t.\u0275fac=function(e){return new(e||t)(zi(hI))},providedIn:"root"}),t}(),NI=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")],FI=[django.gettext("January"),django.gettext("February"),django.gettext("March"),django.gettext("April"),django.gettext("May"),django.gettext("June"),django.gettext("July"),django.gettext("August"),django.gettext("September"),django.gettext("October"),django.gettext("November"),django.gettext("December")],VI=function(t){var e=[];return t.forEach(function(t){e.push(t.substr(0,3))}),e},zI=function(t,e,n){return BI(t,e,n)},BI=function(t,e,n,i){i=i||{},e=e||new Date,(n=n||ZI).formats=n.formats||{};var r=e.getTime();return(i.utc||"number"==typeof i.timezone)&&(e=HI(e)),"number"==typeof i.timezone&&(e=new Date(e.getTime()+6e4*i.timezone)),t.replace(/%([-_0]?.)/g,function(t,o){var a,s,l,u,c,h,d,f;if(l=null,c=null,2===o.length){if("-"===(l=o[0]))c="";else if("_"===l)c=" ";else{if("0"!==l)return t;c="0"}o=o[1]}switch(o){case"A":return n.days[e.getDay()];case"a":return n.shortDays[e.getDay()];case"B":return n.months[e.getMonth()];case"b":return n.shortMonths[e.getMonth()];case"C":return jI(Math.floor(e.getFullYear()/100),c);case"D":return BI(n.formats.D||"%m/%d/%y",e,n);case"d":return jI(e.getDate(),c);case"e":return e.getDate();case"F":return BI(n.formats.F||"%Y-%m-%d",e,n);case"H":return jI(e.getHours(),c);case"h":return n.shortMonths[e.getMonth()];case"I":return jI(GI(e),c);case"j":return d=new Date(e.getFullYear(),0,1),a=Math.ceil((e.getTime()-d.getTime())/864e5),jI(a,3);case"k":return jI(e.getHours(),void 0===c?" ":c);case"L":return jI(Math.floor(r%1e3),3);case"l":return jI(GI(e),void 0===c?" ":c);case"M":return jI(e.getMinutes(),c);case"m":return jI(e.getMonth()+1,c);case"n":return"\n";case"o":return String(e.getDate())+UI(e.getDate());case"P":case"p":return"";case"R":return BI(n.formats.R||"%H:%M",e,n);case"r":return BI(n.formats.r||"%I:%M:%S %p",e,n);case"S":return jI(e.getSeconds(),c);case"s":return Math.floor(r/1e3);case"T":return BI(n.formats.T||"%H:%M:%S",e,n);case"t":return"\t";case"U":return jI(WI(e,"sunday"),c);case"u":return 0===(s=e.getDay())?7:s;case"v":return BI(n.formats.v||"%e-%b-%Y",e,n);case"W":return jI(WI(e,"monday"),c);case"w":return e.getDay();case"Y":return e.getFullYear();case"y":return(f=String(e.getFullYear())).slice(f.length-2);case"Z":return i.utc?"GMT":(h=e.toString().match(/\((\w+)\)/))&&h[1]||"";case"z":return i.utc?"+0000":((u="number"==typeof i.timezone?i.timezone:-e.getTimezoneOffset())<0?"-":"+")+jI(Math.abs(u/60))+jI(u%60);default:return o}})},HI=function(t){var e=6e4*(t.getTimezoneOffset()||0);return new Date(t.getTime()+e)},jI=function(t,e,n){"number"==typeof e&&(n=e,e="0"),e=null==e?"0":e,n=null==n?2:n;var i=String(t);if(e)for(;i.length12&&(e-=12),e},UI=function(t){var e=t%10,n=t%100;if(n>=11&&n<=13||0===e||e>=4)return"th";switch(e){case 1:return"st";case 2:return"nd";case 3:return"rd"}},WI=function(t,e){e=e||"sunday";var n=t.getDay();"monday"===e&&(0===n?n=6:n--);var i=new Date(t.getFullYear(),0,1),r=Math.floor((t.getTime()-i.getTime())/864e5);return Math.floor((r+7-n)/7)},YI=function(t){return t.replace(/./g,function(t){switch(t){case"a":case"A":return"%p";case"b":case"d":case"m":case"w":case"W":case"y":case"Y":return"%"+t;case"c":return"%FT%TZ";case"D":return"%a";case"e":return"%z";case"f":return"%I:%M";case"F":return"%F";case"h":case"g":return"%I";case"H":case"G":return"%H";case"i":return"%M";case"I":return"";case"j":return"%d";case"l":return"%A";case"L":return"";case"M":return"%b";case"n":return"%m";case"N":return"%b";case"o":return"%W";case"O":return"%z";case"P":return"%R %p";case"r":return"%a, %d %b %Y %T %z";case"s":return"%S";case"S":case"t":return"";case"T":return"%Z";case"u":return"0";case"U":return"";case"z":return"%j";case"Z":return"z";default:return t}})},qI=function(t,e,n){var i;if(void 0===n&&(n=null),"None"===e||null==e)e=7226578800,i=django.gettext("Never");else{var r=django.get_format(t);n&&(r+=n),i=zI(YI(r),new Date(1e3*e))}return i},XI=function(t){return"yes"===t||!0===t||"true"===t||1===t},ZI={days:NI,shortDays:VI(NI),months:FI,shortMonths:VI(FI),AM:"AM",PM:"PM",am:"am",pm:"pm"},KI=n("o0o1"),$I=n.n(KI),QI=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,i){return t[0]===e&&(n=i,!0)}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n0},t.prototype.connect_=function(){JI&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),iT?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){JI&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;nT.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),oT=function(t,e){for(var n=0,i=Object.keys(e);n0},t}(),gT="undefined"!=typeof WeakMap?new WeakMap:new QI,mT=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=rT.getInstance(),i=new pT(e,n,this);gT.set(this,i)};["observe","unobserve","disconnect"].forEach(function(t){mT.prototype[t]=function(){var e;return(e=gT.get(this))[t].apply(e,arguments)}});var vT=void 0!==tT.ResizeObserver?tT.ResizeObserver:mT,yT=function(){function t(e){o(this,t),this.changes=e}return s(t,[{key:"notEmpty",value:function(t){if(this.changes[t]){var e=this.changes[t].currentValue;if(null!=e)return Pd(e)}return Tf}},{key:"has",value:function(t){return this.changes[t]?Pd(this.changes[t].currentValue):Tf}},{key:"notFirst",value:function(t){return this.changes[t]&&!this.changes[t].isFirstChange()?Pd(this.changes[t].currentValue):Tf}},{key:"notFirstAndEmpty",value:function(t){if(this.changes[t]&&!this.changes[t].isFirstChange()){var e=this.changes[t].currentValue;if(null!=e)return Pd(e)}return Tf}}],[{key:"of",value:function(e){return new t(e)}}]),t}(),_T=new wi("NGX_ECHARTS_CONFIG"),bT=function(){var t=function(){function t(e,n,i){o(this,t),this.el=n,this.ngZone=i,this.autoResize=!0,this.loadingType="default",this.chartInit=new Bu,this.optionsError=new Bu,this.chartClick=this.createLazyEvent("click"),this.chartDblClick=this.createLazyEvent("dblclick"),this.chartMouseDown=this.createLazyEvent("mousedown"),this.chartMouseMove=this.createLazyEvent("mousemove"),this.chartMouseUp=this.createLazyEvent("mouseup"),this.chartMouseOver=this.createLazyEvent("mouseover"),this.chartMouseOut=this.createLazyEvent("mouseout"),this.chartGlobalOut=this.createLazyEvent("globalout"),this.chartContextMenu=this.createLazyEvent("contextmenu"),this.chartLegendSelectChanged=this.createLazyEvent("legendselectchanged"),this.chartLegendSelected=this.createLazyEvent("legendselected"),this.chartLegendUnselected=this.createLazyEvent("legendunselected"),this.chartLegendScroll=this.createLazyEvent("legendscroll"),this.chartDataZoom=this.createLazyEvent("datazoom"),this.chartDataRangeSelected=this.createLazyEvent("datarangeselected"),this.chartTimelineChanged=this.createLazyEvent("timelinechanged"),this.chartTimelinePlayChanged=this.createLazyEvent("timelineplaychanged"),this.chartRestore=this.createLazyEvent("restore"),this.chartDataViewChanged=this.createLazyEvent("dataviewchanged"),this.chartMagicTypeChanged=this.createLazyEvent("magictypechanged"),this.chartPieSelectChanged=this.createLazyEvent("pieselectchanged"),this.chartPieSelected=this.createLazyEvent("pieselected"),this.chartPieUnselected=this.createLazyEvent("pieunselected"),this.chartMapSelectChanged=this.createLazyEvent("mapselectchanged"),this.chartMapSelected=this.createLazyEvent("mapselected"),this.chartMapUnselected=this.createLazyEvent("mapunselected"),this.chartAxisAreaSelected=this.createLazyEvent("axisareaselected"),this.chartFocusNodeAdjacency=this.createLazyEvent("focusnodeadjacency"),this.chartUnfocusNodeAdjacency=this.createLazyEvent("unfocusnodeadjacency"),this.chartBrush=this.createLazyEvent("brush"),this.chartBrushEnd=this.createLazyEvent("brushend"),this.chartBrushSelected=this.createLazyEvent("brushselected"),this.chartRendered=this.createLazyEvent("rendered"),this.chartFinished=this.createLazyEvent("finished"),this.animationFrameID=null,this.echarts=e.echarts}return s(t,[{key:"ngOnChanges",value:function(t){var e=this,n=yT.of(t);n.notFirstAndEmpty("options").subscribe(function(t){return e.onOptionsChange(t)}),n.notFirstAndEmpty("merge").subscribe(function(t){return e.setOption(t)}),n.has("loading").subscribe(function(t){return e.toggleLoading(!!t)}),n.notFirst("theme").subscribe(function(){return e.refreshChart()})}},{key:"ngOnInit",value:function(){var t=this;this.autoResize&&(this.resizeSub=new vT(function(){t.animationFrameID=window.requestAnimationFrame(function(){return t.resize()})}),this.resizeSub.observe(this.el.nativeElement))}},{key:"ngOnDestroy",value:function(){this.resizeSub&&(this.resizeSub.unobserve(this.el.nativeElement),window.cancelAnimationFrame(this.animationFrameID)),this.dispose()}},{key:"ngAfterViewInit",value:function(){var t=this;setTimeout(function(){return t.initChart()})}},{key:"dispose",value:function(){this.chart&&(this.chart.isDisposed()||this.chart.dispose(),this.chart=null)}},{key:"resize",value:function(){this.chart&&this.chart.resize()}},{key:"toggleLoading",value:function(t){this.chart&&(t?this.chart.showLoading(this.loadingType,this.loadingOpts):this.chart.hideLoading())}},{key:"setOption",value:function(t,e){if(this.chart)try{this.chart.setOption(t,e)}catch(n){console.error(n),this.optionsError.emit(n)}}},{key:"refreshChart",value:function(){return gI(this,void 0,void 0,$I.a.mark(function t(){return $I.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.dispose(),t.next=3,this.initChart();case 3:case"end":return t.stop()}},t,this)}))}},{key:"createChart",value:function(){var t=this,e=this.el.nativeElement;if(window&&window.getComputedStyle){var n=window.getComputedStyle(e,null).getPropertyValue("height");n&&"0px"!==n||e.style.height&&"0px"!==e.style.height||(e.style.height="400px")}return this.ngZone.runOutsideAngular(function(){return("function"==typeof t.echarts?t.echarts:function(){return Promise.resolve(t.echarts)})().then(function(n){return(0,n.init)(e,t.theme,t.initOpts)})})}},{key:"initChart",value:function(){return gI(this,void 0,void 0,$I.a.mark(function t(){return $I.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.onOptionsChange(this.options);case 2:this.merge&&this.chart&&this.setOption(this.merge);case 3:case"end":return t.stop()}},t,this)}))}},{key:"onOptionsChange",value:function(t){return gI(this,void 0,void 0,$I.a.mark(function e(){return $I.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(!this.chart){e.next=6;break}this.setOption(this.options,!0),e.next=11;break;case 6:return e.next=8,this.createChart();case 8:this.chart=e.sent,this.chartInit.emit(this.chart),this.setOption(this.options,!0);case 11:case"end":return e.stop()}},e,this)}))}},{key:"createLazyEvent",value:function(t){var e=this;return this.chartInit.pipe(Of(function(n){return new z(function(i){return n.on(t,function(t){return e.ngZone.run(function(){return i.next(t)})}),function(){e.chart&&(e.chart.isDisposed()||n.off(t))}})}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(_T),hs(Tl),hs(Mc))},t.\u0275dir=ve({type:t,selectors:[["echarts"],["","echarts",""]],inputs:{autoResize:"autoResize",loadingType:"loadingType",options:"options",theme:"theme",loading:"loading",initOpts:"initOpts",merge:"merge",loadingOpts:"loadingOpts"},outputs:{chartInit:"chartInit",optionsError:"optionsError",chartClick:"chartClick",chartDblClick:"chartDblClick",chartMouseDown:"chartMouseDown",chartMouseMove:"chartMouseMove",chartMouseUp:"chartMouseUp",chartMouseOver:"chartMouseOver",chartMouseOut:"chartMouseOut",chartGlobalOut:"chartGlobalOut",chartContextMenu:"chartContextMenu",chartLegendSelectChanged:"chartLegendSelectChanged",chartLegendSelected:"chartLegendSelected",chartLegendUnselected:"chartLegendUnselected",chartLegendScroll:"chartLegendScroll",chartDataZoom:"chartDataZoom",chartDataRangeSelected:"chartDataRangeSelected",chartTimelineChanged:"chartTimelineChanged",chartTimelinePlayChanged:"chartTimelinePlayChanged",chartRestore:"chartRestore",chartDataViewChanged:"chartDataViewChanged",chartMagicTypeChanged:"chartMagicTypeChanged",chartPieSelectChanged:"chartPieSelectChanged",chartPieSelected:"chartPieSelected",chartPieUnselected:"chartPieUnselected",chartMapSelectChanged:"chartMapSelectChanged",chartMapSelected:"chartMapSelected",chartMapUnselected:"chartMapUnselected",chartAxisAreaSelected:"chartAxisAreaSelected",chartFocusNodeAdjacency:"chartFocusNodeAdjacency",chartUnfocusNodeAdjacency:"chartUnfocusNodeAdjacency",chartBrush:"chartBrush",chartBrushEnd:"chartBrushEnd",chartBrushSelected:"chartBrushSelected",chartRendered:"chartRendered",chartFinished:"chartFinished"},exportAs:["echarts"],features:[Ee]}),t}(),wT=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"forRoot",value:function(e){return{ngModule:t,providers:[{provide:_T,useValue:e}]}}},{key:"forChild",value:function(){return{ngModule:t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[]]}),t}();function xT(t,e){if(1&t&&(ps(0,"div",21),ps(1,"div",11),ms(2,"img",3),ps(3,"div",12),tl(4),gs(),gs(),ps(5,"div",13),ps(6,"a",15),ps(7,"uds-translate"),tl(8,"View service pools"),gs(),gs(),gs(),gs()),2&t){var n=Ds(2);Oo(2),ds("src",n.api.staticURL("admin/img/icons/logs.png"),Er),Oo(2),nl(" ",n.data.restrained," ")}}function kT(t,e){if(1&t){var n=bs();ps(0,"div"),ps(1,"div",8),ps(2,"div",9),ps(3,"div",10),ps(4,"div",11),ms(5,"img",3),ps(6,"div",12),tl(7),gs(),gs(),ps(8,"div",13),ps(9,"a",14),ps(10,"uds-translate"),tl(11,"View authenticators"),gs(),gs(),gs(),gs(),ps(12,"div",10),ps(13,"div",11),ms(14,"img",3),ps(15,"div",12),tl(16),gs(),gs(),ps(17,"div",13),ps(18,"a",15),ps(19,"uds-translate"),tl(20,"View service pools"),gs(),gs(),gs(),gs(),ps(21,"div",10),ps(22,"div",11),ms(23,"img",3),ps(24,"div",12),tl(25),gs(),gs(),ps(26,"div",13),ps(27,"a",15),ps(28,"uds-translate"),tl(29,"View service pools"),gs(),gs(),gs(),gs(),us(30,xT,9,2,"div",16),gs(),ps(31,"div",17),ps(32,"div",18),ps(33,"div",19),ps(34,"uds-translate"),tl(35,"Assigned services chart"),gs(),gs(),ps(36,"div",20),Ss("chartInit",function(t){return rn(n),Ds().chartInit("assigned",t)}),gs(),gs(),ps(37,"div",18),ps(38,"div",19),ps(39,"uds-translate"),tl(40,"In use services chart"),gs(),gs(),ps(41,"div",20),Ss("chartInit",function(t){return rn(n),Ds().chartInit("inuse",t)}),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(5),ds("src",i.api.staticURL("admin/img/icons/authenticators.png"),Er),Oo(2),nl(" ",i.data.users," "),Oo(7),ds("src",i.api.staticURL("admin/img/icons/pools.png"),Er),Oo(2),nl(" ",i.data.pools," "),Oo(7),ds("src",i.api.staticURL("admin/img/icons/services.png"),Er),Oo(2),nl(" ",i.data.user_services," "),Oo(5),ds("ngIf",i.data.restrained),Oo(6),ds("options",i.assignedChartOpts),Oo(5),ds("options",i.inuseChartOpts)}}function ST(t,e){1&t&&(ps(0,"div",22),ps(1,"div",23),ps(2,"div",24),ps(3,"uds-translate"),tl(4,"UDS Administration"),gs(),gs(),ps(5,"div",25),ps(6,"p"),ps(7,"uds-translate"),tl(8,"You are accessing UDS Administration as staff member."),gs(),gs(),ps(9,"p"),ps(10,"uds-translate"),tl(11,"This means that you have restricted access to elements."),gs(),gs(),ps(12,"p"),ps(13,"uds-translate"),tl(14,"In order to increase your access privileges, please contact your local UDS administrator. "),gs(),gs(),ms(15,"br"),ps(16,"p"),ps(17,"uds-translate"),tl(18,"Thank you."),gs(),gs(),gs(),gs(),gs())}var CT=function(){function t(t,e){this.api=t,this.rest=e,this.data={},this.assignedChartInstance=null,this.assignedChartOpts={},this.inuseChartOpts={},this.inuseChartInstance=null}return t.prototype.onResize=function(t){this.assignedChartInstance&&this.assignedChartInstance.resize(),this.inuseChartInstance&&this.inuseChartInstance.resize()},t.prototype.ngOnInit=function(){var t=this;this.api.user.isAdmin&&this.rest.system.information().subscribe(function(e){t.data={users:django.gettext("#USR_NUMBER# users, #GRP_NUMBER# groups").replace("#USR_NUMBER#",e.users).replace("#GRP_NUMBER#",e.groups),pools:django.gettext("#POOLS_NUMBER# service pools").replace("#POOLS_NUMBER#",e.service_pools),user_services:django.gettext("#SERVICES_NUMBER# user services").replace("#SERVICES_NUMBER#",e.user_services)},e.restrained_services_pools>0&&(t.data.restrained=django.gettext("#RESTRAINED_NUMBER# restrained services!").replace("#RESTRAINED_NUMBER#",e.restrained_services_pools))});for(var e=function(e){n.rest.system.stats(e).subscribe(function(n){var i={tooltip:{trigger:"axis"},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},restore:{},saveAsImage:{}}},xAxis:{type:"category",data:n.map(function(t){return qI("SHORT_DATE_FORMAT",new Date(t.stamp))}),boundaryGap:!1},yAxis:{type:"value",boundaryGap:!1},series:[{name:"assigned"===e?django.gettext("Assigned services"):django.gettext("Services in use"),type:"line",smooth:!0,areaStyle:{},data:n.map(function(t){return t.value})}]};"assigned"===e?t.assignedChartOpts=i:t.inuseChartOpts=i})},n=this,i=0,r=["assigned","inuse"];i enter",[yb({opacity:0,transform:"translateY(-5px)"}),mb("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},WT=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t}),t}(),YT=new wi("MatHint"),qT=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-label"]]}),t}(),XT=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-placeholder"]]}),t}(),ZT=new wi("MatPrefix"),KT=new wi("MatSuffix"),$T=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","matSuffix",""]],features:[wl([{provide:KT,useExisting:t}])]}),t}(),QT=0,JT=vk(function t(e){o(this,t),this._elementRef=e},"primary"),tD=new wi("MAT_FORM_FIELD_DEFAULT_OPTIONS"),eD=new wi("MatFormField"),nD=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c){var h;return o(this,n),(h=e.call(this,t))._elementRef=t,h._changeDetectorRef=i,h._dir=a,h._defaults=s,h._platform=l,h._ngZone=u,h._outlineGapCalculationNeededImmediately=!1,h._outlineGapCalculationNeededOnStable=!1,h._destroyed=new U,h._showAlwaysAnimate=!1,h._subscriptAnimationState="",h._hintLabel="",h._hintLabelId="mat-hint-".concat(QT++),h._labelId="mat-form-field-label-".concat(QT++),h.floatLabel=h._getDefaultFloatLabelState(),h._animationsEnabled="NoopAnimations"!==c,h.appearance=s&&s.appearance?s.appearance:"legacy",h._hideRequiredMarker=!(!s||null==s.hideRequiredMarker)&&s.hideRequiredMarker,h}return s(n,[{key:"_shouldAlwaysFloat",value:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",value:function(){return"never"!==this.floatLabel}},{key:"getLabelId",value:function(){return this._hasFloatingLabel()?this._labelId:null}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var t=this;this._validateControlChild();var e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-".concat(e.controlType)),e.stateChanges.pipe(zf(null)).subscribe(function(){t._validatePlaceholders(),t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(Uv(this._destroyed)).subscribe(function(){return t._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.pipe(Uv(t._destroyed)).subscribe(function(){t._outlineGapCalculationNeededOnStable&&t.updateOutlineGap()})}),dt(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(function(){t._outlineGapCalculationNeededOnStable=!0,t._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(zf(null)).subscribe(function(){t._processHints(),t._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(zf(null)).subscribe(function(){t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Uv(this._destroyed)).subscribe(function(){"function"==typeof requestAnimationFrame?t._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return t.updateOutlineGap()})}):t.updateOutlineGap()})}},{key:"ngAfterContentChecked",value:function(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}},{key:"ngAfterViewInit",value:function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_shouldForward",value:function(t){var e=this._control?this._control.ngControl:null;return e&&e[t]}},{key:"_hasPlaceholder",value:function(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}},{key:"_hasLabel",value:function(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}},{key:"_shouldLabelFloat",value:function(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}},{key:"_hideControlPlaceholder",value:function(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}},{key:"_hasFloatingLabel",value:function(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}},{key:"_getDisplayedMessages",value:function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}},{key:"_animateAndLockLabel",value:function(){var t=this;this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,bv(this._label.nativeElement,"transitionend").pipe(Nf(1)).subscribe(function(){t._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}},{key:"_validatePlaceholders",value:function(){}},{key:"_processHints",value:function(){this._validateHints(),this._syncDescribedByIds()}},{key:"_validateHints",value:function(){}},{key:"_getDefaultFloatLabelState",value:function(){return this._defaults&&this._defaults.floatLabel||"auto"}},{key:"_syncDescribedByIds",value:function(){if(this._control){var t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push.apply(t,b(this._control.userAriaDescribedBy.split(" "))),"hint"===this._getDisplayedMessages()){var e=this._hintChildren?this._hintChildren.find(function(t){return"start"===t.align}):null,n=this._hintChildren?this._hintChildren.find(function(t){return"end"===t.align}):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&t.push.apply(t,b(this._errorChildren.map(function(t){return t.id})));this._control.setDescribedByIds(t)}}},{key:"_validateControlChild",value:function(){}},{key:"updateOutlineGap",value:function(){var t=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&t&&t.children.length&&t.textContent.trim()&&this._platform.isBrowser)if(this._isAttachedToDOM()){var e=0,n=0,i=this._connectionContainerRef.nativeElement,r=i.querySelectorAll(".mat-form-field-outline-start"),o=i.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var a=i.getBoundingClientRect();if(0===a.width&&0===a.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);for(var s=this._getStartEnd(a),l=t.children,u=this._getStartEnd(l[0].getBoundingClientRect()),c=0,h=0;h0?.75*c+10:0}for(var d=0;d void",kb("@transformPanel",[xb()],{optional:!0}))]),transformPanel:gb("transformPanel",[_b("void",yb({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),_b("showing",yb({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),_b("showing-multiple",yb({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),wb("void => *",mb("120ms cubic-bezier(0, 0, 0.2, 1)")),wb("* => void",mb("100ms 25ms linear",yb({opacity:0})))])},pD=0,gD=256,mD=new wi("mat-select-scroll-strategy"),vD=new wi("MAT_SELECT_CONFIG"),yD={provide:mD,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},_D=function t(e,n){o(this,t),this.source=e,this.value=n},bD=yk(_k(mk(bk(function t(e,n,i,r,a){o(this,t),this._elementRef=e,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=r,this.ngControl=a})))),wD=new wi("MatSelectTrigger"),xD=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-select-trigger"]],features:[wl([{provide:wD,useExisting:t}])]}),t}(),kD=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c,h,f,p,g,m,v){var y,_,w,x;return o(this,n),(y=e.call(this,s,a,u,c,f))._viewportRuler=t,y._changeDetectorRef=i,y._ngZone=r,y._dir=l,y._parentFormField=h,y.ngControl=f,y._liveAnnouncer=m,y._defaultOptions=v,y._panelOpen=!1,y._compareWith=function(t,e){return t===e},y._uid="mat-select-".concat(pD++),y._triggerAriaLabelledBy=null,y._destroy=new U,y._onChange=function(){},y._onTouched=function(){},y._valueId="mat-select-value-".concat(pD++),y._panelDoneAnimatingStream=new U,y._overlayPanelClass=(null===(_=y._defaultOptions)||void 0===_?void 0:_.overlayPanelClass)||"",y._focused=!1,y.controlType="mat-select",y._required=!1,y._multiple=!1,y._disableOptionCentering=null!==(x=null===(w=y._defaultOptions)||void 0===w?void 0:w.disableOptionCentering)&&void 0!==x&&x,y.ariaLabel="",y.optionSelectionChanges=Ef(function(){var t=y.options;return t?t.changes.pipe(zf(t),Of(function(){return dt.apply(void 0,b(t.map(function(t){return t.onSelectionChange})))})):y._ngZone.onStable.pipe(Nf(1),Of(function(){return y.optionSelectionChanges}))}),y.openedChange=new Bu,y._openedStream=y.openedChange.pipe(Ld(function(t){return t}),q(function(){})),y._closedStream=y.openedChange.pipe(Ld(function(t){return!t}),q(function(){})),y.selectionChange=new Bu,y.valueChange=new Bu,y.ngControl&&(y.ngControl.valueAccessor=d(y)),null!=(null==v?void 0:v.typeaheadDebounceInterval)&&(y._typeaheadDebounceInterval=v.typeaheadDebounceInterval),y._scrollStrategyFactory=g,y._scrollStrategy=y._scrollStrategyFactory(),y.tabIndex=parseInt(p)||0,y.id=y.id,y}return s(n,[{key:"ngOnInit",value:function(){var t=this;this._selectionModel=new py(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Pv(),Uv(this._destroy)).subscribe(function(){return t._panelDoneAnimating(t.panelOpen)})}},{key:"ngAfterContentInit",value:function(){var t=this;this._initKeyManager(),this._selectionModel.changed.pipe(Uv(this._destroy)).subscribe(function(t){t.added.forEach(function(t){return t.select()}),t.removed.forEach(function(t){return t.deselect()})}),this.options.changes.pipe(zf(null),Uv(this._destroy)).subscribe(function(){t._resetOptions(),t._initializeSelection()})}},{key:"ngDoCheck",value:function(){var t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){var e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}},{key:"ngOnDestroy",value:function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}},{key:"toggle",value:function(){this.panelOpen?this.close():this.open()}},{key:"open",value:function(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}},{key:"close",value:function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}},{key:"writeValue",value:function(t){this.value=t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}},{key:"_handleClosedKeydown",value:function(t){var e=t.keyCode,n=e===zy||e===Fy||e===Ny||e===Vy,i=e===Ey||e===Py,r=this._keyManager;if(!r.isTyping()&&i&&!By(t)||(this.multiple||t.altKey)&&n)t.preventDefault(),this.open();else if(!this.multiple){var o=this.selected;r.onKeydown(t);var a=this.selected;a&&o!==a&&this._liveAnnouncer.announce(a.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(t){var e=this._keyManager,n=t.keyCode,i=n===zy||n===Fy,r=e.isTyping();if(i&&t.altKey)t.preventDefault(),this.close();else if(r||n!==Ey&&n!==Py||!e.activeItem||By(t))if(!r&&this._multiple&&65===n&&t.ctrlKey){t.preventDefault();var o=this.options.some(function(t){return!t.disabled&&!t.selected});this.options.forEach(function(t){t.disabled||(o?t.select():t.deselect())})}else{var a=e.activeItemIndex;e.onKeydown(t),this._multiple&&i&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==a&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}},{key:"_onFocus",value:function(){this.disabled||(this._focused=!0,this.stateChanges.next())}},{key:"_onBlur",value:function(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}},{key:"_onAttached",value:function(){var t=this;this.overlayDir.positionChange.pipe(Nf(1)).subscribe(function(){t._changeDetectorRef.detectChanges(),t._positioningSettled()})}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(this._parentFormField.color):""}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then(function(){t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value),t.stateChanges.next()})}},{key:"_setSelectionByValue",value:function(t){var e=this;if(this._selectionModel.selected.forEach(function(t){return t.setInactiveStyles()}),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(function(t){return e._selectValue(t)}),this._sortValues();else{var n=this._selectValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(t){var e=this,n=this.options.find(function(n){if(e._selectionModel.isSelected(n))return!1;try{return null!=n.value&&e._compareWith(n.value,t)}catch(i){return!1}});return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var t=this;this._keyManager=new H_(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Uv(this._destroy)).subscribe(function(){t.panelOpen&&(!t.multiple&&t._keyManager.activeItem&&t._keyManager.activeItem._selectViaInteraction(),t.focus(),t.close())}),this._keyManager.change.pipe(Uv(this._destroy)).subscribe(function(){t._panelOpen&&t.panel?t._scrollOptionIntoView(t._keyManager.activeItemIndex||0):t._panelOpen||t.multiple||!t._keyManager.activeItem||t._keyManager.activeItem._selectViaInteraction()})}},{key:"_resetOptions",value:function(){var t=this,e=dt(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Uv(e)).subscribe(function(e){t._onSelect(e.source,e.isUserInput),e.isUserInput&&!t.multiple&&t._panelOpen&&(t.close(),t.focus())}),dt.apply(void 0,b(this.options.map(function(t){return t._stateChanges}))).pipe(Uv(e)).subscribe(function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()})}},{key:"_onSelect",value:function(t,e){var n=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(n!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),n!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;if(this.multiple){var e=this.options.toArray();this._selectionModel.sort(function(n,i){return t.sortComparator?t.sortComparator(n,i,e):e.indexOf(n)-e.indexOf(i)}),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(t){var e;e=this.multiple?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(this._getChangeEvent(e)),this._changeDetectorRef.markForCheck()}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_canOpen",value:function(){var t;return!this._panelOpen&&!this.disabled&&(null===(t=this.options)||void 0===t?void 0:t.length)>0}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_getPanelAriaLabelledby",value:function(){var t;if(this.ariaLabel)return null;var e=null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_getTriggerAriaLabelledby",value:function(){var t;if(this.ariaLabel)return null;var e=null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId(),n=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(n+=" "+this.ariaLabelledby),n}},{key:"_panelDoneAnimating",value:function(t){this.openedChange.emit(t)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"focused",get:function(){return this._focused||this._panelOpen}},{key:"placeholder",get:function(){return this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=fv(t)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(t){this._disableOptionCentering=fv(t)}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(t){this._typeaheadDebounceInterval=pv(t)}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid,this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var t=this._selectionModel.selected.map(function(t){return t.viewValue});return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}]),n}(bD);return t.\u0275fac=function(e){return new(e||t)(hs(vy),hs(eu),hs(Mc),hs(Lk),hs(Tl),hs(uy,8),hs(QC,8),hs(lA,8),hs(eD,8),hs(SC,10),yi("tabindex"),hs(mD),hs($_),hs(vD,8))},t.\u0275dir=ve({type:t,viewQuery:function(t,e){var n;1&t&&(Ju(rD,1),Ju(oD,1),Ju(__,1)),2&t&&(Qu(n=ec())&&(e.trigger=n.first),Qu(n=ec())&&(e.panel=n.first),Qu(n=ec())&&(e.overlayDir=n.first))},inputs:{ariaLabel:["aria-label","ariaLabel"],id:"id",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",typeaheadDebounceInterval:"typeaheadDebounceInterval",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[Xa,Ee]}),t}(),SD=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._scrollTop=0,t._triggerFontSize=0,t._transformOrigin="top",t._offsetY=0,t._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],t}return s(n,[{key:"_calculateOverlayScroll",value:function(t,e,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*t-e+i/2),n)}},{key:"ngOnInit",value:function(){var t=this;r(i(n.prototype),"ngOnInit",this).call(this),this._viewportRuler.change().pipe(Uv(this._destroy)).subscribe(function(){t.panelOpen&&(t._triggerRect=t.trigger.nativeElement.getBoundingClientRect(),t._changeDetectorRef.markForCheck())})}},{key:"open",value:function(){var t=this;r(i(n.prototype),"_canOpen",this).call(this)&&(r(i(n.prototype),"open",this).call(this),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize="".concat(t._triggerFontSize,"px"))}))}},{key:"_scrollOptionIntoView",value:function(t){var e=rS(t,this.options,this.optionGroups),n=this._getItemHeight();this.panel.nativeElement.scrollTop=oS((t+e)*n,n,this.panel.nativeElement.scrollTop,gD)}},{key:"_positioningSettled",value:function(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}},{key:"_panelDoneAnimating",value:function(t){this.panelOpen?this._scrollTop=0:(this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),r(i(n.prototype),"_panelDoneAnimating",this).call(this,t)}},{key:"_getChangeEvent",value:function(t){return new _D(this,t)}},{key:"_calculateOverlayOffsetX",value:function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),r=this.multiple?56:32;if(this.multiple)t=40;else if(this.disableOptionCentering)t=16;else{var o=this._selectionModel.selected[0]||this.options.first;t=o&&o.group?32:16}i||(t*=-1);var a=0-(e.left+t-(i?r:0)),s=e.right+t-n.width+(i?0:r);a>0?t+=a+8:s>0&&(t-=s+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(t,e,n){var i,r=this._getItemHeight(),o=(r-this._triggerRect.height)/2,a=Math.floor(gD/r);return this.disableOptionCentering?0:(i=0===this._scrollTop?t*r:this._scrollTop===n?(t-(this._getItemCount()-a))*r+(r-(this._getItemCount()*r-gD)%r):e-r/2,Math.round(-1*i-o))}},{key:"_checkOverlayWithinViewport",value:function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,r=n.height-this._triggerRect.bottom-8,o=Math.abs(this._offsetY),a=Math.min(this._getItemCount()*e,gD)-o-this._triggerRect.height;a>r?this._adjustPanelUp(a,r):o>i?this._adjustPanelDown(o,i,t):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(t,e,n){var i=Math.round(t-e);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_calculateOverlayPosition",value:function(){var t,e=this._getItemHeight(),n=this._getItemCount(),i=Math.min(n*e,gD),r=n*e-i;t=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),t+=rS(t,this.options,this.optionGroups);var o=i/2;this._scrollTop=this._calculateOverlayScroll(t,o,r),this._offsetY=this._calculateOverlayOffsetY(t,o,r),this._checkOverlayWithinViewport(r)}},{key:"_getOriginBasedOnOption",value:function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2,n=Math.abs(this._offsetY)-e+t/2;return"50% ".concat(n,"px 0px")}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}}]),n}(kD);return t.\u0275fac=function(e){return CD(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,wD,1),tc(n,iS,1),tc(n,Jk,1)),2&t&&(Qu(i=ec())&&(e.customTrigger=i.first),Qu(i=ec())&&(e.options=i),Qu(i=ec())&&(e.optionGroups=i))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&Ss("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e._onFocus()})("blur",function(){return e._onBlur()}),2&t&&(ss("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),Gs("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[wl([{provide:WT,useExisting:t},{provide:Zk,useExisting:t}]),Xa],ngContentSelectors:dD,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(Os(hD),ps(0,"div",0,1),Ss("click",function(){return e.toggle()}),ps(3,"div",2),us(4,aD,2,1,"span",3),us(5,uD,3,2,"span",4),gs(),ps(6,"div",5),ms(7,"div",6),gs(),gs(),us(8,cD,4,14,"ng-template",7),Ss("backdropClick",function(){return e.close()})("attach",function(){return e._onAttached()})("detach",function(){return e.close()})),2&t){var n=cs(1);ss("aria-owns",e.panelOpen?e.id+"-panel":null),Oo(3),ds("ngSwitch",e.empty),ss("id",e._valueId),Oo(1),ds("ngSwitchCase",!0),Oo(1),ds("ngSwitchCase",!1),Oo(3),ds("cdkConnectedOverlayPanelClass",e._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[y_,zh,Bh,__,Hh,Eh],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px}\n'],encapsulation:2,data:{animation:[fD.transformPanelWrap,fD.transformPanel]},changeDetection:0}),t}(),CD=mi(SD),AD=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[yD],imports:[[Kh,w_,aS,gk],yy,iD,aS,gk]}),t}(),MD={tooltipState:gb("state",[_b("initial, void, hidden",yb({opacity:0,transform:"scale(0)"})),_b("visible",yb({transform:"scale(1)"})),wb("* => visible",mb("200ms cubic-bezier(0, 0, 0.2, 1)",bb([yb({opacity:0,transform:"scale(0)",offset:0}),yb({opacity:.5,transform:"scale(0.99)",offset:.5}),yb({opacity:1,transform:"scale(1)",offset:1})]))),wb("* => hidden",mb("100ms cubic-bezier(0, 0, 0.2, 1)",yb({opacity:0})))])},ID=oy({passive:!0}),TD=new wi("mat-tooltip-scroll-strategy"),DD={provide:TD,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},ED=new wi("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OD=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d,f){var p=this;o(this,t),this._overlay=e,this._elementRef=n,this._scrollDispatcher=i,this._viewContainerRef=r,this._ngZone=a,this._platform=s,this._ariaDescriber=l,this._focusMonitor=u,this._dir=h,this._defaultOptions=d,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new U,this._handleKeydown=function(t){p._isTooltipVisible()&&t.keyCode===Oy&&!By(t)&&(t.preventDefault(),t.stopPropagation(),p._ngZone.run(function(){return p.hide(0)}))},this._scrollStrategy=c,d&&(d.position&&(this.position=d.position),d.touchGestures&&(this.touchGestures=d.touchGestures)),a.runOutsideAngular(function(){n.nativeElement.addEventListener("keydown",p._handleKeydown)})}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this;this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Uv(this._destroyed)).subscribe(function(e){e?"keyboard"===e&&t._ngZone.run(function(){return t.show()}):t._ngZone.run(function(){return t.hide(0)})})}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(function(e){var n=y(e,2);t.removeEventListener(n[0],n[1],ID)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new wy(PD,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Uv(this._destroyed)).subscribe(function(){return t._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(e)}}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(t)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(e);return n.positionChanges.pipe(Uv(this._destroyed)).subscribe(function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run(function(){return t.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Uv(this._destroyed)).subscribe(function(){return t._detach()}),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),n.main),Object.assign(Object.assign({},e.fallback),n.fallback)])}},{key:"_getOrigin",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n||"below"==n?t={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={originX:"start",originY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={originX:"end",originY:"center"});var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}}},{key:"_getOverlayPosition",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n?t={overlayX:"center",overlayY:"bottom"}:"below"==n?t={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={overlayX:"start",overlayY:"center"});var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}}},{key:"_updateTooltipMessage",value:function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Nf(1),Uv(this._destroyed)).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))}},{key:"_setTooltipClass",value:function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}},{key:"_setupPointerEnterEventsIfNeeded",value:function(){var t=this;!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",function(){t._setupPointerExitEventsIfNeeded(),t.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",function(){t._setupPointerExitEventsIfNeeded(),clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout(function(){return t.show()},500)}])),this._addListeners(this._passiveListeners))}},{key:"_setupPointerExitEventsIfNeeded",value:function(){var t,e=this;if(!this._pointerExitEventsInitialized){this._pointerExitEventsInitialized=!0;var n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",function(){return e.hide()}],["wheel",function(t){return e._wheelListener(t)}]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var i=function(){clearTimeout(e._touchstartTimeout),e.hide(e._defaultOptions.touchendHideDelay)};n.push(["touchend",i],["touchcancel",i])}this._addListeners(n),(t=this._passiveListeners).push.apply(t,n)}}},{key:"_addListeners",value:function(t){var e=this;t.forEach(function(t){var n=y(t,2);e._elementRef.nativeElement.addEventListener(n[0],n[1],ID)})}},{key:"_platformSupportsMouseEvents",value:function(){return!this._platform.IOS&&!this._platform.ANDROID}},{key:"_wheelListener",value:function(t){if(this._isTooltipVisible()){var e=(this._document||document).elementFromPoint(t.clientX,t.clientY),n=this._elementRef.nativeElement;e===n||n.contains(e)||this.hide()}}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this.touchGestures;if("off"!==t){var e=this._elementRef.nativeElement,n=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),"on"!==t&&e.draggable||(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}},{key:"position",get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=fv(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}},{key:"message",get:function(){return this._message},set:function(t){var e=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(function(){Promise.resolve().then(function(){e._ariaDescriber.describe(e._elementRef.nativeElement,e.message,"tooltip")})}))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(Tl),hs(my),hs(pu),hs(Mc),hs(ey),hs(F_),hs(ib),hs(TD),hs(uy,8),hs(ED,8),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t}(),PD=function(){var t=function(){function t(e,n){o(this,t),this._changeDetectorRef=e,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new U,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)")}return s(t,[{key:"show",value:function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()},t)}},{key:"hide",value:function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()},t)}},{key:"afterHidden",value:function(){return this._onHide}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs($M))},t.\u0275cmp=he({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&Ss("click",function(){return e._handleBodyInteraction()},!1,Br)("auxclick",function(){return e._handleBodyInteraction()},!1,Br),2&t&&js("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var n;1&t&&(ps(0,"div",0),Ss("@state.start",function(){return e._animationStart()})("@state.done",function(t){return e._animationDone(t)}),Ru(1,"async"),tl(2),gs()),2&t&&(Gs("mat-tooltip-handset",null==(n=Lu(1,5,e._isHandset))?null:n.matches),ds("ngClass",e.tooltipClass)("@state",e._visibility),Oo(2),el(e.message))},directives:[Eh],pipes:[Yh],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[MD.tooltipState]},changeDetection:0}),t}(),RD=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[DD],imports:[[cb,Kh,w_,gk],gk,yy]}),t}();function LD(t,e){if(1&t&&(ps(0,"mat-option",19),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n),Oo(1),nl(" ",n," ")}}function ND(t,e){if(1&t){var n=bs();ps(0,"mat-form-field",16),ps(1,"mat-select",17),Ss("selectionChange",function(t){return rn(n),Ds(2)._changePageSize(t.value)}),us(2,LD,2,2,"mat-option",18),gs(),gs()}if(2&t){var i=Ds(2);ds("appearance",i._formFieldAppearance)("color",i.color),Oo(1),ds("value",i.pageSize)("disabled",i.disabled)("aria-label",i._intl.itemsPerPageLabel),Oo(1),ds("ngForOf",i._displayedPageSizeOptions)}}function FD(t,e){if(1&t&&(ps(0,"div",20),tl(1),gs()),2&t){var n=Ds(2);Oo(1),el(n.pageSize)}}function VD(t,e){if(1&t&&(ps(0,"div",12),ps(1,"div",13),tl(2),gs(),us(3,ND,3,6,"mat-form-field",14),us(4,FD,2,1,"div",15),gs()),2&t){var n=Ds();Oo(2),nl(" ",n._intl.itemsPerPageLabel," "),Oo(1),ds("ngIf",n._displayedPageSizeOptions.length>1),Oo(1),ds("ngIf",n._displayedPageSizeOptions.length<=1)}}function zD(t,e){if(1&t){var n=bs();ps(0,"button",21),Ss("click",function(){return rn(n),Ds().firstPage()}),On(),ps(1,"svg",7),ms(2,"path",22),gs(),gs()}if(2&t){var i=Ds();ds("matTooltip",i._intl.firstPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),ss("aria-label",i._intl.firstPageLabel)}}function BD(t,e){if(1&t){var n=bs();On(),Pn(),ps(0,"button",23),Ss("click",function(){return rn(n),Ds().lastPage()}),On(),ps(1,"svg",7),ms(2,"path",24),gs(),gs()}if(2&t){var i=Ds();ds("matTooltip",i._intl.lastPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),ss("aria-label",i._intl.lastPageLabel)}}var HD=function(){var t=function t(){o(this,t),this.changes=new U,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=function(t,e,n){if(0==n||0==e)return"0 of ".concat(n);var i=t*e,r=i<(n=Math.max(n,0))?Math.min(i+e,n):i+e;return"".concat(i+1," \u2013 ").concat(r," of ").concat(n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),jD={provide:HD,deps:[[new qi,new Xi,HD]],useFactory:function(t){return t||new HD}},GD=new wi("MAT_PAGINATOR_DEFAULT_OPTIONS"),UD=mk(wk(function t(){o(this,t)})),WD=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;if(o(this,n),(a=e.call(this))._intl=t,a._changeDetectorRef=i,a._pageIndex=0,a._length=0,a._pageSizeOptions=[],a._hidePageSize=!1,a._showFirstLastButtons=!1,a.page=new Bu,a._intlChanges=t.changes.subscribe(function(){return a._changeDetectorRef.markForCheck()}),r){var s=r.pageSize,l=r.pageSizeOptions,u=r.hidePageSize,c=r.showFirstLastButtons;null!=s&&(a._pageSize=s),null!=l&&(a._pageSizeOptions=l),null!=u&&(a._hidePageSize=u),null!=c&&(a._showFirstLastButtons=c)}return a}return s(n,[{key:"ngOnInit",value:function(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}},{key:"ngOnDestroy",value:function(){this._intlChanges.unsubscribe()}},{key:"nextPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}}},{key:"previousPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}}},{key:"firstPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}}},{key:"lastPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}}},{key:"hasPreviousPage",value:function(){return this.pageIndex>=1&&0!=this.pageSize}},{key:"hasNextPage",value:function(){var t=this.getNumberOfPages()-1;return this.pageIndex=o.length&&(a=0),o[a]}},{key:"ngOnInit",value:function(){this._markInitialized()}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"direction",get:function(){return this._direction},set:function(t){this._direction=t}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=fv(t)}}]),n}(QD);return t.\u0275fac=function(e){return new(e||t)(hs($D,8))},t.\u0275dir=ve({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[Xa,Ee]}),t}(),tE=dk.ENTERING+" "+hk.STANDARD_CURVE,eE={indicator:gb("indicator",[_b("active-asc, asc",yb({transform:"translateY(0px)"})),_b("active-desc, desc",yb({transform:"translateY(10px)"})),wb("active-asc <=> active-desc",mb(tE))]),leftPointer:gb("leftPointer",[_b("active-asc, asc",yb({transform:"rotate(-45deg)"})),_b("active-desc, desc",yb({transform:"rotate(45deg)"})),wb("active-asc <=> active-desc",mb(tE))]),rightPointer:gb("rightPointer",[_b("active-asc, asc",yb({transform:"rotate(45deg)"})),_b("active-desc, desc",yb({transform:"rotate(-45deg)"})),wb("active-asc <=> active-desc",mb(tE))]),arrowOpacity:gb("arrowOpacity",[_b("desc-to-active, asc-to-active, active",yb({opacity:1})),_b("desc-to-hint, asc-to-hint, hint",yb({opacity:.54})),_b("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",yb({opacity:0})),wb("* => asc, * => desc, * => active, * => hint, * => void",mb("0ms")),wb("* <=> *",mb(tE))]),arrowPosition:gb("arrowPosition",[wb("* => desc-to-hint, * => desc-to-active",mb(tE,bb([yb({transform:"translateY(-25%)"}),yb({transform:"translateY(0)"})]))),wb("* => hint-to-desc, * => active-to-desc",mb(tE,bb([yb({transform:"translateY(0)"}),yb({transform:"translateY(25%)"})]))),wb("* => asc-to-hint, * => asc-to-active",mb(tE,bb([yb({transform:"translateY(25%)"}),yb({transform:"translateY(0)"})]))),wb("* => hint-to-asc, * => active-to-asc",mb(tE,bb([yb({transform:"translateY(0)"}),yb({transform:"translateY(-25%)"})]))),_b("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",yb({transform:"translateY(0)"})),_b("hint-to-desc, active-to-desc, desc",yb({transform:"translateY(-25%)"})),_b("hint-to-asc, active-to-asc, asc",yb({transform:"translateY(25%)"}))]),allowChildren:gb("allowChildren",[wb("* <=> *",[kb("@*",xb(),{optional:!0})])])},nE=function(){var t=function t(){o(this,t),this.changes=new U,this.sortButtonLabel=function(t){return"Change sorting for ".concat(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),iE={provide:nE,deps:[[new qi,new Xi,nE]],useFactory:function(t){return t||new nE}},rE=mk(function t(){o(this,t)}),oE=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this))._intl=t,u._changeDetectorRef=i,u._sort=r,u._columnDef=a,u._focusMonitor=s,u._elementRef=l,u._showIndicatorHint=!1,u._arrowDirection="",u._disableViewStateAnimation=!1,u.arrowPosition="after",u._handleStateChanges(),u}return s(n,[{key:"ngOnInit",value:function(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){var n=!!e;n!==t._showIndicatorHint&&(t._setIndicatorHintVisible(n),t._changeDetectorRef.markForCheck())})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}},{key:"_setIndicatorHintVisible",value:function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}},{key:"_setAnimationTransitionState",value:function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}},{key:"_toggleOnInteraction",value:function(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0)}},{key:"_handleClick",value:function(){this._isDisabled()||this._sort.sort(this)}},{key:"_handleKeydown",value:function(t){this._isDisabled()||t.keyCode!==Py&&t.keyCode!==Ey||(t.preventDefault(),this._toggleOnInteraction())}},{key:"_isSorted",value:function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}},{key:"_getArrowDirectionState",value:function(){return"".concat(this._isSorted()?"active-":"").concat(this._arrowDirection)}},{key:"_getArrowViewState",value:function(){var t=this._viewState.fromState;return(t?"".concat(t,"-to-"):"")+this._viewState.toState}},{key:"_updateArrowDirection",value:function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}},{key:"_isDisabled",value:function(){return this._sort.disabled||this.disabled}},{key:"_getAriaSortAttribute",value:function(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}},{key:"_renderArrow",value:function(){return!this._isDisabled()||this._isSorted()}},{key:"_handleStateChanges",value:function(){var t=this;this._rerenderSubscription=dt(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(function(){t._isSorted()&&(t._updateArrowDirection(),"hint"!==t._viewState.toState&&"active"!==t._viewState.toState||(t._disableViewStateAnimation=!0),t._setAnimationTransitionState({fromState:t._arrowDirection,toState:"active"}),t._showIndicatorHint=!1),!t._isSorted()&&t._viewState&&"active"===t._viewState.toState&&(t._disableViewStateAnimation=!1,t._setAnimationTransitionState({fromState:"active",toState:t._arrowDirection})),t._changeDetectorRef.markForCheck()})}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=fv(t)}}]),n}(rE);return t.\u0275fac=function(e){return new(e||t)(hs(nE),hs(eu),hs(JD,8),hs("MAT_SORT_HEADER_COLUMN_DEF",8),hs(ib),hs(Tl))},t.\u0275cmp=he({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&Ss("click",function(){return e._handleClick()})("keydown",function(t){return e._handleKeydown(t)})("mouseenter",function(){return e._setIndicatorHintVisible(!0)})("mouseleave",function(){return e._setIndicatorHintVisible(!1)}),2&t&&(ss("aria-sort",e._getAriaSortAttribute()),Gs("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[Xa],attrs:XD,ngContentSelectors:KD,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(Os(),ps(0,"div",0),ps(1,"div",1),Ps(2),gs(),us(3,ZD,6,6,"div",2),gs()),2&t&&(Gs("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),ss("tabindex",e._isDisabled()?null:0),Oo(3),ds("ngIf",e._renderArrow()))},directives:[Lh],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[eE.indicator,eE.leftPointer,eE.rightPointer,eE.arrowOpacity,eE.arrowPosition,eE.allowChildren]},changeDetection:0}),t}(),aE=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[iE],imports:[[Kh,gk]]}),t}(),sE=[[["caption"]],[["colgroup"],["col"]]],lE=["caption","colgroup, col"];function uE(t){return function(t){u(n,t);var e=p(n);function n(){var t;o(this,n);for(var i=arguments.length,r=new Array(i),a=0;a4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=arguments.length>6?arguments[6]:void 0;o(this,t),this._isNativeHtmlTable=e,this._stickCellCss=n,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=a,this._needsPositionStickyOnElement=s,this._positionListener=l,this._cachedCellWidths=[],this._borderCellCss={top:"".concat(n,"-border-elem-top"),bottom:"".concat(n,"-border-elem-bottom"),left:"".concat(n,"-border-elem-left"),right:"".concat(n,"-border-elem-right")}}return s(t,[{key:"clearStickyPositioning",value:function(t,e){var n,i=this,r=[],o=v(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.nodeType===a.ELEMENT_NODE){r.push(a);for(var s=0;s3&&void 0!==arguments[3])||arguments[3];if(t.length&&this._isBrowser&&(e.some(function(t){return t})||n.some(function(t){return t}))){var o=t[0],a=o.children.length,s=this._getCellWidths(o,r),l=this._getStickyStartColumnPositions(s,e),u=this._getStickyEndColumnPositions(s,n),c=e.lastIndexOf(!0),h=n.indexOf(!0);this._scheduleStyleChanges(function(){var r,o="rtl"===i.direction,d=o?"right":"left",f=o?"left":"right",p=v(t);try{for(p.s();!(r=p.n()).done;)for(var g=r.value,m=0;m1&&void 0!==arguments[1])||arguments[1];if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;for(var n=[],i=t.children,r=0;r0;r--)e[r]&&(n[r]=i,i+=t[r]);return n}},{key:"_scheduleStyleChanges",value:function(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}]),t}(),RE=new wi("CDK_SPL"),LE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","rowOutlet",""]]}),t}(),NE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","headerRowOutlet",""]]}),t}(),FE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","footerRowOutlet",""]]}),t}(),VE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","noDataRowOutlet",""]]}),t}(),zE=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d){o(this,t),this._differs=e,this._changeDetectorRef=n,this._elementRef=i,this._dir=a,this._platform=l,this._viewRepeater=u,this._coalescedStyleScheduler=c,this._stickyPositioningListener=h,this._viewportRuler=d,this._onDestroy=new U,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.viewChange=new yf({start:0,end:Number.MAX_VALUE}),r||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return s(t,[{key:"ngOnInit",value:function(){var t=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create(function(e,n){return t.trackBy?t.trackBy(n.dataIndex,n.data):n}),this._viewportRuler&&this._viewportRuler.change().pipe(Uv(this._onDestroy)).subscribe(function(){t._forceRecalculateCellWidths=!0})}},{key:"ngAfterContentChecked",value:function(){this._cacheRowDefs(),this._cacheColumnDefs();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}},{key:"ngOnDestroy",value:function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),dy(this.dataSource)&&this.dataSource.disconnect(this)}},{key:"renderRows",value:function(){var t=this;this._renderRows=this._getAllRenderRows();var e=this._dataDiffer.diff(this._renderRows);if(e){var n=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(e,n,function(e,n,i){return t._getEmbeddedViewArgs(e.item,i)},function(t){return t.item.data},function(e){1===e.operation&&e.context&&t._renderCellTemplateForItem(e.record.item.rowDef,e.context)}):e.forEachOperation(function(e,i,r){if(null==e.previousIndex){var o=e.item;t._renderRow(t._rowOutlet,o.rowDef,r,{$implicit:o.data})}else if(null==r)n.remove(i);else{var a=n.get(i);n.move(a,r)}}),this._updateRowIndexContext(),e.forEachIdentityChange(function(t){n.get(t.currentIndex).context.$implicit=t.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()}},{key:"addColumnDef",value:function(t){this._customColumnDefs.add(t)}},{key:"removeColumnDef",value:function(t){this._customColumnDefs.delete(t)}},{key:"addRowDef",value:function(t){this._customRowDefs.add(t)}},{key:"removeRowDef",value:function(t){this._customRowDefs.delete(t)}},{key:"addHeaderRowDef",value:function(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}},{key:"removeHeaderRowDef",value:function(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}},{key:"addFooterRowDef",value:function(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}},{key:"removeFooterRowDef",value:function(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}},{key:"setNoDataRow",value:function(t){this._customNoDataRow=t}},{key:"updateStickyHeaderRowStyles",value:function(){var t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");var n=this._headerRowDefs.map(function(t){return t.sticky});this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach(function(t){return t.resetStickyChanged()})}},{key:"updateStickyFooterRowStyles",value:function(){var t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");var n=this._footerRowDefs.map(function(t){return t.sticky});this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(function(t){return t.resetStickyChanged()})}},{key:"updateStickyColumnStyles",value:function(){var t=this,e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([].concat(b(e),b(n),b(i)),["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach(function(e,n){t._addStickyColumnStyles([e],t._headerRowDefs[n])}),this._rowDefs.forEach(function(e){for(var i=[],r=0;r0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach(function(e,n){return t._renderRow(t._headerRowOutlet,e,n)}),this.updateStickyHeaderRowStyles()}},{key:"_forceRenderFooterRows",value:function(){var t=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach(function(e,n){return t._renderRow(t._footerRowOutlet,e,n)}),this.updateStickyFooterRowStyles()}},{key:"_addStickyColumnStyles",value:function(t,e){var n=this,i=Array.from(e.columns||[]).map(function(t){return n._columnDefsByName.get(t)}),r=i.map(function(t){return t.sticky}),o=i.map(function(t){return t.stickyEnd});this._stickyStyler.updateStickyColumns(t,r,o,!this._fixedLayout||this._forceRecalculateCellWidths)}},{key:"_getRenderedRows",value:function(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:{},r=t.viewContainer.createEmbeddedView(e.template,i,n);return this._renderCellTemplateForItem(e,i),r}},{key:"_renderCellTemplateForItem",value:function(t,e){var n,i=v(this._getCellTemplates(t));try{for(i.s();!(n=i.n()).done;)IE.mostRecentCellOutlet&&IE.mostRecentCellOutlet._viewContainer.createEmbeddedView(n.value,e)}catch(r){i.e(r)}finally{i.f()}this._changeDetectorRef.markForCheck()}},{key:"_updateRowIndexContext",value:function(){for(var t=this._rowOutlet.viewContainer,e=0,n=t.length;e0&&void 0!==arguments[0]?arguments[0]:[];return o(this,n),(t=e.call(this))._renderData=new yf([]),t._filter=new yf(""),t._internalPageChanges=new U,t._renderChangesSubscription=null,t.sortingDataAccessor=function(t,e){var n=t[e];if(gv(n)){var i=Number(n);return ia?u=1:o0)){var i=Math.ceil(n.length/n.pageSize)-1||0,r=Math.min(n.pageIndex,i);r!==n.pageIndex&&(n.pageIndex=r,e._internalPageChanges.next())}})}},{key:"connect",value:function(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}},{key:"disconnect",value:function(){var t;null===(t=this._renderChangesSubscription)||void 0===t||t.unsubscribe(),this._renderChangesSubscription=null}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t),this._renderChangesSubscription||this._filterData(t)}},{key:"filter",get:function(){return this._filter.value},set:function(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}},{key:"sort",get:function(){return this._sort},set:function(t){this._sort=t,this._updateChangeSubscription()}},{key:"paginator",get:function(){return this._paginator},set:function(t){this._paginator=t,this._updateChangeSubscription()}}]),n}(hy));function fO(t){return t instanceof Date&&!isNaN(+t)}function pO(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv,n=fO(t),i=n?+t-e.now():Math.abs(t);return function(t){return t.lift(new gO(i,e))}}var gO=function(){function t(e,n){o(this,t),this.delay=e,this.scheduler=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new mO(t,this.delay,this.scheduler))}}]),t}(),mO=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).delay=i,a.scheduler=r,a.queue=[],a.active=!1,a.errored=!1,a}return s(n,[{key:"_schedule",value:function(t){this.active=!0,this.destination.add(t.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}},{key:"scheduleNotification",value:function(t){if(!0!==this.errored){var e=this.scheduler,n=new vO(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(Kv.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(Kv.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1}}]),n}(R),vO=function t(e,n){o(this,t),this.time=e,this.notification=n},yO=oy({passive:!0}),_O=function(){var t=function(){function t(e,n){o(this,t),this._platform=e,this._ngZone=n,this._monitoredElements=new Map}return s(t,[{key:"monitor",value:function(t){var e=this;if(!this._platform.isBrowser)return Tf;var n=yv(t),i=this._monitoredElements.get(n);if(i)return i.subject;var r=new U,o="cdk-text-field-autofilled",a=function(t){"cdk-text-field-autofill-start"!==t.animationName||n.classList.contains(o)?"cdk-text-field-autofill-end"===t.animationName&&n.classList.contains(o)&&(n.classList.remove(o),e._ngZone.run(function(){return r.next({target:t.target,isAutofilled:!1})})):(n.classList.add(o),e._ngZone.run(function(){return r.next({target:t.target,isAutofilled:!0})}))};return this._ngZone.runOutsideAngular(function(){n.addEventListener("animationstart",a,yO),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:r,unlisten:function(){n.removeEventListener("animationstart",a,yO)}}),r}},{key:"stopMonitoring",value:function(t){var e=yv(t),n=this._monitoredElements.get(e);n&&(n.unlisten(),n.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}},{key:"ngOnDestroy",value:function(){var t=this;this._monitoredElements.forEach(function(e,n){return t.stopMonitoring(n)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey),zi(Mc))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey),zi(Mc))},token:t,providedIn:"root"}),t}(),bO=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[ny]]}),t}(),wO=new wi("MAT_INPUT_VALUE_ACCESSOR"),xO=["button","checkbox","file","hidden","image","radio","range","reset","submit"],kO=0,SO=bk(function t(e,n,i,r){o(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r}),CO=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c,h,d){var f;o(this,n),(f=e.call(this,l,a,s,r))._elementRef=t,f._platform=i,f.ngControl=r,f._autofillMonitor=c,f._formField=d,f._uid="mat-input-".concat(kO++),f.focused=!1,f.stateChanges=new U,f.controlType="mat-input",f.autofilled=!1,f._disabled=!1,f._required=!1,f._type="text",f._readonly=!1,f._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(function(t){return ry().has(t)});var p=f._elementRef.nativeElement,g=p.nodeName.toLowerCase();return f._inputValueAccessor=u||p,f._previousNativeValue=f.value,f.id=f.id,i.IOS&&h.runOutsideAngular(function(){t.nativeElement.addEventListener("keyup",function(t){var e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),f._isServer=!f._platform.isBrowser,f._isNativeSelect="select"===g,f._isTextarea="textarea"===g,f._isNativeSelect&&(f.controlType=p.multiple?"mat-native-select-multiple":"mat-native-select"),f}return s(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(function(e){t.autofilled=e.isAutofilled,t.stateChanges.next()})}},{key:"ngOnChanges",value:function(){this.stateChanges.next()}},{key:"ngOnDestroy",value:function(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}},{key:"ngDoCheck",value:function(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_focusChanged",value:function(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}},{key:"_onInput",value:function(){}},{key:"_dirtyCheckPlaceholder",value:function(){var t,e,n=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(n!==this._previousPlaceholder){var i=this._elementRef.nativeElement;this._previousPlaceholder=n,n?i.setAttribute("placeholder",n):i.removeAttribute("placeholder")}}},{key:"_dirtyCheckNativeValue",value:function(){var t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}},{key:"_validateType",value:function(){xO.indexOf(this._type)}},{key:"_isNeverEmpty",value:function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}},{key:"_isBadInput",value:function(){var t=this._elementRef.nativeElement.validity;return t&&t.badInput}},{key:"setDescribedByIds",value:function(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}},{key:"onContainerClick",value:function(){this.focused||this.focus()}},{key:"disabled",get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(t){this._disabled=fv(t),this.focused&&(this.focused=!1,this.stateChanges.next())}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t)}},{key:"type",get:function(){return this._type},set:function(t){this._type=t||"text",this._validateType(),!this._isTextarea&&ry().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}},{key:"value",get:function(){return this._inputValueAccessor.value},set:function(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}},{key:"readonly",get:function(){return this._readonly},set:function(t){this._readonly=fv(t)}},{key:"empty",get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}},{key:"shouldLabelFloat",get:function(){if(this._isNativeSelect){var t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}}]),n}(SO);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ey),hs(SC,10),hs(QC,8),hs(lA,8),hs(Lk),hs(wO,10),hs(_O),hs(Mc),hs(eD,8))},t.\u0275dir=ve({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&Ss("focus",function(){return e._focusChanged(!0)})("blur",function(){return e._focusChanged(!1)})("input",function(){return e._onInput()}),2&t&&(rl("disabled",e.disabled)("required",e.required),ss("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState&&!e.empty)("aria-required",e.required),Gs("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[wl([{provide:WT,useExisting:t}]),Xa,Ee]}),t}(),AO=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[Lk],imports:[[bO,iD,gk],bO,iD]}),t}(),MO=["searchSelectInput"],IO=["innerSelectSearch"];function TO(t,e){if(1&t){var n=bs();ps(0,"button",6),Ss("click",function(){return rn(n),Ds()._reset(!0)}),ps(1,"i",7),tl(2,"close"),gs(),gs()}}var DO=function(t){return{"mat-select-search-inner-multiple":t}},EO=function(){function t(t,e){this.matSelect=t,this.changeDetectorRef=e,this.placeholderLabel=django.gettext("Filter"),this.noEntriesFoundLabel=django.gettext("No entries found"),this.clearSearchInput=!0,this.disableInitialFocus=!1,this.changed=new Bu,this.overlayClassSet=!1,this.change=new Bu,this._onDestroy=new U}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(e):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,e]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[e]=!0):this.matSelect.panelClass=e,this.matSelect.openedChange.pipe(pO(1),Uv(this._onDestroy)).subscribe(function(e){e?(t.getWidth(),t.disableInitialFocus||t._focus()):t.clearSearchInput&&t._reset()}),this.matSelect.openedChange.pipe(Nf(1)).pipe(Uv(this._onDestroy)).subscribe(function(){t._options=t.matSelect.options,t._options.changes.pipe(Uv(t._onDestroy)).subscribe(function(){var e=t.matSelect._keyManager;e&&t.matSelect.panelOpen&&setTimeout(function(){e.setFirstItemActive(),t.getWidth()},1)})}),this.change.pipe(Uv(this._onDestroy)).subscribe(function(){t.changeDetectorRef.detectChanges()}),this.initMultipleHandling()},t.prototype.ngOnDestroy=function(){this._onDestroy.next(),this._onDestroy.complete()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout(function(){t.setOverlayClass()}),this.matSelect.openedChange.pipe(Nf(1),Uv(this._onDestroy)).subscribe(function(){t.matSelect.options.changes.pipe(Uv(t._onDestroy)).subscribe(function(){t.changeDetectorRef.markForCheck()})})},t.prototype._handleKeydown=function(t){(t.key&&1===t.key.length||t.keyCode>=65&&t.keyCode<=90||t.keyCode>=48&&t.keyCode<=57||t.keyCode===Py)&&t.stopPropagation()},t.prototype.writeValue=function(t){t!==this._value&&(this._value=t,this.change.emit(t))},t.prototype.onInputChange=function(t){t.value!==this._value&&(this.initMultiSelectedValues(),this._value=t.value,this.changed.emit(t.value),this.change.emit(t.value))},t.prototype.onBlur=function(t){this.writeValue(t.value)},t.prototype._focus=function(){if(this.searchSelectInput&&this.matSelect.panel){var t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.searchSelectInput.nativeElement.focus(),t.scrollTop=e}},t.prototype._reset=function(t){this.searchSelectInput&&(this.searchSelectInput.nativeElement.value="",this.onInputChange(""),t&&this._focus())},t.prototype.initMultiSelectedValues=function(){this.matSelect.multiple&&!this._value&&(this.previousSelectedValues=this.matSelect.options.filter(function(t){return t.selected}).map(function(t){return t.value}))},t.prototype.setOverlayClass=function(){var t=this;this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(Uv(this._onDestroy)).subscribe(function(){for(var e,n=t.searchSelectInput.nativeElement;n=n.parentElement;)if(n.classList.contains("cdk-overlay-pane")){e=n;break}e&&e.classList.add("cdk-overlay-pane-select-search")}),this.overlayClassSet=!0)},t.prototype.initMultipleHandling=function(){var t=this;this.matSelect.valueChange.pipe(Uv(this._onDestroy)).subscribe(function(e){if(t.matSelect.multiple){var n=!1;if(t._value&&t._value.length&&t.previousSelectedValues&&Array.isArray(t.previousSelectedValues)){e&&Array.isArray(e)||(e=[]);var i=t.matSelect.options.map(function(t){return t.value});t.previousSelectedValues.forEach(function(t){-1===e.indexOf(t)&&-1===i.indexOf(t)&&(e.push(t),n=!0)})}n&&t.matSelect._onChange(e),t.previousSelectedValues=e}})},t.prototype.getWidth=function(){if(this.innerSelectSearch&&this.innerSelectSearch.nativeElement){for(var t,e=this.innerSelectSearch.nativeElement;e=e.parentElement;)if(e.classList.contains("mat-select-panel")){t=e;break}t&&(this.innerSelectSearch.nativeElement.style.width=t.clientWidth+"px")}},t.\u0275fac=function(e){return new(e||t)(hs(SD),hs(eu))},t.\u0275cmp=he({type:t,selectors:[["uds-mat-select-search"]],viewQuery:function(t,e){if(1&t&&(Ju(MO,3,Tl),Ju(IO,3,Tl)),2&t){var n=void 0;Qu(n=ec())&&(e.searchSelectInput=n.first),Qu(n=ec())&&(e.innerSelectSearch=n.first)}},inputs:{placeholderLabel:"placeholderLabel",noEntriesFoundLabel:"noEntriesFoundLabel",clearSearchInput:"clearSearchInput",disableInitialFocus:"disableInitialFocus"},outputs:{changed:"changed"},features:[wl([{provide:ZS,useExisting:Ct(function(){return t}),multi:!0}])],decls:6,vars:5,consts:[["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner","mat-typography","mat-datepicker-content","mat-tab-header",3,"ngClass"],["innerSelectSearch",""],["matInput","","autocomplete","off",1,"mat-select-search-input",3,"placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ms(0,"input",0),ps(1,"div",1,2),ps(3,"input",3,4),Ss("keydown",function(t){return e._handleKeydown(t)})("input",function(t){return e.onInputChange(t.target)})("blur",function(t){return e.onBlur(t.target)}),gs(),us(5,TO,3,0,"button",5),gs()),2&t&&(Oo(1),ds("ngClass",Tu(3,DO,e.matSelect.multiple)),Oo(2),ds("placeholder",e.placeholderLabel),Oo(2),ds("ngIf",e.value))},directives:[CO,Eh,Lh,LS],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;border-bottom-width:1px;border-bottom-style:solid;z-index:100;font-size:inherit;box-shadow:none;border-radius:0}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:100%} .mat-select-search-panel{transform:none!important;overflow-x:hidden}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:4px;top:5px} .cdk-overlay-pane-select-search{margin-top:-50px}"],changeDetection:0}),t}();function OO(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New user permission for"),gs())}function PO(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New group permission for"),gs())}function RO(t,e){if(1&t&&(ps(0,"mat-option",11),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),el(n.text)}}function LO(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",12),Ss("changed",function(t){return rn(n),Ds().filterUser=t}),gs()}}function NO(t,e){if(1&t&&(ps(0,"mat-option",11),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),el(n.text)}}function FO(t,e){if(1&t&&(ps(0,"mat-option",11),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),el(n.text)}}var VO=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.filterUser="",this.authenticators=[],this.entities=[],this.permissions=[{id:"1",text:django.gettext("Read only")},{id:"2",text:django.gettext("Full Access")}],this.authenticator="",this.entity="",this.permission="1",this.onSave=new Bu(!0)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"50%";return e.gui.dialog.open(t,{width:r,data:{type:n,item:i},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){e.forEach(function(e){t.authenticators.push({id:e.id,text:e.name})})})},t.prototype.changeAuth=function(t){var e=this;this.entities.length=0,this.entity="",this.rest.authenticators.detail(t,this.data.type+"s").summary().subscribe(function(t){t.forEach(function(t){e.entities.push({id:t.id,text:t.name})})})},t.prototype.save=function(){this.onSave.emit({authenticator:this.authenticator,entity:this.entity,permissision:this.permission}),this.dialogRef.close()},t.prototype.filteredEntities=function(){var t=this,e=new Array;return this.entities.forEach(function(n){t.filterUser&&!n.text.toLocaleLowerCase().includes(t.filterUser.toLocaleLowerCase())||e.push(n)}),e},t.prototype.getFieldLabel=function(t){return"user"===t?django.gettext("User"):"group"===t?django.gettext("Group"):"auth"===t?django.gettext("Authenticator"):django.gettext("Permission")},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-new-permission"]],decls:24,vars:13,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],[3,"innerHTML"],["titleGroup",""],[1,"container"],[3,"placeholder","ngModel","valueChange","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"placeholder","ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,OO,2,0,"uds-translate",1),ms(2,"b",2),us(3,PO,2,0,"ng-template",null,3,oc),gs(),ps(5,"mat-dialog-content"),ps(6,"div",4),ps(7,"mat-form-field"),ps(8,"mat-select",5),Ss("valueChange",function(t){return e.changeAuth(t)})("ngModelChange",function(t){return e.authenticator=t}),us(9,RO,2,2,"mat-option",6),gs(),gs(),ps(10,"mat-form-field"),ps(11,"mat-select",7),Ss("ngModelChange",function(t){return e.entity=t}),us(12,LO,1,0,"uds-mat-select-search",8),us(13,NO,2,2,"mat-option",6),gs(),gs(),ps(14,"mat-form-field"),ps(15,"mat-select",7),Ss("ngModelChange",function(t){return e.permission=t}),us(16,FO,2,2,"mat-option",6),gs(),gs(),gs(),gs(),ps(17,"mat-dialog-actions"),ps(18,"button",9),ps(19,"uds-translate"),tl(20,"Cancel"),gs(),gs(),ps(21,"button",10),Ss("click",function(){return e.save()}),ps(22,"uds-translate"),tl(23,"Ok"),gs(),gs(),gs()),2&t){var n=cs(4);Oo(1),ds("ngIf","user"===e.data.type)("ngIfElse",n),Oo(1),ds("innerHTML",e.data.item.name,Dr),Oo(6),ds("placeholder",e.getFieldLabel("auth"))("ngModel",e.authenticator),Oo(1),ds("ngForOf",e.authenticators),Oo(2),ds("placeholder",e.getFieldLabel(e.data.type))("ngModel",e.entity),Oo(1),ds("ngIf",e.entities.length>10),Oo(1),ds("ngForOf",e.filteredEntities()),Oo(2),ds("placeholder",e.getFieldLabel("perm"))("ngModel",e.permission),Oo(1),ds("ngForOf",e.permissions)}},directives:[SS,Lh,CS,nD,SD,AC,eA,Ph,AS,LS,kS,VS,iS,EO],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function zO(t,e){if(1&t){var n=bs();ps(0,"div",11),ps(1,"div",12),tl(2),gs(),ps(3,"div",13),tl(4),ps(5,"a",14),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(2).revokePermission(t)}),ps(6,"i",15),tl(7,"close"),gs(),gs(),gs(),gs()}if(2&t){var i=e.$implicit;Oo(2),il(" ",i.entity_name,"@",i.auth_name," "),Oo(2),nl(" ",i.perm_name," \xa0")}}function BO(t,e){if(1&t){var n=bs();ps(0,"div",7),ps(1,"div",8),ps(2,"div",9),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds().newPermission(i),t.preventDefault()}),ps(3,"uds-translate"),tl(4,"New permission..."),gs(),gs(),us(5,zO,8,3,"div",10),gs(),gs()}if(2&t){var i=e.$implicit;Oo(5),ds("ngForOf",i)}}var HO=function(t,e){return[t,e]},jO=function(){function t(t,e,n){this.api=t,this.dialogRef=e,this.data=n,this.userPermissions=[],this.groupPermissions=[]}return t.launch=function(e,n,i){var r=window.innerWidth<800?"90%":"60%";e.gui.dialog.open(t,{width:r,data:{rest:n,item:i},disableClose:!1})},t.prototype.ngOnInit=function(){this.reload()},t.prototype.reload=function(){var t=this;this.data.rest.getPermissions(this.data.item.id).subscribe(function(e){t.updatePermissions(e)})},t.prototype.updatePermissions=function(t){var e=this;this.userPermissions.length=0,this.groupPermissions.length=0,t.forEach(function(t){"user"===t.type?e.userPermissions.push(t):e.groupPermissions.push(t)})},t.prototype.revokePermission=function(t){var e=this;this.api.gui.yesno(django.gettext("Remove"),django.gettext("Confirm revokation of permission")+" "+t.entity_name+"@"+t.auth_name+" "+t.perm_name+"").subscribe(function(n){n&&e.data.rest.revokePermission([t.id]).subscribe(function(t){e.reload()})})},t.prototype.newPermission=function(t){var e=this,n=t===this.userPermissions?"user":"group";VO.launch(this.api,n,this.data.item).subscribe(function(t){e.data.rest.addPermission(e.data.item.id,n+"s",t.entity,t.permissision).subscribe(function(t){e.reload()})})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-permissions-form"]],decls:17,vars:5,consts:[["mat-dialog-title",""],[3,"innerHTML"],[1,"titles"],[1,"title"],[1,"permissions"],["class","content",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","primary"],[1,"content"],[1,"perms"],[1,"perm","new",3,"click"],["class","perm",4,"ngFor","ngForOf"],[1,"perm"],[1,"owner"],[1,"permission"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Permissions for"),gs(),tl(3,"\xa0"),ms(4,"b",1),gs(),ps(5,"mat-dialog-content"),ps(6,"div",2),ps(7,"uds-translate",3),tl(8,"Users"),gs(),ps(9,"uds-translate",3),tl(10,"Groups"),gs(),gs(),ps(11,"div",4),us(12,BO,6,1,"div",5),gs(),gs(),ps(13,"mat-dialog-actions"),ps(14,"button",6),ps(15,"uds-translate"),tl(16,"Ok"),gs(),gs(),gs()),2&t&&(Oo(4),ds("innerHTML",e.data.item.name,Dr),Oo(8),ds("ngForOf",Du(2,HO,e.userPermissions,e.groupPermissions)))},directives:[SS,VS,CS,Ph,AS,LS,kS],styles:[".titles[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;margin-bottom:.4rem}.title[_ngcontent-%COMP%]{font-size:1.4rem}.permissions[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start}.perms[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);margin-bottom:1rem;margin-right:1rem;padding:.5rem}.perm[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.perm[_ngcontent-%COMP%]:hover:not(.new){background-color:#333;color:#fff;cursor:default}.owner[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.new[_ngcontent-%COMP%]{color:#00f;justify-content:center}.new[_ngcontent-%COMP%]:hover{color:#fff;background-color:#00f;cursor:pointer}.content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;justify-content:space-between}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),GO=n("dunZ"),UO=function(t){return void 0!==t.changingThisBreaksApplicationSecurity&&(t=t.changingThisBreaksApplicationSecurity.replace(/<.*>/g,"")),'"'+(t=""+t).replace('"','""')+'"'},WO=function(t){var e="";t.columns.forEach(function(t){e+=UO(t.title)+","}),e=e.slice(0,-1)+"\r\n",t.dataSource.data.forEach(function(n){t.columns.forEach(function(t){var i=n[t.name];switch(t.type){case PM.DATE:i=qI("SHORT_DATE_FORMAT",i);break;case PM.DATETIME:i=qI("SHORT_DATETIME_FORMAT",i);break;case PM.DATETIMESEC:i=qI("SHORT_DATE_FORMAT",i," H:i:s");break;case PM.TIME:i=qI("TIME_FORMAT",i)}e+=UO(i)+","}),e=e.slice(0,-1)+"\r\n"});var n=new Blob([e],{type:"text/csv"});setTimeout(function(){Object(GO.saveAs)(n,t.title+".csv")},100)};function YO(t,e){if(1&t&&(On(),ms(0,"circle",3)),2&t){var n=Ds();js("animation-name","mat-progress-spinner-stroke-rotate-"+n._spinnerAnimationLabel)("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),ss("r",n._getCircleRadius())}}function qO(t,e){if(1&t&&(On(),ms(0,"circle",3)),2&t){var n=Ds();js("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),ss("r",n._getCircleRadius())}}var XO=vk(function t(e){o(this,t),this._elementRef=e},"primary"),ZO=new wi("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}}),KO=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s){var l;o(this,n),(l=e.call(this,t))._elementRef=t,l._document=r,l._diameter=100,l._value=0,l._fallbackAnimation=!1,l.mode="determinate";var u=n._diameters;return l._spinnerAnimationLabel=l._getSpinnerAnimationLabel(),u.has(r.head)||u.set(r.head,new Set([100])),l._fallbackAnimation=i.EDGE||i.TRIDENT,l._noopAnimations="NoopAnimations"===a&&!!s&&!s._forceAnimations,s&&(s.diameter&&(l.diameter=s.diameter),s.strokeWidth&&(l.strokeWidth=s.strokeWidth)),l}return s(n,[{key:"ngOnInit",value:function(){var t=this._elementRef.nativeElement;this._styleRoot=sy(t)||this._document.head,this._attachStyleNode();var e="mat-progress-spinner-indeterminate".concat(this._fallbackAnimation?"-fallback":"","-animation");t.classList.add(e)}},{key:"_getCircleRadius",value:function(){return(this.diameter-10)/2}},{key:"_getViewBox",value:function(){var t=2*this._getCircleRadius()+this.strokeWidth;return"0 0 ".concat(t," ").concat(t)}},{key:"_getStrokeCircumference",value:function(){return 2*Math.PI*this._getCircleRadius()}},{key:"_getStrokeDashOffset",value:function(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}},{key:"_getCircleStrokeWidth",value:function(){return this.strokeWidth/this.diameter*100}},{key:"_attachStyleNode",value:function(){var t=this._styleRoot,e=this._diameter,i=n._diameters,r=i.get(t);if(!r||!r.has(e)){var o=this._document.createElement("style");o.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),o.textContent=this._getAnimationText(),t.appendChild(o),r||(r=new Set,i.set(t,r)),r.add(e)}}},{key:"_getAnimationText",value:function(){var t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,"".concat(.95*t)).replace(/END_VALUE/g,"".concat(.2*t)).replace(/DIAMETER/g,"".concat(this._spinnerAnimationLabel))}},{key:"_getSpinnerAnimationLabel",value:function(){return this.diameter.toString().replace(".","_")}},{key:"diameter",get:function(){return this._diameter},set:function(t){this._diameter=pv(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}},{key:"strokeWidth",get:function(){return this._strokeWidth||this.diameter/10},set:function(t){this._strokeWidth=pv(t)}},{key:"value",get:function(){return"determinate"===this.mode?this._value:0},set:function(t){this._value=Math.max(0,Math.min(100,pv(t)))}}]),n}(XO);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ey),hs(uh,8),hs(rk,8),hs(ZO))},t.\u0275cmp=he({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar","tabindex","-1",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(ss("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),js("width",e.diameter,"px")("height",e.diameter,"px"),Gs("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[Xa],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(On(),ps(0,"svg",0),us(1,YO,1,9,"circle",1),us(2,qO,1,7,"circle",2),gs()),2&t&&(js("width",e.diameter,"px")("height",e.diameter,"px"),ds("ngSwitch","indeterminate"===e.mode),ss("viewBox",e._getViewBox()),Oo(1),ds("ngSwitchCase",!0),Oo(1),ds("ngSwitchCase",!1))},directives:[zh,Bh],styles:[".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor;stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n"],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t}(),$O=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk,Kh],gk]}),t}(),QO=["mat-menu-item",""],JO=["*"];function tP(t,e){if(1&t){var n=bs();ps(0,"div",0),Ss("keydown",function(t){return rn(n),Ds()._handleKeydown(t)})("click",function(){return rn(n),Ds().closed.emit("click")})("@transformMenu.start",function(t){return rn(n),Ds()._onAnimationStart(t)})("@transformMenu.done",function(t){return rn(n),Ds()._onAnimationDone(t)}),ps(1,"div",1),Ps(2),gs(),gs()}if(2&t){var i=Ds();ds("id",i.panelId)("ngClass",i._classList)("@transformMenu",i._panelAnimationState),ss("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null)("aria-describedby",i.ariaDescribedby||null)}}var eP={transformMenu:gb("transformMenu",[_b("void",yb({opacity:0,transform:"scale(0.8)"})),wb("void => enter",mb("120ms cubic-bezier(0, 0, 0.2, 1)",yb({opacity:1,transform:"scale(1)"}))),wb("* => void",mb("100ms 25ms linear",yb({opacity:0})))]),fadeInItems:gb("fadeInItems",[_b("showing",yb({opacity:1})),wb("void => *",[yb({opacity:0}),mb("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},nP=new wi("MatMenuContent"),iP=function(){var t=function(){function t(e,n,i,r,a,s,l){o(this,t),this._template=e,this._componentFactoryResolver=n,this._appRef=i,this._injector=r,this._viewContainerRef=a,this._document=s,this._changeDetectorRef=l,this._attached=new U}return s(t,[{key:"attach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._portal||(this._portal=new xy(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new Cy(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}},{key:"detach",value:function(){this._portal.isAttached&&this._portal.detach()}},{key:"ngOnDestroy",value:function(){this._outlet&&this._outlet.dispose()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(lu),hs(Cl),hs(Kc),hs(Ya),hs(pu),hs(uh),hs(eu))},t.\u0275dir=ve({type:t,selectors:[["ng-template","matMenuContent",""]],features:[wl([{provide:nP,useExisting:t}])]}),t}(),rP=new wi("MAT_MENU_PANEL"),oP=yk(mk(function t(){o(this,t)})),aP=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this))._elementRef=t,s._focusMonitor=r,s._parentMenu=a,s.role="menuitem",s._hovered=new U,s._focused=new U,s._highlighted=!1,s._triggersSubmenu=!1,a&&a.addItem&&a.addItem(d(s)),s}return s(n,[{key:"focus",value:function(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}},{key:"ngAfterViewInit",value:function(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}},{key:"ngOnDestroy",value:function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_checkDisabled",value:function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}},{key:"_handleMouseEnter",value:function(){this._hovered.next(this)}},{key:"getLabel",value:function(){for(var t,e,n=this._elementRef.nativeElement.cloneNode(!0),i=n.querySelectorAll("mat-icon, .material-icons"),r=0;r0&&void 0!==arguments[0]?arguments[0]:"program";this.lazyContent?this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){return t._focusFirstItem(e)}):this._focusFirstItem(e)}},{key:"_focusFirstItem",value:function(t){var e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}}},{key:"resetActiveItem",value:function(){this._keyManager.setActiveItem(-1)}},{key:"setElevation",value:function(t){var e=Math.min(4+t,24),n="mat-elevation-z".concat(e),i=Object.keys(this._classList).find(function(t){return t.startsWith("mat-elevation-z")});i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[n]=!0,this._previousElevation=n)}},{key:"setPositionClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.xPosition,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.yPosition,n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e}},{key:"_startAnimation",value:function(){this._panelAnimationState="enter"}},{key:"_resetAnimation",value:function(){this._panelAnimationState="void"}},{key:"_onAnimationDone",value:function(t){this._animationDone.next(t),this._isAnimating=!1}},{key:"_onAnimationStart",value:function(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}},{key:"_updateDirectDescendants",value:function(){var t=this;this._allItems.changes.pipe(zf(this._allItems)).subscribe(function(e){t._directDescendantItems.reset(e.filter(function(e){return e._parentMenu===t})),t._directDescendantItems.notifyOnChanges()})}},{key:"xPosition",get:function(){return this._xPosition},set:function(t){this._xPosition=t,this.setPositionClasses()}},{key:"yPosition",get:function(){return this._yPosition},set:function(t){this._yPosition=t,this.setPositionClasses()}},{key:"overlapTrigger",get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=fv(t)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=fv(t)}},{key:"panelClass",set:function(t){var e=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach(function(t){e._classList[t]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(function(t){e._classList[t]=!0}),this._elementRef.nativeElement.className="")}},{key:"classList",get:function(){return this.panelClass},set:function(t){this.panelClass=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(sP))},t.\u0275dir=ve({type:t,contentQueries:function(t,e,n){var i;1&t&&(tc(n,nP,1),tc(n,aP,1),tc(n,aP,0)),2&t&&(Qu(i=ec())&&(e.lazyContent=i.first),Qu(i=ec())&&(e._allItems=i),Qu(i=ec())&&(e.items=i))},viewQuery:function(t,e){var n;1&t&&Ju(lu,1),2&t&&Qu(n=ec())&&(e.templateRef=n.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t}(),cP=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){return o(this,n),e.call(this,t,i,r)}return n}(uP);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(sP))},t.\u0275cmp=he({type:t,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(t,e){2&t&&ss("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[wl([{provide:rP,useExisting:t}]),Xa],ngContentSelectors:JO,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(Os(),us(0,tP,3,6,"ng-template"))},directives:[Eh],styles:['mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[eP.transformMenu,eP.fadeInItems]},changeDetection:0}),t}(),hP=new wi("mat-menu-scroll-strategy"),dP={provide:hP,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},fP=oy({passive:!0}),pP=function(){var t=function(){function t(e,n,i,r,a,s,l,u){var c=this;o(this,t),this._overlay=e,this._element=n,this._viewContainerRef=i,this._menuItemInstance=s,this._dir=l,this._focusMonitor=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=M.EMPTY,this._hoverSubscription=M.EMPTY,this._menuCloseSubscription=M.EMPTY,this._handleTouchStart=function(t){tb(t)||(c._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Bu,this.onMenuOpen=this.menuOpened,this.menuClosed=new Bu,this.onMenuClose=this.menuClosed,this._scrollStrategy=r,this._parentMaterialMenu=a instanceof uP?a:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,fP),s&&(s._triggersSubmenu=this.triggersSubmenu())}return s(t,[{key:"ngAfterContentInit",value:function(){this._checkMenu(),this._handleHover()}},{key:"ngOnDestroy",value:function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,fP),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}},{key:"triggersSubmenu",value:function(){return!(!this._menuItemInstance||!this._parentMaterialMenu)}},{key:"toggleMenu",value:function(){return this._menuOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay(),n=e.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,e.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(function(){return t.closeMenu()}),this._initMenu(),this.menu instanceof uP&&this.menu._startAnimation()}}},{key:"closeMenu",value:function(){this.menu.close.emit()}},{key:"focus",value:function(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}},{key:"_destroyMenu",value:function(t){var e=this;if(this._overlayRef&&this.menuOpen){var n=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),!this.restoreFocus||"keydown"!==t&&this._openedBy&&this.triggersSubmenu()||this.focus(this._openedBy),this._openedBy=void 0,n instanceof uP?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(Ld(function(t){return"void"===t.toState}),Nf(1),Uv(n.lazyContent._attached)).subscribe({next:function(){return n.lazyContent.detach()},complete:function(){return e._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),n.lazyContent&&n.lazyContent.detach())}}},{key:"_initMenu",value:function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this.menu.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}},{key:"_setMenuElevation",value:function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}},{key:"_setIsMenuOpen",value:function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}},{key:"_checkMenu",value:function(){}},{key:"_createOverlay",value:function(){if(!this._overlayRef){var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}},{key:"_getOverlayConfig",value:function(){return new Zy({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}},{key:"_subscribeToPositions",value:function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe(function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}},{key:"_setPosition",value:function(t){var e=y("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],i=e[1],r=y("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),o=r[0],a=r[1],s=o,l=a,u=n,c=i,h=0;this.triggersSubmenu()?(c=n="before"===this.menu.xPosition?"start":"end",i=u="end"===n?"start":"end",h="bottom"===o?8:-8):this.menu.overlapTrigger||(s="top"===o?"bottom":"top",l="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:u,overlayY:o,offsetY:h},{originX:i,originY:s,overlayX:c,overlayY:o,offsetY:h},{originX:n,originY:l,overlayX:u,overlayY:a,offsetY:-h},{originX:i,originY:l,overlayX:c,overlayY:a,offsetY:-h}])}},{key:"_menuClosingActions",value:function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return dt(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:Pd(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Ld(function(e){return e!==t._menuItemInstance}),Ld(function(){return t._menuOpen})):Pd(),n)}},{key:"_handleMousedown",value:function(t){J_(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;e!==Ey&&e!==Py||(this._openedBy="keyboard"),this.triggersSubmenu()&&(e===Vy&&"ltr"===this.dir||e===Ny&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}},{key:"_handleClick",value:function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}},{key:"_handleHover",value:function(){var t=this;this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Ld(function(e){return e===t._menuItemInstance&&!e.disabled}),pO(0,Ov)).subscribe(function(){t._openedBy="mouse",t.menu instanceof uP&&t.menu._isAnimating?t.menu._animationDone.pipe(Nf(1),pO(0,Ov),Uv(t._parentMaterialMenu._hovered())).subscribe(function(){return t.openMenu()}):t.openMenu()}))}},{key:"_getPortal",value:function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new xy(this.menu.templateRef,this._viewContainerRef)),this._portal}},{key:"_deprecatedMatMenuTriggerFor",get:function(){return this.menu},set:function(t){this.menu=t}},{key:"menu",get:function(){return this._menu},set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(function(t){e._destroyMenu(t),"click"!==t&&"tab"!==t||!e._parentMaterialMenu||e._parentMaterialMenu.closed.emit(t)})))}},{key:"menuOpen",get:function(){return this._menuOpen}},{key:"dir",get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(Tl),hs(pu),hs(hP),hs(rP,8),hs(aP,10),hs(uy,8),hs(ib))},t.\u0275dir=ve({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&Ss("mousedown",function(t){return e._handleMousedown(t)})("keydown",function(t){return e._handleKeydown(t)})("click",function(t){return e._handleClick(t)}),2&t&&ss("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t}(),gP=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[dP],imports:[gk]}),t}(),mP=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[dP],imports:[[Kh,gk,Yk,w_,gP],yy,gk,gP]}),t}(),vP=function(){var t=function(){function t(){o(this,t),this._vertical=!1,this._inset=!1}return s(t,[{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=fv(t)}},{key:"inset",get:function(){return this._inset},set:function(t){this._inset=fv(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(ss("aria-orientation",e.vertical?"vertical":"horizontal"),Gs("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\n"],encapsulation:2,changeDetection:0}),t}(),yP=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk],gk]}),t}(),_P=function(){function t(){}return t.prototype.transform=function(t,e){return t.sort(void 0===e?function(t,e){return t>e?1:-1}:function(t,n){return t[e]>n[e]?1:-1})},t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=ye({name:"sort",type:t,pure:!0}),t}(),bP=["trigger"];function wP(t,e){1&t&&ms(0,"img",36),2&t&&ds("src",Ds().icon,Er)}function xP(t,e){if(1&t){var n=bs();ps(0,"button",46),Ss("click",function(){rn(n);var t=e.$implicit,i=Ds(5);return i.newAction.emit({param:t,table:i})}),gs()}if(2&t){var i=e.$implicit,r=Ds(5);ds("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Dr)}}function kP(t,e){if(1&t&&(vs(0),ps(1,"button",42),tl(2),gs(),ps(3,"mat-menu",43,44),us(5,xP,1,1,"button",45),Ru(6,"sort"),gs(),ys()),2&t){var n=e.$implicit,i=cs(4);Oo(1),ds("matMenuTriggerFor",i),Oo(1),el(n.key),Oo(1),ds("overlapTrigger",!1),Oo(2),ds("ngForOf",Nu(6,4,n.value,"name"))}}function SP(t,e){if(1&t&&(vs(0),ps(1,"mat-menu",37,38),us(3,kP,7,7,"ng-container",39),Ru(4,"keyvalue"),gs(),ps(5,"a",40),ps(6,"i",17),tl(7,"insert_drive_file"),gs(),ps(8,"span",41),ps(9,"uds-translate"),tl(10,"New"),gs(),gs(),ps(11,"i",17),tl(12,"arrow_drop_down"),gs(),gs(),ys()),2&t){var n=cs(2),i=Ds(3);Oo(1),ds("overlapTrigger",!1),Oo(2),ds("ngForOf",Lu(4,3,i.grpTypes)),Oo(2),ds("matMenuTriggerFor",n)}}function CP(t,e){if(1&t){var n=bs();ps(0,"button",46),Ss("click",function(){rn(n);var t=e.$implicit,i=Ds(4);return i.newAction.emit({param:t,table:i})}),gs()}if(2&t){var i=e.$implicit,r=Ds(4);ds("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Dr)}}function AP(t,e){if(1&t&&(vs(0),ps(1,"mat-menu",37,38),us(3,CP,1,1,"button",45),Ru(4,"sort"),gs(),ps(5,"a",40),ps(6,"i",17),tl(7,"insert_drive_file"),gs(),ps(8,"span",41),ps(9,"uds-translate"),tl(10,"New"),gs(),gs(),ps(11,"i",17),tl(12,"arrow_drop_down"),gs(),gs(),ys()),2&t){var n=cs(2),i=Ds(3);Oo(1),ds("overlapTrigger",!1),Oo(2),ds("ngForOf",Nu(4,3,i.oTypes,"name")),Oo(2),ds("matMenuTriggerFor",n)}}function MP(t,e){if(1&t&&(vs(0),us(1,SP,13,5,"ng-container",8),us(2,AP,13,6,"ng-container",8),ys()),2&t){var n=Ds(2);Oo(1),ds("ngIf",n.newGrouped),Oo(1),ds("ngIf",!n.newGrouped)}}function IP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",47),Ss("click",function(){rn(n);var t=Ds(2);return t.newAction.emit({param:void 0,table:t})}),ps(2,"i",17),tl(3,"insert_drive_file"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"New"),gs(),gs(),gs(),ys()}}function TP(t,e){if(1&t&&(vs(0),us(1,MP,3,2,"ng-container",8),us(2,IP,7,0,"ng-container",8),ys()),2&t){var n=Ds();Oo(1),ds("ngIf",null!=n.oTypes&&0!=n.oTypes.length),Oo(1),ds("ngIf",null!=n.oTypes&&0==n.oTypes.length)}}function DP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",48),Ss("click",function(){rn(n);var t=Ds();return t.emitIfSelection(t.editAction)}),ps(2,"i",17),tl(3,"edit"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Edit"),gs(),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(1),ds("disabled",1!=i.selection.selected.length)}}function EP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",48),Ss("click",function(){return rn(n),Ds().permissions()}),ps(2,"i",17),tl(3,"perm_identity"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Permissions"),gs(),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(1),ds("disabled",1!=i.selection.selected.length)}}function OP(t,e){if(1&t){var n=bs();ps(0,"a",50),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(2).emitCustom(t)}),gs()}if(2&t){var i=e.$implicit;ds("disabled",Ds(2).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function PP(t,e){if(1&t&&(vs(0),us(1,OP,1,2,"a",49),ys()),2&t){var n=Ds();Oo(1),ds("ngForOf",n.getcustomButtons())}}function RP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",51),Ss("click",function(){return rn(n),Ds().export()}),ps(2,"i",17),tl(3,"import_export"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Export"),gs(),gs(),gs(),ys()}}function LP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",52),Ss("click",function(){rn(n);var t=Ds();return t.emitIfSelection(t.deleteAction,!0)}),ps(2,"i",17),tl(3,"delete_forever"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Delete"),gs(),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(1),ds("disabled",i.selection.isEmpty())}}function NP(t,e){if(1&t){var n=bs();ps(0,"button",53),Ss("click",function(){rn(n);var t=Ds();return t.filterText="",t.applyFilter()}),ps(1,"i",17),tl(2,"close"),gs(),gs()}}function FP(t,e){1&t&&ms(0,"mat-header-cell")}function VP(t,e){1&t&&(ps(0,"i",17),tl(1,"check_box"),gs())}function zP(t,e){1&t&&(ps(0,"i",17),tl(1,"check_box_outline_blank"),gs())}function BP(t,e){if(1&t){var n=bs();ps(0,"mat-cell",56),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds(2).clickRow(i,t)}),us(1,VP,2,0,"i",57),us(2,zP,2,0,"ng-template",null,58,oc),gs()}if(2&t){var i=e.$implicit,r=cs(3),o=Ds(2);Oo(1),ds("ngIf",o.selection.isSelected(i))("ngIfElse",r)}}function HP(t,e){1&t&&(vs(0,54),us(1,FP,1,0,"mat-header-cell",22),us(2,BP,4,2,"mat-cell",55),ys())}function jP(t,e){1&t&&ms(0,"mat-header-cell")}function GP(t,e){if(1&t){var n=bs();ps(0,"mat-cell"),ps(1,"div",59),Ss("click",function(t){rn(n);var i=e.$implicit,r=Ds();return r.detailAction.emit({param:i,table:r}),t.stopPropagation()}),ps(2,"i",17),tl(3,"subdirectory_arrow_right"),gs(),gs(),gs()}}function UP(t,e){if(1&t&&(ps(0,"mat-header-cell",63),tl(1),gs()),2&t){var n=Ds().$implicit;Oo(1),el(n.title)}}function WP(t,e){if(1&t){var n=bs();ps(0,"mat-cell",64),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds(2).clickRow(i,t)})("contextmenu",function(t){rn(n);var i=e.$implicit;return Ds(2).onContextMenu(i,t)}),ms(1,"div",65),gs()}if(2&t){var i=e.$implicit,r=Ds().$implicit,o=Ds();Oo(1),ds("innerHtml",o.getRowColumn(i,r),Dr)}}function YP(t,e){1&t&&(vs(0,60),us(1,UP,2,1,"mat-header-cell",61),us(2,WP,2,1,"mat-cell",62),ys()),2&t&&Rs("matColumnDef",e.$implicit.name)}function qP(t,e){1&t&&ms(0,"mat-header-row")}function XP(t,e){if(1&t&&ms(0,"mat-row",66),2&t){var n=e.$implicit;ds("ngClass",Ds().rowClass(n))}}function ZP(t,e){if(1&t&&(ps(0,"div",67),tl(1),ps(2,"uds-translate"),tl(3,"Selected items"),gs(),gs()),2&t){var n=Ds();Oo(1),nl(" ",n.selection.selected.length," ")}}function KP(t,e){if(1&t){var n=bs();ps(0,"button",71),Ss("click",function(){rn(n);var t=Ds().item,e=Ds();return e.detailAction.emit({param:t,table:e})}),ps(1,"i",72),tl(2,"subdirectory_arrow_right"),gs(),ps(3,"uds-translate"),tl(4,"Detail"),gs(),gs()}}function $P(t,e){if(1&t){var n=bs();ps(0,"button",71),Ss("click",function(){rn(n);var t=Ds(2);return t.emitIfSelection(t.editAction)}),ps(1,"i",72),tl(2,"edit"),gs(),ps(3,"uds-translate"),tl(4,"Edit"),gs(),gs()}}function QP(t,e){if(1&t){var n=bs();ps(0,"button",71),Ss("click",function(){return rn(n),Ds(2).permissions()}),ps(1,"i",72),tl(2,"perm_identity"),gs(),ps(3,"uds-translate"),tl(4,"Permissions"),gs(),gs()}}function JP(t,e){if(1&t){var n=bs();ps(0,"button",73),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(2).emitCustom(t)}),gs()}if(2&t){var i=e.$implicit;ds("disabled",Ds(2).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function tR(t,e){if(1&t){var n=bs();ps(0,"button",74),Ss("click",function(){rn(n);var t=Ds(2);return t.emitIfSelection(t.deleteAction)}),ps(1,"i",72),tl(2,"delete_forever"),gs(),ps(3,"uds-translate"),tl(4,"Delete"),gs(),gs()}}function eR(t,e){if(1&t){var n=bs();ps(0,"button",73),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(3).emitCustom(t)}),gs()}if(2&t){var i=e.$implicit;ds("disabled",Ds(3).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function nR(t,e){if(1&t&&(vs(0),ms(1,"mat-divider"),us(2,eR,1,2,"button",69),ys()),2&t){var n=Ds(2);Oo(2),ds("ngForOf",n.getCustomAccelerators())}}function iR(t,e){if(1&t&&(us(0,KP,5,0,"button",68),us(1,$P,5,0,"button",68),us(2,QP,5,0,"button",68),us(3,JP,1,2,"button",69),us(4,tR,5,0,"button",70),us(5,nR,3,1,"ng-container",8)),2&t){var n=Ds();ds("ngIf",n.detailAction.observers.length>0),Oo(1),ds("ngIf",n.editAction.observers.length>0),Oo(1),ds("ngIf",!0===n.hasPermissions),Oo(1),ds("ngForOf",n.getCustomMenu()),Oo(1),ds("ngIf",n.deleteAction.observers.length>0),Oo(1),ds("ngIf",n.hasAccelerators)}}var rR=function(){return[5,10,25,100,1e3]},oR=function(){function t(t){this.api=t,this.pageSize=10,this.newGrouped=!1,this.loaded=new Bu,this.rowSelected=new Bu,this.newAction=new Bu,this.editAction=new Bu,this.deleteAction=new Bu,this.customButtonAction=new Bu,this.detailAction=new Bu,this.title="",this.subtitle="",this.displayedColumns=[],this.columns=[],this.rowStyleInfo=null,this.dataSource=new dO([]),this.firstLoad=!0,this.loading=!1,this.lastClickInfo={time:0,x:-1e4,y:-1e4},this.contextMenuPosition={x:"0px",y:"0px"},this.filterText=""}return t.prototype.ngOnInit=function(){var t=this;this.hasCustomButtons=void 0!==this.customButtons&&0!==this.customButtons.length&&0!==this.customButtonAction.observers.length&&this.getcustomButtons().length>0,this.hasAccelerators=this.getCustomAccelerators().length>0,this.hasButtons=this.hasCustomButtons||0!==this.detailAction.observers.length||0!==this.editAction.observers.length||this.hasPermissions||0!==this.deleteAction.observers.length,this.hasActions=this.hasButtons||void 0!==this.customButtons&&this.customButtons.length>0,this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=function(t,e){if(!(e in t))return"";var n=t[e];return"number"==typeof n?n:"string"==typeof n?n.toLocaleLowerCase():(null===n&&(n=7226578800),n.changingThisBreaksApplicationSecurity&&(n=n.changingThisBreaksApplicationSecurity),(""+n).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase())},this.dataSource.filterPredicate=function(e,n){try{t.columns.forEach(function(t){if((""+e[t.name]).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase().includes(n))throw Error()})}catch(i){return!0}return!1},this.dataSource.sort.active=this.api.getFromStorage(this.tableId+"sort-column")||"name",this.dataSource.sort.direction=this.api.getFromStorage(this.tableId+"sort-direction")||"asc",this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.selection=new py(!0===this.multiSelect,[]);var e=this.rest.permision();0==(e&mI.MANAGEMENT)&&(this.newAction.observers.length=0,this.editAction.observers.length=0,this.deleteAction.observers.length=0,this.customButtonAction.observers.length=0),e!==mI.ALL&&(this.hasPermissions=!1),void 0!==this.icon&&(this.icon=this.api.staticURL("admin/img/icons/"+this.icon+".png")),this.rest.types().subscribe(function(e){t.rest.tableInfo().subscribe(function(n){t.initialize(n,e)})})},t.prototype.initialize=function(t,e){var n=this;this.oTypes=e,this.types=new Map,this.grpTypes=new Map,e.forEach(function(t){n.types.set(t.type,t),void 0!==t.group&&(n.grpTypes.has(t.group)||n.grpTypes.set(t.group,[]),n.grpTypes.get(t.group).push(t))}),this.rowStyleInfo=void 0!==t["row-style"]&&void 0!==t["row-style"].field?t["row-style"]:null,this.title=t.title,this.subtitle=t.subtitle||"",this.hasButtons&&this.displayedColumns.push("selection-column");var i=[];t.fields.forEach(function(t){for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];i.push({name:e,title:r.title,type:void 0===r.type?PM.ALPHANUMERIC:r.type,dict:r.dict}),(void 0===r.visible||r.visible)&&n.displayedColumns.push(e)}}),this.columns=i,this.detailAction.observers.length>0&&this.displayedColumns.push("detail-column"),this.overview()},t.prototype.overview=function(){var t=this;this.loading||(this.selection.clear(),this.dataSource.data=[],this.loading=!0,this.rest.overview().subscribe(function(e){t.loading=!1,void 0!==t.onItem&&e.forEach(function(e){t.onItem(e)}),t.dataSource.data=e,t.loaded.emit({param:t.firstLoad,table:t}),t.firstLoad=!1},function(e){t.loading=!1}))},t.prototype.getcustomButtons=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type!==RM.ONLY_MENU&&t.type!==RM.ACCELERATOR}):[]},t.prototype.getCustomMenu=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type!==RM.ACCELERATOR}):[]},t.prototype.getCustomAccelerators=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type===RM.ACCELERATOR}):[]},t.prototype.getRowColumn=function(t,e){var n=t[e.name];switch(e.type){case PM.IMAGE:return this.api.safeString(this.api.gui.icon(n,"48px"));case PM.DATE:n=qI("SHORT_DATE_FORMAT",n);break;case PM.DATETIME:n=qI("SHORT_DATETIME_FORMAT",n);break;case PM.TIME:n=qI("TIME_FORMAT",n);break;case PM.DATETIMESEC:n=qI("SHORT_DATE_FORMAT",n," H:i:s");break;case PM.ICON:try{n=this.api.gui.icon(this.types.get(t.type).icon)+n}catch(i){}return this.api.safeString(n);case PM.CALLBACK:break;case PM.DICTIONARY:try{n=e.dict[n]}catch(i){n=""}}return n},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage(this.tableId+"sort-column",t.active),this.api.putOnStorage(this.tableId+"sort-direction",t.direction)},t.prototype.rowClass=function(t){var e=[];return this.selection.isSelected(t)&&e.push("selected"),null!==this.rowStyleInfo&&e.push(this.rowStyleInfo.prefix+t[this.rowStyleInfo.field]),e},t.prototype.emitIfSelection=function(t,e){void 0===e&&(e=!1);var n=this.selection.selected.length;n>0&&(!0!==e&&1!==n||t.emit({table:this,param:n}))},t.prototype.isCustomDisabled=function(t){switch(t.type){case void 0:case RM.SINGLE_SELECT:return 1!==this.selection.selected.length||!0===t.disabled;case RM.MULTI_SELECT:return this.selection.isEmpty()||!0===t.disabled;default:return!1}},t.prototype.emitCustom=function(t){(this.selection.selected.length||t.type===RM.ALWAYS)&&(t.type===RM.ACCELERATOR?this.api.navigation.goto(t.id,this.selection.selected[0],t.acceleratorProperties):this.customButtonAction.emit({param:t,table:this}))},t.prototype.clickRow=function(t,e){var n=(new Date).getTime();if((this.detailAction.observers.length||this.editAction.observers.length)&&Math.abs(this.lastClickInfo.x-e.x)<16&&Math.abs(this.lastClickInfo.y-e.y)<16&&n-this.lastClickInfo.time<250)return this.selection.clear(),this.selection.select(t),void(this.detailAction.observers.length?this.detailAction.emit({param:t,table:this}):this.emitIfSelection(this.editAction,!1));this.lastClickInfo={time:n,x:e.x,y:e.y},this.doSelect(t,e)},t.prototype.doSelect=function(t,e){if(e.ctrlKey)this.lastSel=t,this.selection.toggle(t);else if(e.shiftKey){if(this.selection.isEmpty())this.selection.toggle(t);else if(this.selection.clear(),this.lastSel!==t)for(var n=!1,i=0,r=this.dataSource.sortData(this.dataSource.data,this.dataSource.sort);i0),Oo(1),ds("ngIf",e.editAction.observers.length>0),Oo(1),ds("ngIf",!0===e.hasPermissions),Oo(1),ds("ngIf",e.hasCustomButtons),Oo(1),ds("ngIf",1==e.allowExport),Oo(1),ds("ngIf",e.deleteAction.observers.length>0),Oo(7),ds("ngModel",e.filterText),Oo(1),ds("ngIf",e.filterText),Oo(2),ds("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",Iu(27,rR))("showFirstLastButtons",!0),Oo(6),ds("dataSource",e.dataSource),Oo(1),ds("ngIf",e.hasButtons),Oo(4),ds("ngForOf",e.columns),Oo(1),ds("matHeaderRowDef",e.displayedColumns),Oo(1),ds("matRowDefColumns",e.displayedColumns),Oo(1),ds("hidden",!e.loading),Oo(5),ds("ngIf",e.hasButtons&&e.selection.selected.length>0),Oo(1),js("left",e.contextMenuPosition.x)("top",e.contextMenuPosition.y),ds("matMenuTriggerFor",n)}},directives:[Lh,VS,nD,CO,QS,AC,eA,YD,NS,UE,JD,KE,XE,YE,Ph,nO,rO,KO,pP,cP,iP,aP,LS,$T,QE,tO,oE,aO,lO,Eh,vP],pipes:[Xh,_P],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.buttons[_ngcontent-%COMP%], .header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.buttons[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-right:1em;margin-bottom:1em}.buttons[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{margin-right:.4rem}.buttons[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]:hover:not([disabled]){background-color:#000;color:#fff}button.mat-menu-item[_ngcontent-%COMP%]{height:32px;line-height:32px}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.footer[_ngcontent-%COMP%]{margin:1em;display:flex;justify-content:flex-end}mat-cell[_ngcontent-%COMP%]:first-of-type, mat-header-cell[_ngcontent-%COMP%]:first-of-type{padding-left:.5rem}mat-row[_ngcontent-%COMP%]:hover{background-color:#f0f8ff;cursor:pointer}mat-table[_ngcontent-%COMP%]{width:100%;font-weight:300}.mat-column-detail-column[_ngcontent-%COMP%]{max-width:1.5rem;justify-content:center;color:#000!important;padding-right:.5rem}.detail-launcher[_ngcontent-%COMP%]{display:none}.mat-row[_ngcontent-%COMP%]:hover .detail-launcher[_ngcontent-%COMP%]{display:block}.mat-column-selection-column[_ngcontent-%COMP%]{max-width:2rem;justify-content:center;color:#000!important}.menu-warn[_ngcontent-%COMP%]{color:red}.menu-link[_ngcontent-%COMP%]{color:#00f}.loading[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center} .mat-menu-panel{min-height:48px} .mat-paginator-range-label{min-width:6em}"]}),t}(),aR='pause'+django.gettext("Maintenance")+"",sR='pause'+django.gettext("Exit maintenance mode")+"",lR='pause'+django.gettext("Enter maintenance mode")+"",uR=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"maintenance",html:aR,type:RM.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New provider"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit provider"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete provider"))},t.prototype.onMaintenance=function(t){var e=this,n=t.table.selection.selected[0],i=n.maintenance_mode?django.gettext("Exit maintenance mode?"):django.gettext("Enter maintenance mode?");this.api.gui.yesno(django.gettext("Maintenance mode for")+" "+n.name,i).subscribe(function(i){i&&e.rest.providers.maintenance(n.id).subscribe(function(){t.table.overview()})})},t.prototype.onRowSelect=function(t){var e=t.table;this.customButtons[0].html=e.selection.selected.length>1||0===e.selection.selected.length?aR:e.selection.selected[0].maintenance_mode?sR:lR},t.prototype.onDetail=function(t){this.api.navigation.gotoService(t.param.id)},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("provider"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-services"]],decls:1,vars:7,consts:[["tableId","service-providers","icon","providers",3,"rest","onItem","multiSelect","allowExport","hasPermissions","customButtons","pageSize","customButtonAction","newAction","editAction","deleteAction","rowSelected","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("customButtonAction",function(t){return e.onMaintenance(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("rowSelected",function(t){return e.onRowSelect(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.providers)("onItem",e.processElement)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".row-maintenance-true>mat-cell{color:orange!important} .mat-column-maintenance_state, .mat-column-services_count, .mat-column-user_services_count{max-width:7rem;justify-content:center}"]}),t}(),cR=function(){function t(t,e,n,i){this.title=t,this.data=e,this.columns=n,this.id=i,this.columnsDefinition=Array.from(n,function(t){var e={};return e[t.field]={visible:!0,title:t.title,type:void 0===t.type?PM.ALPHANUMERIC:t.type},e})}return t.prototype.get=function(t){return Tf},t.prototype.getLogs=function(t){return Tf},t.prototype.overview=function(t){return"function"==typeof this.data?this.data():Pd([])},t.prototype.summary=function(t){return this.overview()},t.prototype.put=function(t,e){return Tf},t.prototype.create=function(t){return Tf},t.prototype.save=function(t,e){return Tf},t.prototype.test=function(t,e){return Tf},t.prototype.delete=function(t){return Tf},t.prototype.permision=function(){return mI.ALL},t.prototype.getPermissions=function(t){return Tf},t.prototype.addPermission=function(t,e,n,i){return Tf},t.prototype.revokePermission=function(t){return Tf},t.prototype.types=function(){return Pd([])},t.prototype.gui=function(t){return Tf},t.prototype.callback=function(t,e){return Tf},t.prototype.tableInfo=function(){return Pd({fields:this.columnsDefinition,title:this.title})},t.prototype.detail=function(t,e){return null},t.prototype.invoke=function(t,e){return Tf},t}();function hR(t,e){if(1&t){var n=bs();ps(0,"button",24),Ss("click",function(){rn(n);var t=Ds();return t.filterText="",t.applyFilter()}),ps(1,"i",8),tl(2,"close"),gs(),gs()}}function dR(t,e){if(1&t&&(ps(0,"mat-header-cell",28),tl(1),gs()),2&t){var n=Ds().$implicit;Oo(1),el(n)}}function fR(t,e){if(1&t&&(ps(0,"mat-cell"),ms(1,"div",29),gs()),2&t){var n=e.$implicit,i=Ds().$implicit,r=Ds();Oo(1),ds("innerHtml",r.getRowColumn(n,i),Dr)}}function pR(t,e){1&t&&(vs(0,25),us(1,dR,2,1,"mat-header-cell",26),us(2,fR,2,1,"mat-cell",27),ys()),2&t&&ds("matColumnDef",e.$implicit)}function gR(t,e){1&t&&ms(0,"mat-header-row")}function mR(t,e){if(1&t&&ms(0,"mat-row",30),2&t){var n=e.$implicit;ds("ngClass",Ds().rowClass(n))}}var vR=function(){return[5,10,25,100,1e3]},yR=function(){function t(t){this.api=t,this.pageSize=10,this.filterText="",this.title="Logs",this.displayedColumns=["date","level","source","message"],this.columns=[],this.dataSource=new dO([]),this.selection=new py}return t.prototype.ngOnInit=function(){var t=this;this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sort.active=this.api.getFromStorage("logs-sort-column")||"date",this.dataSource.sort.direction=this.api.getFromStorage("logs-sort-direction")||"desc",this.displayedColumns.forEach(function(e){t.columns.push({name:e,title:e,type:"date"===e?PM.DATETIMESEC:PM.ALPHANUMERIC})}),this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.overview()},t.prototype.overview=function(){var t=this;this.rest.getLogs(this.itemId).subscribe(function(e){t.dataSource.data=e})},t.prototype.selectElement=function(t,e){},t.prototype.getRowColumn=function(t,e){var n=t[e];return"date"===e?n=qI("SHORT_DATE_FORMAT",n," H:i:s"):"level"===e&&(n={1e4:"OTHER",2e4:"DEBUG",3e4:"INFO",4e4:"WARN",5e4:"ERROR",6e4:"FATAL"}[n]||"OTHER"),n},t.prototype.rowClass=function(t){return["level-"+t.level]},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage("logs-sort-column",t.active),this.api.putOnStorage("logs-sort-direction",t.direction)},t.prototype.export=function(){WO(this)},t.prototype.keyDown=function(t){switch(t.keyCode){case Ly:this.paginator.firstPage(),t.preventDefault();break;case Ry:this.paginator.lastPage(),t.preventDefault();break;case Vy:this.paginator.nextPage(),t.preventDefault();break;case Ny:this.paginator.previousPage(),t.preventDefault()}},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-logs-table"]],viewQuery:function(t,e){if(1&t&&(Ju(YD,3),Ju(JD,3)),2&t){var n=void 0;Qu(n=ec())&&(e.paginator=n.first),Qu(n=ec())&&(e.sort=n.first)}},inputs:{rest:"rest",itemId:"itemId",tableId:"tableId",pageSize:"pageSize"},decls:36,vars:12,consts:[[1,"card"],[1,"card-header"],[1,"card-title"],[3,"src"],[1,"card-content"],[1,"header"],[1,"buttons"],["mat-raised-button","",3,"click"],[1,"material-icons"],[1,"button-text"],[1,"navigation"],[1,"filter"],["matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"paginator"],[3,"pageSize","hidePageSize","pageSizeOptions","showFirstLastButtons"],[1,"reload"],["mat-icon-button","",3,"click"],["tabindex","0",1,"table",3,"keydown"],["matSort","",3,"dataSource","matSortChange"],[3,"matColumnDef",4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[3,"ngClass",4,"matRowDef","matRowDefColumns"],[1,"footer"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"matColumnDef"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["mat-sort-header",""],[3,"innerHtml"],[3,"ngClass"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"div",2),ms(3,"img",3),tl(4," \xa0"),ps(5,"uds-translate"),tl(6,"Logs"),gs(),gs(),gs(),ps(7,"div",4),ps(8,"div",5),ps(9,"div",6),ps(10,"a",7),Ss("click",function(){return e.export()}),ps(11,"i",8),tl(12,"import_export"),gs(),ps(13,"span",9),ps(14,"uds-translate"),tl(15,"Export"),gs(),gs(),gs(),gs(),ps(16,"div",10),ps(17,"div",11),ps(18,"uds-translate"),tl(19,"Filter"),gs(),tl(20,"\xa0 "),ps(21,"mat-form-field"),ps(22,"input",12),Ss("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.filterText=t}),gs(),us(23,hR,3,0,"button",13),gs(),gs(),ps(24,"div",14),ms(25,"mat-paginator",15),gs(),ps(26,"div",16),ps(27,"a",17),Ss("click",function(){return e.overview()}),ps(28,"i",8),tl(29,"autorenew"),gs(),gs(),gs(),gs(),gs(),ps(30,"div",18),Ss("keydown",function(t){return e.keyDown(t)}),ps(31,"mat-table",19),Ss("matSortChange",function(t){return e.sortChanged(t)}),us(32,pR,3,1,"ng-container",20),us(33,gR,1,0,"mat-header-row",21),us(34,mR,1,1,"mat-row",22),gs(),gs(),ms(35,"div",23),gs(),gs()),2&t&&(Oo(3),ds("src",e.api.staticURL("admin/img/icons/logs.png"),Er),Oo(19),ds("ngModel",e.filterText),Oo(1),ds("ngIf",e.filterText),Oo(2),ds("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",Iu(11,vR))("showFirstLastButtons",!0),Oo(6),ds("dataSource",e.dataSource),Oo(1),ds("ngForOf",e.displayedColumns),Oo(1),ds("matHeaderRowDef",e.displayedColumns),Oo(1),ds("matRowDefColumns",e.displayedColumns))},directives:[VS,NS,nD,CO,QS,AC,eA,Lh,YD,UE,JD,Ph,nO,rO,LS,$T,KE,XE,YE,QE,oE,tO,aO,lO,Eh],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.header[_ngcontent-%COMP%], .navigation[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.navigation[_ngcontent-%COMP%]{justify-content:flex-start}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.mat-column-date[_ngcontent-%COMP%]{max-width:160px}.mat-column-level[_ngcontent-%COMP%]{max-width:96px;text-align:center}.mat-column-source[_ngcontent-%COMP%]{max-width:128px} .level-50000>.mat-cell, .level-60000>.mat-cell{color:#ff1e1e!important} .level-40000>.mat-cell{color:#d65014!important}"]}),t}();function _R(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services pools"),gs())}function bR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}var wR=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],xR=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.customButtons=[WM.getGotoButton(FM,"id")],this.services=i.services,this.service=i.service}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{service:i,services:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.servicePools=new cR(django.gettext("Service pools"),function(){return t.services.invoke(t.service.id+"/servicesPools")},wR,this.service.id+"infopsls")},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-information"]],decls:17,vars:8,consts:[["mat-dialog-title",""],["mat-tab-label",""],[3,"rest","customButtons","pageSize"],[1,"content"],[3,"rest","itemId","tableId","pageSize"],["mat-raised-button","","mat-dialog-close","","color","primary"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Information for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"mat-tab-group"),ps(6,"mat-tab"),us(7,_R,2,0,"ng-template",1),ms(8,"uds-table",2),gs(),ps(9,"mat-tab"),us(10,bR,2,0,"ng-template",1),ps(11,"div",3),ms(12,"uds-logs-table",4),gs(),gs(),gs(),gs(),ps(13,"mat-dialog-actions"),ps(14,"button",5),ps(15,"uds-translate"),tl(16,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.service.name,"\n"),Oo(5),ds("rest",e.servicePools)("customButtons",e.customButtons)("pageSize",6),Oo(4),ds("rest",e.services)("itemId",e.service.id)("tableId","serviceInfo-d-log"+e.service.id)("pageSize",5))},directives:[SS,VS,CS,JA,GA,zA,oR,yR,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.mat-column-count[_ngcontent-%COMP%], .mat-column-image[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{max-width:7rem;justify-content:center}.navigation[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:flex-end;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}"]}),t}();function kR(t,e){if(1&t&&(ps(0,"div",3),ms(1,"div",4),ms(2,"div",5),gs()),2&t){var n=e.$implicit;Oo(1),ds("innerHTML",n.gui.label,Dr),Oo(1),ds("innerHTML",n.value,Dr)}}var SR=function(){function t(t){this.api=t,this.displayables=null}return t.prototype.ngOnInit=function(){this.processFields()},t.prototype.processFields=function(){var t=this;if(!this.gui||!this.value)return[];var e=this.gui.filter(function(t){return t.gui.type!==WS.HIDDEN});e.forEach(function(e){var n=t.value[e.name];switch(e.gui.type){case WS.CHECKBOX:e.value=n?django.gettext("Yes"):django.gettext("No");break;case WS.PASSWORD:e.value=django.gettext("(hidden)");break;case WS.CHOICE:var i=YS.locateChoice(n,e);e.value=i.text;break;case WS.MULTI_CHOICE:e.value=django.gettext("Selected items :")+n.length;break;case WS.IMAGECHOICE:i=YS.locateChoice(n,e),e.value=t.api.safeString(t.api.gui.icon(i.img)+" "+i.text);break;default:e.value=n}""!==e.value&&null!=e.value||(e.value="(empty)")}),this.displayables=e},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-information"]],inputs:{value:"value",gui:"gui"},decls:4,vars:1,consts:[[1,"card"],[1,"card-content"],["class","item",4,"ngFor","ngForOf"],[1,"item"],[1,"label",3,"innerHTML"],[1,"value",3,"innerHTML"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),us(2,kR,3,2,"div",2),gs(),ms(3,"div"),gs()),2&t&&(Oo(2),ds("ngForOf",e.displayables))},directives:[Ph],styles:[".card-content[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column}.item[_ngcontent-%COMP%]{padding-bottom:.5rem;display:flex}.label[_ngcontent-%COMP%]{font-weight:700;width:32rem;overflow-x:hidden;text-overflow:ellipsis;text-align:end;margin-right:1rem;align-self:center}"]}),t}();function CR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function AR(t,e){if(1&t&&ms(0,"uds-information",15),2&t){var n=Ds(2);ds("value",n.provider)("gui",n.gui)}}function MR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services"),gs())}function IR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Usage"),gs())}function TR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function DR(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,CR,2,0,"ng-template",9),ps(5,"div",10),us(6,AR,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,MR,2,0,"ng-template",9),ps(9,"div",10),ps(10,"uds-table",12),Ss("newAction",function(t){return rn(n),Ds().onNewService(t)})("editAction",function(t){return rn(n),Ds().onEditService(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteService(t)})("customButtonAction",function(t){return rn(n),Ds().onInformation(t)})("loaded",function(t){return rn(n),Ds().onLoad(t)}),gs(),gs(),gs(),ps(11,"mat-tab"),us(12,IR,2,0,"ng-template",9),ps(13,"div",10),ps(14,"uds-table",13),Ss("deleteAction",function(t){return rn(n),Ds().onDeleteUsage(t)}),gs(),gs(),gs(),ps(15,"mat-tab"),us(16,TR,2,0,"ng-template",9),ps(17,"div",10),ms(18,"uds-logs-table",14),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("selectedIndex",i.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",i.provider&&i.gui),Oo(4),ds("rest",i.services)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-services"+i.provider.id),Oo(4),ds("rest",i.usage)("multiSelect",!0)("allowExport",!0)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-usage"+i.provider.id),Oo(4),ds("rest",i.services.parentModel)("itemId",i.provider.id)("tableId","providers-d-log"+i.provider.id)}}var ER=function(t){return["/providers",t]},OR=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:RM.ONLY_MENU}],this.provider=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("provider");this.services=this.rest.providers.detail(e,"services"),this.usage=this.rest.providers.detail(e,"usage"),this.services.parentModel.get(e).subscribe(function(e){t.provider=e,t.services.parentModel.gui(e.type).subscribe(function(e){t.gui=e})})},t.prototype.onInformation=function(t){xR.launch(this.api,this.services,t.table.selection.selected[0])},t.prototype.onNewService=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New service"),!1)},t.prototype.onEditService=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit service"),!1)},t.prototype.onDeleteService=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service"))},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user service"))},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("service");if(void 0!==e){this.selectedTab=1;var n=t.table;n.dataSource.data.forEach(function(t){t.id===e&&n.selection.select(t)})}}},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-services-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","providers",3,"rest","multiSelect","allowExport","customButtons","pageSize","tableId","newAction","editAction","deleteAction","customButtonAction","loaded"],["icon","usage",3,"rest","multiSelect","allowExport","pageSize","tableId","deleteAction"],[3,"rest","itemId","tableId"],[3,"value","gui"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,DR,19,17,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,ER,e.services.parentId)),Oo(4),ds("src",e.api.staticURL("admin/img/icons/services.png"),Er),Oo(1),nl(" \xa0",null==e.provider?null:e.provider.name," "),Oo(1),ds("ngIf",null!==e.provider))},directives:[Gm,Lh,JA,GA,zA,oR,yR,VS,SR],styles:[""]}),t}(),PR=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("authenticator")},t.prototype.onDetail=function(t){this.api.navigation.gotoAuthenticatorDetail(t.param.id)},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Authenticator"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Authenticator"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Authenticator"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("authenticator"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible)},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-authenticators"]],decls:2,vars:6,consts:[["icon","authenticators",3,"rest","multiSelect","allowExport","hasPermissions","onItem","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.authenticators)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),RR=["panel"];function LR(t,e){if(1&t&&(ps(0,"div",0,1),Ps(2),gs()),2&t){var n=e.id,i=Ds();ds("id",i.id)("ngClass",i._classList),ss("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(n))}}var NR=["*"],FR=0,VR=function t(e,n){o(this,t),this.source=e,this.option=n},zR=yk(function t(){o(this,t)}),BR=new wi("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}}),HR=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this))._changeDetectorRef=t,s._elementRef=i,s._activeOptionChanges=M.EMPTY,s.showPanel=!1,s._isOpen=!1,s.displayWith=null,s.optionSelected=new Bu,s.opened=new Bu,s.closed=new Bu,s.optionActivated=new Bu,s._classList={},s.id="mat-autocomplete-".concat(FR++),s.inertGroups=(null==a?void 0:a.SAFARI)||!1,s._autoActiveFirstOption=!!r.autoActiveFirstOption,s}return s(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new H_(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(function(e){t.optionActivated.emit({source:t,option:t.options.toArray()[e]||null})}),this._setVisibility()}},{key:"ngOnDestroy",value:function(){this._activeOptionChanges.unsubscribe()}},{key:"_setScrollTop",value:function(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}},{key:"_getScrollTop",value:function(){return this.panel?this.panel.nativeElement.scrollTop:0}},{key:"_setVisibility",value:function(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}},{key:"_emitSelectEvent",value:function(t){var e=new VR(this,t);this.optionSelected.emit(e)}},{key:"_getPanelAriaLabelledby",value:function(t){return this.ariaLabel?null:this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}},{key:"_setVisibilityClasses",value:function(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}},{key:"isOpen",get:function(){return this._isOpen&&this.showPanel}},{key:"autoActiveFirstOption",get:function(){return this._autoActiveFirstOption},set:function(t){this._autoActiveFirstOption=fv(t)}},{key:"classList",set:function(t){this._classList=t&&t.length?_v(t).reduce(function(t,e){return t[e]=!0,t},{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}}]),n}(zR);return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs(Tl),hs(BR),hs(ey))},t.\u0275dir=ve({type:t,viewQuery:function(t,e){var n;1&t&&(Ju(lu,3),Ju(RR,1)),2&t&&(Qu(n=ec())&&(e.template=n.first),Qu(n=ec())&&(e.panel=n.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[Xa]}),t}(),jR=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._visibleClass="mat-autocomplete-visible",t._hiddenClass="mat-autocomplete-hidden",t}return n}(HR);return t.\u0275fac=function(e){return GR(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,Jk,1),tc(n,iS,1)),2&t&&(Qu(i=ec())&&(e.optionGroups=i),Qu(i=ec())&&(e.options=i))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[wl([{provide:Zk,useExisting:t}]),Xa],ngContentSelectors:NR,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(Os(),us(0,LR,3,4,"ng-template"))},directives:[Eh],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"],encapsulation:2,changeDetection:0}),t}(),GR=mi(jR),UR=new wi("mat-autocomplete-scroll-strategy"),WR={provide:UR,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},YR={provide:ZS,useExisting:Ct(function(){return XR}),multi:!0},qR=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d){var f=this;o(this,t),this._element=e,this._overlay=n,this._viewContainerRef=i,this._zone=r,this._changeDetectorRef=a,this._dir=l,this._formField=u,this._document=c,this._viewportRuler=h,this._defaults=d,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=M.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new U,this._windowBlurHandler=function(){f._canOpenOnNextFocus=f._document.activeElement!==f._element.nativeElement||f.panelOpen},this._onChange=function(){},this._onTouched=function(){},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Ef(function(){return f.autocomplete&&f.autocomplete.options?dt.apply(void 0,b(f.autocomplete.options.map(function(t){return t.onSelectionChange}))):f._zone.onStable.pipe(Nf(1),Of(function(){return f.optionSelections}))}),this._scrollStrategy=s}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular(function(){return e.addEventListener("blur",t._windowBlurHandler)})}},{key:"ngOnChanges",value:function(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}},{key:"ngOnDestroy",value:function(){var t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}},{key:"openPanel",value:function(){this._attachOverlay(),this._floatLabel()}},{key:"closePanel",value:function(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}},{key:"updatePosition",value:function(){this._overlayAttached&&this._overlayRef.updatePosition()}},{key:"_getOutsideClickStream",value:function(){var t=this;return dt(bv(this._document,"click"),bv(this._document,"auxclick"),bv(this._document,"touchend")).pipe(Ld(function(e){var n=t._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,i=t._formField?t._formField._elementRef.nativeElement:null,r=t.connectedTo?t.connectedTo.elementRef.nativeElement:null;return t._overlayAttached&&n!==t._element.nativeElement&&(!i||!i.contains(n))&&(!r||!r.contains(n))&&!!t._overlayRef&&!t._overlayRef.overlayElement.contains(n)}))}},{key:"writeValue",value:function(t){var e=this;Promise.resolve(null).then(function(){return e._setTriggerValue(t)})}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this._element.nativeElement.disabled=t}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;if(e!==Oy||By(t)||t.preventDefault(),this.activeOption&&e===Ey&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){var n=this.autocomplete._keyManager.activeItem,i=e===Fy||e===zy;this.panelOpen||9===e?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}},{key:"_handleInput",value:function(t){var e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}},{key:"_handleFocus",value:function(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}},{key:"_floatLabel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}},{key:"_resetLabel",value:function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}},{key:"_subscribeToClosingActions",value:function(){var t=this;return dt(this._zone.onStable.pipe(Nf(1)),this.autocomplete.options.changes.pipe(rp(function(){return t._positionStrategy.reapplyLastPosition()}),pO(0))).pipe(Of(function(){var e=t.panelOpen;return t._resetActiveItem(),t.autocomplete._setVisibility(),t.panelOpen&&(t._overlayRef.updatePosition(),e!==t.panelOpen&&t.autocomplete.opened.emit()),t.panelClosingActions}),Nf(1)).subscribe(function(e){return t._setValueAndClose(e)})}},{key:"_destroyPanel",value:function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}},{key:"_setTriggerValue",value:function(t){var e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}},{key:"_setValueAndClose",value:function(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}},{key:"_clearPreviousSelectedOption",value:function(t){this.autocomplete.options.forEach(function(e){e!==t&&e.selected&&e.deselect()})}},{key:"_attachOverlay",value:function(){var t,e=this;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!sy(this._element.nativeElement));var n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new xy(this.autocomplete.template,this._viewContainerRef,{id:null===(t=this._formField)||void 0===t?void 0:t.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,n.keydownEvents().subscribe(function(t){(t.keyCode===Oy&&!By(t)||t.keyCode===Fy&&By(t,"altKey"))&&(e._resetActiveItem(),e._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(function(){e.panelOpen&&n&&n.updateSize({width:e._getPanelWidth()})})),n&&!n.hasAttached()&&(n.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());var i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}},{key:"_getOverlayConfig",value:function(){var t;return new Zy({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(t=this._defaults)||void 0===t?void 0:t.overlayPanelClass})}},{key:"_getOverlayPosition",value:function(){var t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}},{key:"_setStrategyPositions",value:function(t){var e,n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];e="above"===this.position?r:"below"===this.position?n:[].concat(n,r),t.withPositions(e)}},{key:"_getConnectedElement",value:function(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}},{key:"_getPanelWidth",value:function(){return this.autocomplete.panelWidth||this._getHostWidth()}},{key:"_getHostWidth",value:function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}},{key:"_resetActiveItem",value:function(){var t=this.autocomplete;t.autoActiveFirstOption?t._keyManager.setFirstItemActive():t._keyManager.setActiveItem(-1)}},{key:"_canOpen",value:function(){var t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}},{key:"_getWindow",value:function(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}},{key:"_scrollToOption",value:function(t){var e=this.autocomplete,n=rS(t,e.options,e.optionGroups);if(0===t&&1===n)e._setScrollTop(0);else if(e.panel){var i=e.options.toArray()[t];if(i){var r=i._getHostElement(),o=oS(r.offsetTop,r.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(o)}}}},{key:"autocompleteDisabled",get:function(){return this._autocompleteDisabled},set:function(t){this._autocompleteDisabled=fv(t)}},{key:"panelOpen",get:function(){return this._overlayAttached&&this.autocomplete.showPanel}},{key:"panelClosingActions",get:function(){var t=this;return dt(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ld(function(){return t._overlayAttached})),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ld(function(){return t._overlayAttached})):Pd()).pipe(q(function(t){return t instanceof eS?t:null}))}},{key:"activeOption",get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(g_),hs(pu),hs(Mc),hs(eu),hs(UR),hs(uy,8),hs(eD,9),hs(uh,8),hs(vy),hs(BR,8))},t.\u0275dir=ve({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[Ee]}),t}(),XR=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._aboveClass="mat-autocomplete-panel-above",t}return n}(qR);return t.\u0275fac=function(e){return ZR(e||t)},t.\u0275dir=ve({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&Ss("focusin",function(){return e._handleFocus()})("blur",function(){return e._onTouched()})("input",function(t){return e._handleInput(t)})("keydown",function(t){return e._handleKeydown(t)}),2&t&&ss("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[wl([YR]),Xa]}),t}(),ZR=mi(XR),KR=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[WR],imports:[[w_,aS,gk,Kh],yy,aS,gk]}),t}();function $R(t,e){if(1&t&&(ps(0,"div"),ps(1,"uds-translate"),tl(2,"Edit user"),gs(),tl(3),gs()),2&t){var n=Ds();Oo(3),nl(" ",n.user.name," ")}}function QR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New user"),gs())}function JR(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",18),Ss("ngModelChange",function(t){return rn(n),Ds().user.name=t}),gs(),gs()}if(2&t){var i=Ds();Oo(2),nl(" ",i.authenticator.type_info.userNameLabel," "),Oo(1),ds("ngModel",i.user.name)("disabled",i.user.id)}}function tL(t,e){if(1&t&&(ps(0,"mat-option",21),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),il(" ",n.id," (",n.name,") ")}}function eL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",19),Ss("ngModelChange",function(t){return rn(n),Ds().user.name=t})("input",function(t){return rn(n),Ds().filterUser(t)}),gs(),ps(4,"mat-autocomplete",null,20),us(6,tL,2,3,"mat-option",15),gs(),gs()}if(2&t){var i=cs(5),r=Ds();Oo(2),nl(" ",r.authenticator.type_info.userNameLabel," "),Oo(1),ds("ngModel",r.user.name)("matAutocomplete",i),Oo(3),ds("ngForOf",r.users)}}function nL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",22),Ss("ngModelChange",function(t){return rn(n),Ds().user.password=t}),gs(),gs()}if(2&t){var i=Ds();Oo(2),nl(" ",i.authenticator.type_info.passwordLabel," "),Oo(1),ds("ngModel",i.user.password)}}function iL(t,e){if(1&t&&(ps(0,"mat-option",21),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var rL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.users=[],this.authenticator=i.authenticator,this.user={id:void 0,name:"",real_name:"",comments:"",state:"A",is_admin:!1,staff_member:!1,password:"",role:"user",groups:[]},void 0!==i.user&&(this.user.id=i.user.id,this.user.name=i.user.name)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,user:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").overview().subscribe(function(e){t.groups=e}),this.user.id&&this.rest.authenticators.detail(this.authenticator.id,"users").get(this.user.id).subscribe(function(e){t.user=e,t.user.role=e.is_admin?"admin":e.staff_member?"staff":"user"},function(e){t.dialogRef.close()})},t.prototype.roleChanged=function(t){this.user.is_admin="admin"===t,this.user.staff_member="admin"===t||"staff"===t},t.prototype.filterUser=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"user",t.target.value,100).subscribe(function(t){e.users.length=0,t.forEach(function(t){e.users.push(t)})})},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"users").save(this.user).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-new-user"]],decls:60,vars:11,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],[4,"ngIf"],["type","text","matInput","",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["value","B"],[3,"ngModel","ngModelChange","valueChange"],["value","admin"],["value","staff"],["value","user"],["multiple","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["type","text","matInput","",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value"],["type","password","matInput","",3,"ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,$R,4,1,"div",1),us(2,QR,2,0,"ng-template",null,2,oc),gs(),ps(4,"mat-dialog-content"),ps(5,"div",3),us(6,JR,4,3,"mat-form-field",4),us(7,eL,7,4,"mat-form-field",4),ps(8,"mat-form-field"),ps(9,"mat-label"),ps(10,"uds-translate"),tl(11,"Real name"),gs(),gs(),ps(12,"input",5),Ss("ngModelChange",function(t){return e.user.real_name=t}),gs(),gs(),ps(13,"mat-form-field"),ps(14,"mat-label"),ps(15,"uds-translate"),tl(16,"Comments"),gs(),gs(),ps(17,"input",5),Ss("ngModelChange",function(t){return e.user.comments=t}),gs(),gs(),ps(18,"mat-form-field"),ps(19,"mat-label"),ps(20,"uds-translate"),tl(21,"State"),gs(),gs(),ps(22,"mat-select",6),Ss("ngModelChange",function(t){return e.user.state=t}),ps(23,"mat-option",7),ps(24,"uds-translate"),tl(25,"Enabled"),gs(),gs(),ps(26,"mat-option",8),ps(27,"uds-translate"),tl(28,"Disabled"),gs(),gs(),ps(29,"mat-option",9),ps(30,"uds-translate"),tl(31,"Blocked"),gs(),gs(),gs(),gs(),ps(32,"mat-form-field"),ps(33,"mat-label"),ps(34,"uds-translate"),tl(35,"Role"),gs(),gs(),ps(36,"mat-select",10),Ss("ngModelChange",function(t){return e.user.role=t})("valueChange",function(t){return e.roleChanged(t)}),ps(37,"mat-option",11),ps(38,"uds-translate"),tl(39,"Admin"),gs(),gs(),ps(40,"mat-option",12),ps(41,"uds-translate"),tl(42,"Staff member"),gs(),gs(),ps(43,"mat-option",13),ps(44,"uds-translate"),tl(45,"User"),gs(),gs(),gs(),gs(),us(46,nL,4,2,"mat-form-field",4),ps(47,"mat-form-field"),ps(48,"mat-label"),ps(49,"uds-translate"),tl(50,"Groups"),gs(),gs(),ps(51,"mat-select",14),Ss("ngModelChange",function(t){return e.user.groups=t}),us(52,iL,2,2,"mat-option",15),gs(),gs(),gs(),gs(),ps(53,"mat-dialog-actions"),ps(54,"button",16),ps(55,"uds-translate"),tl(56,"Cancel"),gs(),gs(),ps(57,"button",17),Ss("click",function(){return e.save()}),ps(58,"uds-translate"),tl(59,"Ok"),gs(),gs(),gs()),2&t){var n=cs(3);Oo(1),ds("ngIf",e.user.id)("ngIfElse",n),Oo(5),ds("ngIf",!1===e.authenticator.type_info.canSearchUsers||e.user.id),Oo(1),ds("ngIf",!0===e.authenticator.type_info.canSearchUsers&&!e.user.id),Oo(5),ds("ngModel",e.user.real_name),Oo(5),ds("ngModel",e.user.comments),Oo(5),ds("ngModel",e.user.state),Oo(14),ds("ngModel",e.user.role),Oo(10),ds("ngIf",e.authenticator.type_info.needsPassword),Oo(5),ds("ngModel",e.user.groups),Oo(1),ds("ngForOf",e.groups)}},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,SD,iS,Ph,AS,LS,kS,XR,jR],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),oL=["thumbContainer"],aL=["toggleBar"],sL=["input"],lL=function(){return{enterDuration:150}},uL=["*"],cL=new wi("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1}}}),hL=0,dL={provide:ZS,useExisting:Ct(function(){return gL}),multi:!0},fL=function t(e,n){o(this,t),this.source=e,this.checked=n},pL=_k(vk(yk(mk(function t(e){o(this,t),this._elementRef=e})),"accent")),gL=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this,t))._focusMonitor=i,u._changeDetectorRef=r,u.defaults=s,u._animationMode=l,u._onChange=function(t){},u._onTouched=function(){},u._uniqueId="mat-slide-toggle-".concat(++hL),u._required=!1,u._checked=!1,u.name=null,u.id=u._uniqueId,u.labelPosition="after",u.ariaLabel=null,u.ariaLabelledby=null,u.change=new Bu,u.toggleChange=new Bu,u.tabIndex=parseInt(a)||0,u}return s(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){"keyboard"===e||"program"===e?t._inputElement.nativeElement.focus():e||Promise.resolve().then(function(){return t._onTouched()})})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new fL(this,this.checked))}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t)}},{key:"checked",get:function(){return this._checked},set:function(t){this._checked=fv(t),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}}]),n}(pL);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ib),hs(eu),yi("tabindex"),hs(cL),hs(rk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var n;1&t&&(Ju(oL,1),Ju(aL,1),Ju(sL,1)),2&t&&(Qu(n=ec())&&(e._thumbEl=n.first),Qu(n=ec())&&(e._thumbBarEl=n.first),Qu(n=ec())&&(e._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(rl("id",e.id),ss("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),Gs("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[wl([dL]),Xa],ngContentSelectors:uL,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(Os(),ps(0,"label",0,1),ps(2,"div",2,3),ps(4,"input",4,5),Ss("change",function(t){return e._onChangeEvent(t)})("click",function(t){return e._onInputClick(t)}),gs(),ps(6,"div",6,7),ms(8,"div",8),ps(9,"div",9),ms(10,"div",10),gs(),gs(),gs(),ps(11,"span",11,12),Ss("cdkObserveContent",function(){return e._onLabelTextChange()}),ps(13,"span",13),tl(14,"\xa0"),gs(),Ps(15),gs(),gs()),2&t){var n=cs(1),i=cs(12);ss("for",e.inputId),Oo(2),Gs("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),Oo(2),ds("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),ss("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Oo(5),ds("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",Iu(17,lL))}},directives:[Wk,I_],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t}(),mL={provide:eC,useExisting:Ct(function(){return vL}),multi:!0},vL=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(dA);return t.\u0275fac=function(e){return yL(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[wl([mL]),Xa]}),t}(),yL=mi(vL),_L=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),bL=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[_L,Yk,gk,T_],_L,gk]}),t}();function wL(t,e){if(1&t&&(ps(0,"div"),ps(1,"uds-translate"),tl(2,"Edit group"),gs(),tl(3),gs()),2&t){var n=Ds();Oo(3),nl(" ",n.group.name," ")}}function xL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New group"),gs())}function kL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",13),Ss("ngModelChange",function(t){return rn(n),Ds(2).group.name=t}),gs(),gs()}if(2&t){var i=Ds(2);Oo(2),nl(" ",i.authenticator.type_info.groupNameLabel," "),Oo(1),ds("ngModel",i.group.name)("disabled",i.group.id)}}function SL(t,e){if(1&t&&(ps(0,"mat-option",17),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),il(" ",n.id," (",n.name,") ")}}function CL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",14),Ss("ngModelChange",function(t){return rn(n),Ds(2).group.name=t})("input",function(t){return rn(n),Ds(2).filterGroup(t)}),gs(),ps(4,"mat-autocomplete",null,15),us(6,SL,2,3,"mat-option",16),gs(),gs()}if(2&t){var i=cs(5),r=Ds(2);Oo(2),nl(" ",r.authenticator.type_info.groupNameLabel," "),Oo(1),ds("ngModel",r.group.name)("matAutocomplete",i),Oo(3),ds("ngForOf",r.fltrGroup)}}function AL(t,e){if(1&t&&(vs(0),us(1,kL,4,3,"mat-form-field",12),us(2,CL,7,4,"mat-form-field",12),ys()),2&t){var n=Ds();Oo(1),ds("ngIf",!1===n.authenticator.type_info.canSearchGroups||n.group.id),Oo(1),ds("ngIf",!0===n.authenticator.type_info.canSearchGroups&&!n.group.id)}}function ML(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),ps(2,"uds-translate"),tl(3,"Meta group name"),gs(),gs(),ps(4,"input",13),Ss("ngModelChange",function(t){return rn(n),Ds().group.name=t}),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.group.name)("disabled",i.group.id)}}function IL(t,e){if(1&t&&(ps(0,"mat-option",17),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function TL(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Service Pools"),gs(),gs(),ps(5,"mat-select",18),Ss("ngModelChange",function(t){return rn(n),Ds().group.pools=t}),us(6,IL,2,2,"mat-option",16),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.group.pools),Oo(1),ds("ngForOf",i.servicePools)}}function DL(t,e){if(1&t&&(ps(0,"mat-option",17),tl(1),gs()),2&t){var n=Ds().$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function EL(t,e){if(1&t&&(vs(0),us(1,DL,2,2,"mat-option",22),ys()),2&t){var n=e.$implicit;Oo(1),ds("ngIf","group"===n.type)}}function OL(t,e){if(1&t){var n=bs();ps(0,"div",19),ps(1,"span",20),ps(2,"uds-translate"),tl(3,"Match mode"),gs(),gs(),ps(4,"mat-slide-toggle",6),Ss("ngModelChange",function(t){return rn(n),Ds().group.meta_if_any=t}),tl(5),gs(),gs(),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Selected Groups"),gs(),gs(),ps(10,"mat-select",18),Ss("ngModelChange",function(t){return rn(n),Ds().group.groups=t}),us(11,EL,2,1,"ng-container",21),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.group.meta_if_any),Oo(1),nl(" ",i.getMatchValue()," "),Oo(5),ds("ngModel",i.group.groups),Oo(1),ds("ngForOf",i.groups)}}var PL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.fltrGroup=[],this.authenticator=i.authenticator,this.group={id:void 0,type:i.groupType,name:"",comments:"",meta_if_any:!1,state:"A",groups:[],pools:[]},void 0!==i.group&&(this.group.id=i.group.id,this.group.type=i.group.type,this.group.name=i.group.name)}return t.launch=function(e,n,i,r){var o=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:o,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,groupType:i,group:r},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.authenticator.id,"groups");void 0!==this.group.id&&e.get(this.group.id).subscribe(function(e){t.group=e},function(e){t.dialogRef.close()}),"meta"===this.group.type?e.summary().subscribe(function(e){return t.groups=e}):this.rest.servicesPools.summary().subscribe(function(e){return t.servicePools=e})},t.prototype.filterGroup=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"group",t.target.value,100).subscribe(function(t){e.fltrGroup.length=0,t.forEach(function(t){e.fltrGroup.push(t)})})},t.prototype.getMatchValue=function(){return this.group.meta_if_any?django.gettext("Any"):django.gettext("All")},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").save(this.group).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-new-group"]],decls:35,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],["metafirst",""],["type","text","matInput","",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["metasecond",""],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[4,"ngIf"],["type","text","matInput","",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["multiple","",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-match"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,wL,4,1,"div",1),us(2,xL,2,0,"ng-template",null,2,oc),gs(),ps(4,"mat-dialog-content"),ps(5,"div",3),us(6,AL,3,2,"ng-container",1),us(7,ML,5,2,"ng-template",null,4,oc),ps(9,"mat-form-field"),ps(10,"mat-label"),ps(11,"uds-translate"),tl(12,"Comments"),gs(),gs(),ps(13,"input",5),Ss("ngModelChange",function(t){return e.group.comments=t}),gs(),gs(),ps(14,"mat-form-field"),ps(15,"mat-label"),ps(16,"uds-translate"),tl(17,"State"),gs(),gs(),ps(18,"mat-select",6),Ss("ngModelChange",function(t){return e.group.state=t}),ps(19,"mat-option",7),ps(20,"uds-translate"),tl(21,"Enabled"),gs(),gs(),ps(22,"mat-option",8),ps(23,"uds-translate"),tl(24,"Disabled"),gs(),gs(),gs(),gs(),us(25,TL,7,2,"ng-container",1),us(26,OL,12,4,"ng-template",null,9,oc),gs(),gs(),ps(28,"mat-dialog-actions"),ps(29,"button",10),ps(30,"uds-translate"),tl(31,"Cancel"),gs(),gs(),ps(32,"button",11),Ss("click",function(){return e.save()}),ps(33,"uds-translate"),tl(34,"Ok"),gs(),gs(),gs()),2&t){var n=cs(3),i=cs(8),r=cs(27);Oo(1),ds("ngIf",e.group.id)("ngIfElse",n),Oo(5),ds("ngIf","group"===e.group.type)("ngIfElse",i),Oo(7),ds("ngModel",e.group.comments),Oo(5),ds("ngModel",e.group.state),Oo(7),ds("ngIf","group"===e.group.type)("ngIfElse",r)}},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,SD,iS,AS,LS,kS,XR,jR,Ph,gL],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-match[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function RL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function LL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,RL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.group)("pageSize",6)}}function NL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services Pools"),gs())}function FL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,NL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.servicesPools)("pageSize",6)}}function VL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Assigned Services"),gs())}function zL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,VL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.userServices)("pageSize",6)}}var BL=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],HL=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],jL=[{field:"unique_id",title:django.gettext("Unique ID")},{field:"friendly_name",title:django.gettext("Friendly Name")},{field:"in_use",title:django.gettext("In Use")},{field:"ip",title:django.gettext("IP")},{field:"pool",title:django.gettext("Services Pool")}],GL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.users=i.users,this.user=i.user}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{users:n,user:i},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.users.parentId,"users").get(this.user.id).subscribe(function(e){t.group=new cR(django.gettext("Groups"),function(){return t.rest.authenticators.detail(t.users.parentId,"groups").overview().pipe(q(function(t){return t.filter(function(t){return e.groups.includes(t.id)})}))},BL,t.user.id+"infogrp"),t.servicesPools=new cR(django.gettext("Services Pools"),function(){return t.users.invoke(t.user.id+"/servicesPools")},HL,t.user.id+"infopool"),t.userServices=new cR(django.gettext("Assigned services"),function(){return t.users.invoke(t.user.id+"/userServices").pipe(q(function(e){return e.map(function(e){return e.in_use=t.api.yesno(e.in_use),e})}))},jL,t.user.id+"userservpool")})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-user-information"]],decls:13,vars:4,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],[3,"rest","pageSize"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Information for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"mat-tab-group"),us(6,LL,3,2,"mat-tab",1),us(7,FL,3,2,"mat-tab",1),us(8,zL,3,2,"mat-tab",1),gs(),gs(),ps(9,"mat-dialog-actions"),ps(10,"button",2),ps(11,"uds-translate"),tl(12,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.user.name,"\n"),Oo(3),ds("ngIf",e.group),Oo(1),ds("ngIf",e.servicesPools),Oo(1),ds("ngIf",e.userServices))},directives:[SS,VS,CS,JA,Lh,AS,LS,kS,GA,zA,oR],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function UL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services Pools"),gs())}function WL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,UL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.servicesPools)("pageSize",6)}}function YL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Users"),gs())}function qL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,YL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.users)("pageSize",6)}}function XL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function ZL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,XL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.groups)("pageSize",6)}}var KL=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],$L=[{field:"name",title:django.gettext("Name")},{field:"real_name",title:django.gettext("Real Name")},{field:"state",title:django.gettext("state")},{field:"last_access",title:django.gettext("Last access"),type:PM.DATETIME}],QL=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],JL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{group:i,groups:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.data.groups.parentId,"groups");this.servicesPools=new cR(django.gettext("Service pools"),function(){return e.invoke(t.data.group.id+"/servicesPools")},KL,this.data.group.id+"infopls"),this.users=new cR(django.gettext("Users"),function(){return e.invoke(t.data.group.id+"/users").pipe(q(function(t){return t.map(function(t){return t.state="A"===t.state?django.gettext("Enabled"):"I"===t.state?django.gettext("Disabled"):django.gettext("Blocked"),t})}))},$L,this.data.group.id+"infousr"),"meta"===this.data.group.type&&(this.groups=new cR(django.gettext("Groups"),function(){return e.overview().pipe(q(function(e){return e.filter(function(e){return t.data.group.groups.includes(e.id)})}))},QL,this.data.group.id+"infogrps"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-group-information"]],decls:12,vars:3,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],[3,"rest","pageSize"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Information for"),gs(),gs(),ps(3,"mat-dialog-content"),ps(4,"mat-tab-group"),us(5,WL,3,2,"mat-tab",1),us(6,qL,3,2,"mat-tab",1),us(7,ZL,3,2,"mat-tab",1),gs(),gs(),ps(8,"mat-dialog-actions"),ps(9,"button",2),ps(10,"uds-translate"),tl(11,"Ok"),gs(),gs(),gs()),2&t&&(Oo(5),ds("ngIf",e.servicesPools),Oo(1),ds("ngIf",e.users),Oo(1),ds("ngIf",e.groups))},directives:[SS,VS,CS,JA,Lh,AS,LS,kS,GA,zA,oR],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function tN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function eN(t,e){if(1&t&&ms(0,"uds-information",16),2&t){var n=Ds(2);ds("value",n.authenticator)("gui",n.gui)}}function nN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Users"),gs())}function iN(t,e){if(1&t){var n=bs();ps(0,"uds-table",17),Ss("loaded",function(t){return rn(n),Ds(2).onLoad(t)})("newAction",function(t){return rn(n),Ds(2).onNewUser(t)})("editAction",function(t){return rn(n),Ds(2).onEditUser(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteUser(t)})("customButtonAction",function(t){return rn(n),Ds(2).onUserInformation(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function rN(t,e){if(1&t){var n=bs();ps(0,"uds-table",18),Ss("loaded",function(t){return rn(n),Ds(2).onLoad(t)})("editAction",function(t){return rn(n),Ds(2).onEditUser(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteUser(t)})("customButtonAction",function(t){return rn(n),Ds(2).onUserInformation(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function oN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function aN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function sN(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,tN,2,0,"ng-template",9),ps(5,"div",10),us(6,eN,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,nN,2,0,"ng-template",9),ps(9,"div",10),us(10,iN,1,6,"uds-table",12),us(11,rN,1,6,"uds-table",13),gs(),gs(),ps(12,"mat-tab"),us(13,oN,2,0,"ng-template",9),ps(14,"div",10),ps(15,"uds-table",14),Ss("loaded",function(t){return rn(n),Ds().onLoad(t)})("newAction",function(t){return rn(n),Ds().onNewGroup(t)})("editAction",function(t){return rn(n),Ds().onEditGroup(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteGroup(t)})("customButtonAction",function(t){return rn(n),Ds().onGroupInformation(t)}),gs(),gs(),gs(),ps(16,"mat-tab"),us(17,aN,2,0,"ng-template",9),ps(18,"div",10),ms(19,"uds-logs-table",15),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("selectedIndex",i.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",i.authenticator&&i.gui),Oo(4),ds("ngIf",i.authenticator.type_info.canCreateUsers),Oo(1),ds("ngIf",!i.authenticator.type_info.canCreateUsers),Oo(4),ds("rest",i.groups)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("tableId","authenticators-d-groups"+i.authenticator.id)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.rest.authenticators)("itemId",i.authenticator.id)("tableId","authenticators-d-log"+i.authenticator.id)}}var lN=function(t){return["/authenticators",t]},uN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:RM.ONLY_MENU}],this.authenticator=null,this.selectedTab=1,this.selectedTab=this.route.snapshot.paramMap.get("group")?2:1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("authenticator");this.users=this.rest.authenticators.detail(e,"users"),this.groups=this.rest.authenticators.detail(e,"groups"),this.rest.authenticators.get(e).subscribe(function(e){t.authenticator=e,t.rest.authenticators.gui(e.type).subscribe(function(e){t.gui=e})})},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("user"),n=this.route.snapshot.paramMap.get("group");t.table.selectElement("id",e||n)}},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onNewUser=function(t){rL.launch(this.api,this.authenticator).subscribe(function(e){return t.table.overview()})},t.prototype.onEditUser=function(t){rL.launch(this.api,this.authenticator,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteUser=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user"))},t.prototype.onNewGroup=function(t){PL.launch(this.api,this.authenticator,t.param.type).subscribe(function(e){return t.table.overview()})},t.prototype.onEditGroup=function(t){PL.launch(this.api,this.authenticator,t.param.type,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete group"))},t.prototype.onUserInformation=function(t){GL.launch(this.api,this.users,t.table.selection.selected[0])},t.prototype.onGroupInformation=function(t){JL.launch(this.api,this.groups,t.table.selection.selected[0])},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-authenticators-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],[3,"rest","itemId","tableId"],[3,"value","gui"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,sN,20,14,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,lN,e.authenticator?e.authenticator.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/services.png"),Er),Oo(1),nl(" \xa0",null==e.authenticator?null:e.authenticator.name," "),Oo(1),ds("ngIf",e.authenticator))},directives:[Gm,Lh,JA,GA,zA,oR,yR,VS,SR],styles:[""]}),t}(),cN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("osmanager")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New OS Manager"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit OS Manager"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete OS Manager"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("osmanager"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-osmanagers"]],decls:2,vars:5,consts:[["icon","osmanagers",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.osManagers)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),hN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("transport")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Transport"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Transport"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Transport"))},t.prototype.processElement=function(t){try{t.allowed_oss=t.allowed_oss.map(function(t){return t.id}).join(", ")}catch(e){t.allowed_oss=""}},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("transport"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-transports"]],decls:2,vars:7,consts:[["icon","transports",3,"rest","multiSelect","allowExport","hasPermissions","newGrouped","onItem","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.transports)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("newGrouped",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[".mat-column-priority{max-width:7rem;justify-content:center}"]}),t}(),dN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("network")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Network"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Network"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Network"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("network"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-networks"]],decls:2,vars:5,consts:[["icon","networks",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.networks)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),fN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("proxy")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Proxy"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Proxy"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Proxy"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("proxy"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-proxies"]],decls:2,vars:5,consts:[["icon","proxy",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.proxy)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),pN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[WM.getGotoButton(LM,"provider_id"),WM.getGotoButton(NM,"provider_id","service_id"),WM.getGotoButton(HM,"osmanager_id"),WM.getGotoButton(GM,"pool_group_id")],this.editing=!1}return t.prototype.ngOnInit=function(){},t.prototype.onChange=function(t){var e=this,n=["initial_srvs","cache_l1_srvs","max_srvs"];if(null===t.on||"service_id"===t.on.field.name){if(""===t.all.service_id.value)return t.all.osmanager_id.gui.values.length=0,void n.forEach(function(e){return t.all[e].gui.rdonly=!0});this.rest.providers.service(t.all.service_id.value).subscribe(function(i){t.all.allow_users_reset.gui.rdonly=!i.info.can_reset,t.all.osmanager_id.gui.values.length=0,e.editing||(t.all.osmanager_id.gui.rdonly=!i.info.needs_manager),!0===i.info.needs_manager?e.rest.osManagers.overview().subscribe(function(e){e.forEach(function(e){e.servicesTypes.forEach(function(n){i.info.servicesTypeProvided.includes(n)&&t.all.osmanager_id.gui.values.push({id:e.id,text:e.name})})}),t.all.osmanager_id.value=t.all.osmanager_id.gui.values.length>0?t.all.osmanager_id.value||t.all.osmanager_id.gui.values[0].id:""}):(t.all.osmanager_id.gui.values.push({id:"",text:django.gettext("(This service does not requires an OS Manager)")}),t.all.osmanager_id.value=""),n.forEach(function(e){return t.all[e].gui.rdonly=!i.info.uses_cache}),t.all.cache_l2_srvs.gui.rdonly=!1===i.info.uses_cache||!1===i.info.uses_cache_l2,t.all.publish_on_save&&(t.all.publish_on_save.gui.rdonly=!i.info.needs_publication)}),n.forEach(function(e){t.all[e].gui.rdonly=!0})}},t.prototype.onNew=function(t){var e=this;this.editing=!1,this.api.gui.forms.typedNewForm(t,django.gettext("New service Pool"),!1,[{name:"publish_on_save",value:!0,gui:{label:django.gettext("Publish on creation"),tooltip:django.gettext("If selected, will initiate the publication inmediatly after creation"),type:WS.CHECKBOX,order:150,defvalue:"true"}}]).subscribe(function(t){return e.onChange(t)})},t.prototype.onEdit=function(t){var e=this;this.editing=!0,this.api.gui.forms.typedEditForm(t,django.gettext("Edit Service Pool"),!1).subscribe(function(t){return e.onChange(t)})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service pool"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.show_transports=this.api.yesno(t.show_transports),t.restrained?(t.name='warning '+this.api.gui.icon(t.info.icon)+t.name,t.state="T"):(t.name=this.api.gui.icon(t.info.icon)+t.name,t.meta_member.length>0&&(t.state="V")),t.name=this.api.safeString(t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onDetail=function(t){this.api.navigation.gotoServicePoolDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("pool"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools"]],decls:1,vars:7,consts:[["icon","pools",3,"rest","multiSelect","allowExport","hasPermissions","onItem","customButtons","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.servicesPools)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".mat-column-state, .mat-column-usage, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center} .mat-column-show_transports{max-width:10rem;justify-content:center} .mat-column-pool_group_name{max-width:12rem} .row-state-T>.mat-cell{color:#d65014!important}"]}),t}();function gN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function mN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",9),Ss("changed",function(t){return rn(n),Ds().userFilter=t}),gs()}}function vN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var yN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.auths=[],this.users=[],this.userFilter="",this.userService=i.userService,this.userServices=i.userServices}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,userServices:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.authId=this.userService.owner_info.auth_id||"",this.userId=this.userService.owner_info.user_id||"",this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()})},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(!this.userFilter)return this.users;var e=new Array;return this.users.forEach(function(n){(""===t.userFilter||n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase()))&&e.push(n)}),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.userServices.save({id:this.userService.id,auth_id:this.authId,user_id:this.userId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.prototype.authChanged=function(){var t=this;this.rest.authenticators.detail(this.authId,"users").summary().subscribe(function(e){t.users=e})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-change-assigned-service-owner"]],decls:25,vars:5,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Change owner of assigned service"),gs(),gs(),ps(3,"mat-dialog-content"),ps(4,"div",1),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Authenticator"),gs(),gs(),ps(9,"mat-select",2),Ss("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),us(10,gN,2,2,"mat-option",3),gs(),gs(),ps(11,"mat-form-field"),ps(12,"mat-label"),ps(13,"uds-translate"),tl(14,"User"),gs(),gs(),ps(15,"mat-select",4),Ss("ngModelChange",function(t){return e.userId=t}),us(16,mN,1,0,"uds-mat-select-search",5),us(17,vN,2,2,"mat-option",3),gs(),gs(),gs(),gs(),ps(18,"mat-dialog-actions"),ps(19,"button",6),ps(20,"uds-translate"),tl(21,"Cancel"),gs(),gs(),ps(22,"button",7),Ss("click",function(){return e.save()}),ps(23,"uds-translate"),tl(24,"Ok"),gs(),gs(),gs()),2&t&&(Oo(9),ds("ngModel",e.authId),Oo(1),ds("ngForOf",e.auths),Oo(5),ds("ngModel",e.userId),Oo(1),ds("ngIf",e.users.length>10),Oo(1),ds("ngForOf",e.filteredUsers()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Ph,Lh,AS,LS,kS,iS,EO],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function _N(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New access rule for"),gs())}function bN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit access rule for"),gs())}function wN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Default fallback access for"),gs())}function xN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",11),Ss("changed",function(t){return rn(n),Ds(2).calendarsFilter=t}),gs()}}function kN(t,e){if(1&t&&(ps(0,"mat-option",12),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function SN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Priority"),gs(),gs(),ps(5,"input",8),Ss("ngModelChange",function(t){return rn(n),Ds().accessRule.priority=t}),gs(),gs(),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Calendar"),gs(),gs(),ps(10,"mat-select",3),Ss("ngModelChange",function(t){return rn(n),Ds().accessRule.calendarId=t}),us(11,xN,1,0,"uds-mat-select-search",9),us(12,kN,2,2,"mat-option",10),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.accessRule.priority),Oo(5),ds("ngModel",i.accessRule.calendarId),Oo(1),ds("ngIf",i.calendars.length>10),Oo(1),ds("ngForOf",i.filtered(i.calendars,i.calendarsFilter))}}var CN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.calendars=[],this.calendarsFilter="",this.pool=i.pool,this.model=i.model,this.accessRule={id:void 0,priority:0,access:"ALLOW",calendarId:""},i.accessRule&&(this.accessRule.id=i.accessRule.id)}return t.launch=function(e,n,i,r){var o=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:o,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i,accessRule:r},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.calendars.summary().subscribe(function(e){t.calendars=e}),void 0!==this.accessRule.id&&-1!==this.accessRule.id?this.model.get(this.accessRule.id).subscribe(function(e){t.accessRule=e}):-1===this.accessRule.id&&this.model.parentModel.getFallbackAccess(this.pool.id).subscribe(function(e){return t.accessRule.access=e})},t.prototype.filtered=function(t,e){return e?t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}):t},t.prototype.save=function(){var t=this,e=function(){t.dialogRef.close(),t.onSave.emit(!0)};-1!==this.accessRule.id?this.model.save(this.accessRule).subscribe(e):this.model.parentModel.setFallbackAccess(this.pool.id,this.accessRule.access).subscribe(e)},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-access-calendars"]],decls:24,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],[3,"ngModel","ngModelChange"],["value","ALLOW"],["value","DENY"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"h4",0),us(1,_N,2,0,"uds-translate",1),us(2,bN,2,0,"uds-translate",1),us(3,wN,2,0,"uds-translate",1),tl(4),gs(),ps(5,"mat-dialog-content"),ps(6,"div",2),us(7,SN,13,4,"ng-container",1),ps(8,"mat-form-field"),ps(9,"mat-label"),ps(10,"uds-translate"),tl(11,"Action"),gs(),gs(),ps(12,"mat-select",3),Ss("ngModelChange",function(t){return e.accessRule.access=t}),ps(13,"mat-option",4),tl(14," ALLOW "),gs(),ps(15,"mat-option",5),tl(16," DENY "),gs(),gs(),gs(),gs(),gs(),ps(17,"mat-dialog-actions"),ps(18,"button",6),ps(19,"uds-translate"),tl(20,"Cancel"),gs(),gs(),ps(21,"button",7),Ss("click",function(){return e.save()}),ps(22,"uds-translate"),tl(23,"Ok"),gs(),gs(),gs()),2&t&&(Oo(1),ds("ngIf",void 0===e.accessRule.id),Oo(1),ds("ngIf",void 0!==e.accessRule.id&&-1!==e.accessRule.id),Oo(1),ds("ngIf",-1===e.accessRule.id),Oo(1),nl(" ",e.pool.name,"\n"),Oo(3),ds("ngIf",-1!==e.accessRule.id),Oo(5),ds("ngModel",e.accessRule.access))},directives:[SS,Lh,CS,nD,qT,VS,SD,AC,eA,iS,AS,LS,kS,CO,rA,QS,Ph,EO],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function AN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function MN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",9),Ss("changed",function(t){return rn(n),Ds().groupFilter=t}),gs()}}function IN(t,e){if(1&t&&(vs(0),tl(1),ys()),2&t){var n=Ds().$implicit;Oo(1),nl(" (",n.comments,")")}}function TN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),us(2,IN,2,1,"ng-container",10),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name,""),Oo(1),ds("ngIf",n.comments)}}var DN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.model=null,this.auths=[],this.groups=[],this.groupFilter="",this.authId="",this.groupId="",this.pool=i.pool,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()})},t.prototype.changeAuth=function(t){this.groupId="",this.authChanged()},t.prototype.filteredGroups=function(){var t=this;return!this.groupFilter||this.groupFilter.length<3?this.groups:this.groups.filter(function(e){return e.name.toLocaleLowerCase().includes(t.groupFilter.toLocaleLowerCase())})},t.prototype.save=function(){var t=this;""!==this.groupId&&""!==this.authId?this.model.create({id:this.groupId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid group"))},t.prototype.authChanged=function(){var t=this;""!==this.authId&&this.rest.authenticators.detail(this.authId,"groups").summary().subscribe(function(e){t.groups=e})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-add-group"]],decls:26,vars:6,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"],[4,"ngIf"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"New group for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"div",1),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Authenticator"),gs(),gs(),ps(10,"mat-select",2),Ss("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),us(11,AN,2,2,"mat-option",3),gs(),gs(),ps(12,"mat-form-field"),ps(13,"mat-label"),ps(14,"uds-translate"),tl(15,"Group"),gs(),gs(),ps(16,"mat-select",4),Ss("ngModelChange",function(t){return e.groupId=t}),us(17,MN,1,0,"uds-mat-select-search",5),us(18,TN,3,3,"mat-option",3),gs(),gs(),gs(),gs(),ps(19,"mat-dialog-actions"),ps(20,"button",6),ps(21,"uds-translate"),tl(22,"Cancel"),gs(),gs(),ps(23,"button",7),Ss("click",function(){return e.save()}),ps(24,"uds-translate"),tl(25,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.pool.name,"\n"),Oo(7),ds("ngModel",e.authId),Oo(1),ds("ngForOf",e.auths),Oo(5),ds("ngModel",e.groupId),Oo(1),ds("ngIf",e.groups.length>10),Oo(1),ds("ngForOf",e.filteredGroups()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Ph,Lh,AS,LS,kS,iS,EO],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function EN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",7),Ss("changed",function(t){return rn(n),Ds().transportsFilter=t}),gs()}}function ON(t,e){if(1&t&&(vs(0),tl(1),ys()),2&t){var n=Ds().$implicit;Oo(1),nl(" (",n.comments,")")}}function PN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),us(2,ON,2,1,"ng-container",9),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name,""),Oo(1),ds("ngIf",n.comments)}}var RN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.transports=[],this.transportsFilter="",this.transportId="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.transports.summary().subscribe(function(e){t.transports=e.filter(function(e){return t.servicePool.info.allowedProtocols.includes(e.protocol)})})},t.prototype.filteredTransports=function(){var t=this;return this.transportsFilter?this.transports.filter(function(e){return e.name.toLocaleLowerCase().includes(t.transportsFilter.toLocaleLowerCase())}):this.transports},t.prototype.save=function(){var t=this;""!==this.transportId?this.rest.servicesPools.detail(this.servicePool.id,"transports").create({id:this.transportId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid transport"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-add-transport"]],decls:20,vars:4,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[4,"ngIf"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"New transport for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"div",1),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Transport"),gs(),gs(),ps(10,"mat-select",2),Ss("ngModelChange",function(t){return e.transportId=t}),us(11,EN,1,0,"uds-mat-select-search",3),us(12,PN,3,3,"mat-option",4),gs(),gs(),gs(),gs(),ps(13,"mat-dialog-actions"),ps(14,"button",5),ps(15,"uds-translate"),tl(16,"Cancel"),gs(),gs(),ps(17,"button",6),Ss("click",function(){return e.save()}),ps(18,"uds-translate"),tl(19,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(7),ds("ngModel",e.transportId),Oo(1),ds("ngIf",e.transports.length>10),Oo(1),ds("ngForOf",e.filteredTransports()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Lh,Ph,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),LN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.reason="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){},t.prototype.save=function(){var t=this;this.rest.servicesPools.detail(this.servicePool.id,"publications").invoke("publish","changelog="+encodeURIComponent(this.reason)).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-new-publication"]],decls:18,vars:2,consts:[["mat-dialog-title",""],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"New publication for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"div",1),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Comments"),gs(),gs(),ps(10,"input",2),Ss("ngModelChange",function(t){return e.reason=t}),gs(),gs(),gs(),gs(),ps(11,"mat-dialog-actions"),ps(12,"button",3),ps(13,"uds-translate"),tl(14,"Cancel"),gs(),gs(),ps(15,"button",4),Ss("click",function(){return e.save()}),ps(16,"uds-translate"),tl(17,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(7),ds("ngModel",e.reason))},directives:[SS,VS,CS,nD,qT,CO,QS,AC,eA,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),NN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1})},t.prototype.ngOnInit=function(){this.changeLogPubs=this.rest.servicesPools.detail(this.servicePool.id,"changelog")},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-publications-changelog"]],decls:11,vars:4,consts:[["mat-dialog-title",""],["icon","publications",3,"rest","allowExport","tableId"],["changeLog",""],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Changelog of"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ms(5,"uds-table",1,2),gs(),ps(7,"mat-dialog-actions"),ps(8,"button",3),ps(9,"uds-translate"),tl(10,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(2),ds("rest",e.changeLogPubs)("allowExport",!0)("tableId","servicePools-d-changelog"+e.servicePool.id))},directives:[SS,VS,CS,oR,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function FN(t,e){1&t&&(vs(0),ps(1,"uds-translate"),tl(2,"Edit action for"),gs(),ys())}function VN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New action for"),gs())}function zN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",14),Ss("changed",function(t){return rn(n),Ds().calendarsFilter=t}),gs()}}function BN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function HN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.description," ")}}function jN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",14),Ss("changed",function(t){return rn(n),Ds(2).transportsFilter=t}),gs()}}function GN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function UN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Transport"),gs(),gs(),ps(5,"mat-select",4),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),us(6,jN,1,0,"uds-mat-select-search",5),us(7,GN,2,2,"mat-option",6),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.paramValue),Oo(1),ds("ngIf",i.transports.length>10),Oo(1),ds("ngForOf",i.filtered(i.transports,i.transportsFilter))}}function WN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function YN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",14),Ss("changed",function(t){return rn(n),Ds(2).groupsFilter=t}),gs()}}function qN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",Ds(2).authenticator+"@"+n.id),Oo(1),nl(" ",n.name," ")}}function XN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Authenticator"),gs(),gs(),ps(5,"mat-select",10),Ss("ngModelChange",function(t){return rn(n),Ds().authenticator=t})("valueChange",function(t){return rn(n),Ds().changedAuthenticator(t)}),us(6,WN,2,2,"mat-option",6),gs(),gs(),ps(7,"mat-form-field"),ps(8,"mat-label"),ps(9,"uds-translate"),tl(10,"Group"),gs(),gs(),ps(11,"mat-select",4),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),us(12,YN,1,0,"uds-mat-select-search",5),us(13,qN,2,2,"mat-option",6),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.authenticator),Oo(1),ds("ngForOf",i.authenticators),Oo(5),ds("ngModel",i.paramValue),Oo(1),ds("ngIf",i.groups.length>10),Oo(1),ds("ngForOf",i.filtered(i.groups,i.groupsFilter))}}function ZN(t,e){if(1&t){var n=bs();vs(0),ps(1,"div",8),ps(2,"span",16),tl(3),gs(),tl(4,"\xa0 "),ps(5,"mat-slide-toggle",4),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(3),el(i.parameter.description),Oo(2),ds("ngModel",i.paramValue)}}function KN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),tl(3),gs(),ps(4,"input",17),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(3),nl(" ",i.parameter.description," "),Oo(1),ds("type",i.parameter.type)("ngModel",i.paramValue)}}var $N=function(){return["transport","group","bool"]},QN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.calendars=[],this.actionList=[],this.authenticators=[],this.transports=[],this.groups=[],this.paramsDict={},this.calendarsFilter="",this.groupsFilter="",this.transportsFilter="",this.authenticator="",this.parameter={},this.paramValue="",this.servicePool=i.servicePool,this.scheduledAction={id:void 0,action:"",calendar:"",calendarId:"",atStart:!0,eventsOffset:0,params:{}},void 0!==i.scheduledAction&&(this.scheduledAction.id=i.scheduledAction.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n,scheduledAction:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){return t.authenticators=e}),this.rest.transports.summary().subscribe(function(e){return t.transports=e}),this.rest.calendars.summary().subscribe(function(e){return t.calendars=e}),this.rest.servicesPools.actionsList(this.servicePool.id).subscribe(function(e){t.actionList=e,t.actionList.forEach(function(e){t.paramsDict[e.id]=e.params[0]}),void 0!==t.scheduledAction.id&&t.rest.servicesPools.detail(t.servicePool.id,"actions").get(t.scheduledAction.id).subscribe(function(e){t.scheduledAction=e,t.changedAction(t.scheduledAction.action)})})},t.prototype.filtered=function(t,e){return e?t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}):t},t.prototype.changedAction=function(t){if(this.parameter=this.paramsDict[t],void 0!==this.parameter&&(this.paramValue=this.scheduledAction.params[this.parameter.name],void 0===this.paramValue&&(this.paramValue=!1!==this.parameter.default&&(this.parameter.default||"")),"group"===this.parameter.type)){var e=this.paramValue.split("@");2!==e.length&&(e=["",""]),this.authenticator=e[0],this.changedAuthenticator(this.authenticator)}},t.prototype.changedAuthenticator=function(t){var e=this;t&&this.rest.authenticators.detail(t,"groups").summary().subscribe(function(t){return e.groups=t})},t.prototype.save=function(){var t=this;this.scheduledAction.params={},this.parameter&&(this.scheduledAction.params[this.parameter.name]=this.paramValue),this.rest.servicesPools.detail(this.servicePool.id,"actions").save(this.scheduledAction).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-scheduled-action"]],decls:42,vars:16,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["editTitle",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-atstart"],[3,"ngModel","ngModelChange","valueChange"],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[1,"label"],["matInput","",3,"type","ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,FN,3,0,"ng-container",1),us(2,VN,2,0,"ng-template",null,2,oc),tl(4),gs(),ps(5,"mat-dialog-content"),ps(6,"div",3),ps(7,"mat-form-field"),ps(8,"mat-label"),ps(9,"uds-translate"),tl(10,"Calendar"),gs(),gs(),ps(11,"mat-select",4),Ss("ngModelChange",function(t){return e.scheduledAction.calendarId=t}),us(12,zN,1,0,"uds-mat-select-search",5),us(13,BN,2,2,"mat-option",6),gs(),gs(),ps(14,"mat-form-field"),ps(15,"mat-label"),ps(16,"uds-translate"),tl(17,"Events offset (minutes)"),gs(),gs(),ps(18,"input",7),Ss("ngModelChange",function(t){return e.scheduledAction.eventsOffset=t}),gs(),gs(),ps(19,"div",8),ps(20,"span",9),ps(21,"uds-translate"),tl(22,"At the beginning of the interval?"),gs(),gs(),ps(23,"mat-slide-toggle",4),Ss("ngModelChange",function(t){return e.scheduledAction.atStart=t}),tl(24),gs(),gs(),ps(25,"mat-form-field"),ps(26,"mat-label"),ps(27,"uds-translate"),tl(28,"Action"),gs(),gs(),ps(29,"mat-select",10),Ss("ngModelChange",function(t){return e.scheduledAction.action=t})("valueChange",function(t){return e.changedAction(t)}),us(30,HN,2,2,"mat-option",6),gs(),gs(),us(31,UN,8,3,"ng-container",11),us(32,XN,14,5,"ng-container",11),us(33,ZN,6,2,"ng-container",11),us(34,KN,5,3,"ng-container",11),gs(),gs(),ps(35,"mat-dialog-actions"),ps(36,"button",12),ps(37,"uds-translate"),tl(38,"Cancel"),gs(),gs(),ps(39,"button",13),Ss("click",function(){return e.save()}),ps(40,"uds-translate"),tl(41,"Ok"),gs(),gs(),gs()),2&t){var n=cs(3);Oo(1),ds("ngIf",void 0!==e.scheduledAction.id)("ngIfElse",n),Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(7),ds("ngModel",e.scheduledAction.calendarId),Oo(1),ds("ngIf",e.calendars.length>10),Oo(1),ds("ngForOf",e.filtered(e.calendars,e.calendarsFilter)),Oo(5),ds("ngModel",e.scheduledAction.eventsOffset),Oo(5),ds("ngModel",e.scheduledAction.atStart),Oo(1),nl(" ",e.api.yesno(e.scheduledAction.atStart)," "),Oo(5),ds("ngModel",e.scheduledAction.action),Oo(1),ds("ngForOf",e.actionList),Oo(1),ds("ngIf","transport"===(null==e.parameter?null:e.parameter.type)),Oo(1),ds("ngIf","group"===(null==e.parameter?null:e.parameter.type)),Oo(1),ds("ngIf","bool"===(null==e.parameter?null:e.parameter.type)),Oo(1),ds("ngIf",(null==e.parameter?null:e.parameter.type)&&!Iu(15,$N).includes(e.parameter.type))}},directives:[SS,Lh,CS,nD,qT,VS,SD,AC,eA,Ph,CO,rA,QS,gL,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-atstart[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}(),JN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.userService=i.userService,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,model:i},disableClose:!1})},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-userservices-log"]],decls:10,vars:4,consts:[["mat-dialog-title",""],[3,"rest","itemId","tableId"],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Logs of"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ms(5,"uds-logs-table",1),gs(),ps(6,"mat-dialog-actions"),ps(7,"button",2),ps(8,"uds-translate"),tl(9,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.userService.name,"\n"),Oo(2),ds("rest",e.model)("itemId",e.userService.id)("tableId","servicePools-d-uslog"+e.userService.id))},directives:[SS,VS,CS,yR,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function tF(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",8),Ss("changed",function(t){return rn(n),Ds().assignablesServicesFilter=t}),gs()}}function eF(t,e){if(1&t&&(ps(0,"mat-option",9),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.text," ")}}function nF(t,e){if(1&t&&(ps(0,"mat-option",9),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function iF(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",8),Ss("changed",function(t){return rn(n),Ds().userFilter=t}),gs()}}function rF(t,e){if(1&t&&(ps(0,"mat-option",9),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var oF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.auths=[],this.assignablesServices=[],this.assignablesServicesFilter="",this.users=[],this.userFilter="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.authId="",this.userId="",this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()}),this.rest.servicesPools.listAssignables(this.servicePool.id).subscribe(function(e){t.assignablesServices=e})},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(!this.userFilter)return this.users;var e=new Array;return this.users.forEach(function(n){n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase())&&e.push(n)}),e},t.prototype.filteredAssignables=function(){var t=this;if(!this.assignablesServicesFilter)return this.assignablesServices;var e=new Array;return this.assignablesServices.forEach(function(n){n.text.toLocaleLowerCase().includes(t.assignablesServicesFilter.toLocaleLowerCase())&&e.push(n)}),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.rest.servicesPools.createFromAssignable(this.servicePool.id,this.userId,this.serviceId).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.prototype.authChanged=function(){var t=this;this.authId&&this.rest.authenticators.detail(this.authId,"users").summary().subscribe(function(e){t.users=e})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-assign-service-to-owner"]],decls:32,vars:8,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","selectionChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Assign service to user manually"),gs(),gs(),ps(3,"mat-dialog-content"),ps(4,"div",1),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Service"),gs(),gs(),ps(9,"mat-select",2),Ss("ngModelChange",function(t){return e.serviceId=t}),us(10,tF,1,0,"uds-mat-select-search",3),us(11,eF,2,2,"mat-option",4),gs(),gs(),ps(12,"mat-form-field"),ps(13,"mat-label"),ps(14,"uds-translate"),tl(15,"Authenticator"),gs(),gs(),ps(16,"mat-select",5),Ss("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),us(17,nF,2,2,"mat-option",4),gs(),gs(),ps(18,"mat-form-field"),ps(19,"mat-label"),ps(20,"uds-translate"),tl(21,"User"),gs(),gs(),ps(22,"mat-select",2),Ss("ngModelChange",function(t){return e.userId=t}),us(23,iF,1,0,"uds-mat-select-search",3),us(24,rF,2,2,"mat-option",4),gs(),gs(),gs(),gs(),ps(25,"mat-dialog-actions"),ps(26,"button",6),ps(27,"uds-translate"),tl(28,"Cancel"),gs(),gs(),ps(29,"button",7),Ss("click",function(){return e.save()}),ps(30,"uds-translate"),tl(31,"Ok"),gs(),gs(),gs()),2&t&&(Oo(9),ds("ngModel",e.serviceId),Oo(1),ds("ngIf",e.assignablesServices.length>10),Oo(1),ds("ngForOf",e.filteredAssignables()),Oo(5),ds("ngModel",e.authId),Oo(1),ds("ngForOf",e.auths),Oo(5),ds("ngModel",e.userId),Oo(1),ds("ngIf",e.users.length>10),Oo(1),ds("ngForOf",e.filteredUsers()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Lh,Ph,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),aF=function(){function t(t){this.rest=t,this.chart=null}return t.prototype.onResize=function(t){this.chart&&this.chart.resize()},t.prototype.ngOnInit=function(){var t=this;this.rest.system.stats("complete",this.poolUuid).subscribe(function(e){t.options={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},restore:{},saveAsImage:{}}},xAxis:{type:"category",data:e.assigned.map(function(t){return qI("SHORT_DATETIME_FORMAT",new Date(t.stamp))}),boundaryGap:!1},yAxis:{type:"value",boundaryGap:!1},series:[{name:django.gettext("Assigned"),type:"line",stack:"services",smooth:!0,areaStyle:{},data:e.assigned.map(function(t){return t.value})},{name:django.gettext("Cached"),type:"line",stack:"services",smooth:!0,areaStyle:{},data:e.cached.map(function(t){return t.value})},{name:django.gettext("In use"),type:"line",smooth:!0,data:e.inuse.map(function(t){return t.value})}]}})},t.prototype.chartInit=function(t){this.chart=t},t.\u0275fac=function(e){return new(e||t)(hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-charts"]],hostBindings:function(t,e){1&t&&Ss("resize",function(t){return e.onResize(t)},!1,zr)},inputs:{poolUuid:"poolUuid"},decls:2,vars:1,consts:[[1,"statistics-chart"],["echarts","","theme","dark-digerati",3,"options","chartInit"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),Ss("chartInit",function(t){return e.chartInit(t)}),gs(),gs()),2&t&&(Oo(1),ds("options",e.options))},directives:[bT],styles:[""]}),t}();function sF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function lF(t,e){if(1&t&&ms(0,"uds-information",21),2&t){var n=Ds(2);ds("value",n.servicePool)("gui",n.gui)}}function uF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Assigned services"),gs())}function cF(t,e){if(1&t){var n=bs();ps(0,"uds-table",22),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomAssigned(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteAssigned(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function hF(t,e){if(1&t){var n=bs();ps(0,"uds-table",23),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomAssigned(t)})("newAction",function(t){return rn(n),Ds(2).onNewAssigned(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteAssigned(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function dF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Cache"),gs())}function fF(t,e){if(1&t){var n=bs();ps(0,"mat-tab"),us(1,dF,2,0,"ng-template",9),ps(2,"div",10),ps(3,"uds-table",24),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomCached(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteCache(t)}),gs(),gs(),gs()}if(2&t){var i=Ds(2);Oo(3),ds("rest",i.cache)("multiSelect",!0)("allowExport",!0)("onItem",i.processsCacheElement)("tableId","servicePools-d-cache"+i.servicePool.id)("customButtons",i.customButtonsCachedServices)("pageSize",i.api.config.admin.page_size)}}function pF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function gF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Transports"),gs())}function mF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Publications"),gs())}function vF(t,e){if(1&t){var n=bs();ps(0,"mat-tab"),us(1,mF,2,0,"ng-template",9),ps(2,"div",10),ps(3,"uds-table",25),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomPublication(t)})("newAction",function(t){return rn(n),Ds(2).onNewPublication(t)})("rowSelected",function(t){return rn(n),Ds(2).onPublicationRowSelect(t)}),gs(),gs(),gs()}if(2&t){var i=Ds(2);Oo(3),ds("rest",i.publications)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-publications"+i.servicePool.id)("customButtons",i.customButtonsPublication)("pageSize",i.api.config.admin.page_size)}}function yF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Scheduled actions"),gs())}function _F(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Access calendars"),gs())}function bF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Charts"),gs())}function wF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function xF(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,sF,2,0,"ng-template",9),ps(5,"div",10),us(6,lF,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,uF,2,0,"ng-template",9),ps(9,"div",10),us(10,cF,1,7,"uds-table",12),us(11,hF,1,7,"ng-template",null,13,oc),gs(),gs(),us(13,fF,4,7,"mat-tab",14),ps(14,"mat-tab"),us(15,pF,2,0,"ng-template",9),ps(16,"div",10),ps(17,"uds-table",15),Ss("newAction",function(t){return rn(n),Ds().onNewGroup(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteGroup(t)}),gs(),gs(),gs(),ps(18,"mat-tab"),us(19,gF,2,0,"ng-template",9),ps(20,"div",10),ps(21,"uds-table",16),Ss("newAction",function(t){return rn(n),Ds().onNewTransport(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteTransport(t)}),gs(),gs(),gs(),us(22,vF,4,6,"mat-tab",14),ps(23,"mat-tab"),us(24,yF,2,0,"ng-template",9),ps(25,"div",10),ps(26,"uds-table",17),Ss("customButtonAction",function(t){return rn(n),Ds().onCustomScheduleAction(t)})("newAction",function(t){return rn(n),Ds().onNewScheduledAction(t)})("editAction",function(t){return rn(n),Ds().onEditScheduledAction(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteScheduledAction(t)}),gs(),gs(),gs(),ps(27,"mat-tab"),us(28,_F,2,0,"ng-template",9),ps(29,"div",10),ps(30,"uds-table",18),Ss("newAction",function(t){return rn(n),Ds().onNewAccessCalendar(t)})("editAction",function(t){return rn(n),Ds().onEditAccessCalendar(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteAccessCalendar(t)})("loaded",function(t){return rn(n),Ds().onAccessCalendarLoad(t)}),gs(),gs(),gs(),ps(31,"mat-tab"),us(32,bF,2,0,"ng-template",9),ps(33,"div",10),ms(34,"uds-service-pools-charts",19),gs(),gs(),ps(35,"mat-tab"),us(36,wF,2,0,"ng-template",9),ps(37,"div",10),ms(38,"uds-logs-table",20),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=cs(12),r=Ds();Oo(2),ds("selectedIndex",r.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",r.servicePool&&r.gui),Oo(4),ds("ngIf",!1===r.servicePool.info.must_assign_manually)("ngIfElse",i),Oo(3),ds("ngIf",r.cache),Oo(4),ds("rest",r.groups)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsGroups)("tableId","servicePools-d-groups"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Oo(4),ds("rest",r.transports)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsTransports)("tableId","servicePools-d-transports"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Oo(1),ds("ngIf",r.publications),Oo(4),ds("rest",r.scheduledActions)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-actions"+r.servicePool.id)("customButtons",r.customButtonsScheduledAction)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Oo(4),ds("rest",r.accessCalendars)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonAccessCalendars)("tableId","servicePools-d-access"+r.servicePool.id)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Oo(4),ds("poolUuid",r.servicePool.id),Oo(4),ds("rest",r.rest.servicesPools)("itemId",r.servicePool.id)("tableId","servicePools-d-log"+r.servicePool.id)("pageSize",r.api.config.admin.page_size)}}var kF=function(t){return["/pools","service-pools",t]},SF='event'+django.gettext("Logs")+"",CF='computer'+django.gettext("VNC")+"",AF='schedule'+django.gettext("Launch now")+"",MF='perm_identity'+django.gettext("Change owner")+"",IF='perm_identity'+django.gettext("Assign service")+"",TF='cancel'+django.gettext("Cancel")+"",DF='event'+django.gettext("Changelog")+"",EF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtonsScheduledAction=[{id:"launch-action",html:AF,type:RM.SINGLE_SELECT},WM.getGotoButton(jM,"calendarId")],this.customButtonAccessCalendars=[WM.getGotoButton(jM,"calendarId")],this.customButtonsAssignedServices=[{id:"change-owner",html:MF,type:RM.SINGLE_SELECT},{id:"log",html:SF,type:RM.SINGLE_SELECT},{id:"vnc",html:CF,type:RM.ONLY_MENU},WM.getGotoButton(VM,"owner_info.auth_id","owner_info.user_id")],this.customButtonsCachedServices=[{id:"log",html:SF,type:RM.SINGLE_SELECT}],this.customButtonsPublication=[{id:"cancel-publication",html:TF,type:RM.SINGLE_SELECT},{id:"changelog",html:DF,type:RM.ALWAYS}],this.customButtonsGroups=[WM.getGotoButton(zM,"auth_id","id")],this.customButtonsTransports=[WM.getGotoButton(BM,"id")],this.servicePool=null,this.gui=null,this.selectedTab=1}return t.cleanInvalidSelections=function(t){return t.table.selection.selected.filter(function(t){return["E","R","M","S","C"].includes(t.state)}).forEach(function(e){return t.table.selection.deselect(e)}),t.table.selection.isEmpty()},t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("pool");this.assignedServices=this.rest.servicesPools.detail(e,"services"),this.groups=this.rest.servicesPools.detail(e,"groups"),this.transports=this.rest.servicesPools.detail(e,"transports"),this.scheduledActions=this.rest.servicesPools.detail(e,"actions"),this.accessCalendars=this.rest.servicesPools.detail(e,"access"),this.rest.servicesPools.get(e).subscribe(function(n){t.servicePool=n,t.cache=t.servicePool.info.uses_cache?t.rest.servicesPools.detail(e,"cache"):null,t.publications=t.servicePool.info.needs_publication?t.rest.servicesPools.detail(e,"publications"):null,t.servicePool.info.can_list_assignables&&t.customButtonsAssignedServices.push({id:"assign-service",html:IF,type:RM.ALWAYS}),t.rest.servicesPools.gui().subscribe(function(e){t.gui=e.filter(function(e){return!(!1===t.servicePool.info.uses_cache&&["initial_srvs","cache_l1_srvs","cache_l2_srvs","max_srvs"].includes(e.name)||!1===t.servicePool.info.uses_cache_l2&&"cache_l2_srvs"===e.name||!1===t.servicePool.info.needs_manager&&"osmanager_id"===e.name)})})})},t.prototype.onNewAssigned=function(t){},t.prototype.vnc=function(t){var e=new Blob(["[connection]\nhost="+t.ip+"\nport=5900\n"],{type:"application/extension-vnc"});setTimeout(function(){Object(GO.saveAs)(e,t.ip+".vnc")},100)},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;yN.launch(this.api,e,this.assignedServices).subscribe(function(e){return t.table.overview()})}else"log"===t.param.id?JN.launch(this.api,e,this.assignedServices):"assign-service"===t.param.id?oF.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()}):"vnc"===t.param.id&&this.vnc(e)},t.prototype.onCustomCached=function(t){"log"===t.param.id&&JN.launch(this.api,t.table.selection.selected[0],this.cache)},t.prototype.processsAssignedElement=function(t){t.in_use=this.api.yesno(t.in_use),t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onDeleteAssigned=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete assigned service"))},t.prototype.onDeleteCache=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete cached service"))},t.prototype.processsCacheElement=function(t){t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onNewGroup=function(t){DN.launch(this.api,this.servicePool,this.groups).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewTransport=function(t){RN.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteTransport=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned transport"))},t.prototype.onNewPublication=function(t){LN.launch(this.api,this.servicePool).subscribe(function(e){t.table.overview()})},t.prototype.onPublicationRowSelect=function(t){1===t.table.selection.selected.length&&(this.customButtonsPublication[0].disabled=!["P","W","L","K"].includes(t.table.selection.selected[0].state))},t.prototype.onCustomPublication=function(t){var e=this;"cancel-publication"===t.param.id?this.api.gui.yesno(django.gettext("Publication"),django.gettext("Cancel publication?"),!0).subscribe(function(n){n&&e.publications.invoke(t.table.selection.selected[0].id+"/cancel").subscribe(function(n){e.api.gui.snackbar.open(django.gettext("Publication canceled"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})}):"changelog"===t.param.id&&NN.launch(this.api,this.servicePool)},t.prototype.onNewScheduledAction=function(t){QN.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()})},t.prototype.onEditScheduledAction=function(t){QN.launch(this.api,this.servicePool,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteScheduledAction=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete scheduled action"))},t.prototype.onCustomScheduleAction=function(t){var e=this;this.api.gui.yesno(django.gettext("Execute scheduled action"),django.gettext("Execute scheduled action right now?")).subscribe(function(n){n&&e.scheduledActions.invoke(t.table.selection.selected[0].id+"/execute").subscribe(function(){e.api.gui.snackbar.open(django.gettext("Scheduled action executed"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})})},t.prototype.onNewAccessCalendar=function(t){CN.launch(this.api,this.servicePool,this.accessCalendars).subscribe(function(e){return t.table.overview()})},t.prototype.onEditAccessCalendar=function(t){CN.launch(this.api,this.servicePool,this.accessCalendars,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteAccessCalendar=function(t){-1!==t.table.selection.selected[0].id?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.servicesPools.getFallbackAccess(this.servicePool.id).subscribe(function(n){var i=t.table.dataSource.data.filter(function(t){return!0});i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i})},t.prototype.processsCalendarOrScheduledElement=function(t){t.name=t.calendar,t.atStart=this.api.yesno(t.atStart)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction",4,"ngIf","ngIfElse"],["manually_assigned",""],[4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","transports",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","customButtons","onItem","pageSize","customButtonAction","newAction","editAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","customButtons","tableId","onItem","pageSize","newAction","editAction","deleteAction","loaded"],[3,"poolUuid"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","newAction","deleteAction"],["icon","cached",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","publications",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","newAction","rowSelected"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,xF,39,38,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,kF,e.servicePool?e.servicePool.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/pools.png"),Er),Oo(1),nl(" \xa0",null==e.servicePool?null:e.servicePool.name," "),Oo(1),ds("ngIf",null!==e.servicePool))},directives:[Gm,Lh,JA,GA,zA,oR,aF,yR,VS,SR],styles:[".mat-column-state{max-width:10rem;justify-content:center} .mat-column-cache_level, .mat-column-in_use, .mat-column-priority, .mat-column-revision{max-width:7rem;justify-content:center} .mat-column-access, .mat-column-creation_date, .mat-column-publish_date, .mat-column-state_date, .mat-column-trans_type{max-width:9rem} .mat-column-owner{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word} .row-state-C>.mat-cell, .row-state-S>.mat-cell{color:grey!important} .row-state-E>.mat-cell{color:red!important} .row-state-R>.mat-cell{color:orange!important}"]}),t}(),OF=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New meta pool"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit meta pool"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete meta pool"))},t.prototype.onDetail=function(t){this.api.navigation.gotoMetapoolDetail(t.param.id)},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.name=this.api.safeString(this.api.gui.icon(t.thumb)+t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("metapool"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-meta-pools"]],decls:2,vars:6,consts:[["icon","metas",3,"rest","multiSelect","allowExport","onItem","hasPermissions","pageSize","detailAction","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("detailAction",function(t){return e.onDetail(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.metaPools)("multiSelect",!0)("allowExport",!0)("onItem",e.processElement)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[".mat-column-pool_group_name, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center}"]}),t}();function PF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New member pool"),gs())}function RF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit member pool"),gs())}function LF(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",11),Ss("changed",function(t){return rn(n),Ds().servicePoolsFilter=t}),gs()}}function NF(t,e){if(1&t&&(ps(0,"mat-option",12),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var FF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.servicePools=[],this.servicePoolsFilter="",this.model=i.model,this.memberPool={id:void 0,priority:0,pool_id:"",enabled:!0},i.memberPool&&(this.memberPool.id=i.memberPool.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{memberPool:i,model:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.servicesPools.summary().subscribe(function(e){return t.servicePools=e}),this.memberPool.id&&this.model.get(this.memberPool.id).subscribe(function(e){return t.memberPool=e})},t.prototype.filtered=function(t,e){return e?t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}):t},t.prototype.save=function(){var t=this;this.memberPool.pool_id?this.model.save(this.memberPool).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid service pool"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-meta-pools-service-pools"]],decls:30,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"mat-form-field-infix"],[1,"label-enabled"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"h4",0),us(1,PF,2,0,"uds-translate",1),us(2,RF,2,0,"uds-translate",1),gs(),ps(3,"mat-dialog-content"),ps(4,"div",2),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Priority"),gs(),gs(),ps(9,"input",3),Ss("ngModelChange",function(t){return e.memberPool.priority=t}),gs(),gs(),ps(10,"mat-form-field"),ps(11,"mat-label"),ps(12,"uds-translate"),tl(13,"Service pool"),gs(),gs(),ps(14,"mat-select",4),Ss("ngModelChange",function(t){return e.memberPool.pool_id=t}),us(15,LF,1,0,"uds-mat-select-search",5),us(16,NF,2,2,"mat-option",6),gs(),gs(),ps(17,"div",7),ps(18,"span",8),ps(19,"uds-translate"),tl(20,"Enabled?"),gs(),gs(),ps(21,"mat-slide-toggle",4),Ss("ngModelChange",function(t){return e.memberPool.enabled=t}),tl(22),gs(),gs(),gs(),gs(),ps(23,"mat-dialog-actions"),ps(24,"button",9),ps(25,"uds-translate"),tl(26,"Cancel"),gs(),gs(),ps(27,"button",10),Ss("click",function(){return e.save()}),ps(28,"uds-translate"),tl(29,"Ok"),gs(),gs(),gs()),2&t&&(Oo(1),ds("ngIf",!(null!=e.memberPool&&e.memberPool.id)),Oo(1),ds("ngIf",null==e.memberPool?null:e.memberPool.id),Oo(7),ds("ngModel",e.memberPool.priority),Oo(5),ds("ngModel",e.memberPool.pool_id),Oo(1),ds("ngIf",e.servicePools.length>10),Oo(1),ds("ngForOf",e.filtered(e.servicePools,e.servicePoolsFilter)),Oo(5),ds("ngModel",e.memberPool.enabled),Oo(1),nl(" ",e.api.yesno(e.memberPool.enabled)," "))},directives:[SS,Lh,CS,nD,qT,VS,CO,rA,QS,AC,eA,SD,Ph,gL,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-enabled[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function VF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function zF(t,e){if(1&t&&ms(0,"uds-information",17),2&t){var n=Ds(2);ds("value",n.metaPool)("gui",n.gui)}}function BF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Service pools"),gs())}function HF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Assigned services"),gs())}function jF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function GF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Access calendars"),gs())}function UF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function WF(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,VF,2,0,"ng-template",9),ps(5,"div",10),us(6,zF,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,BF,2,0,"ng-template",9),ps(9,"div",10),ps(10,"uds-table",12),Ss("newAction",function(t){return rn(n),Ds().onNewMemberPool(t)})("editAction",function(t){return rn(n),Ds().onEditMemberPool(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteMemberPool(t)}),gs(),gs(),gs(),ps(11,"mat-tab"),us(12,HF,2,0,"ng-template",9),ps(13,"div",10),ps(14,"uds-table",13),Ss("customButtonAction",function(t){return rn(n),Ds().onCustomAssigned(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteAssigned(t)}),gs(),gs(),gs(),ps(15,"mat-tab"),us(16,jF,2,0,"ng-template",9),ps(17,"div",10),ps(18,"uds-table",14),Ss("newAction",function(t){return rn(n),Ds().onNewGroup(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteGroup(t)}),gs(),gs(),gs(),ps(19,"mat-tab"),us(20,GF,2,0,"ng-template",9),ps(21,"div",10),ps(22,"uds-table",15),Ss("newAction",function(t){return rn(n),Ds().onNewAccessCalendar(t)})("editAction",function(t){return rn(n),Ds().onEditAccessCalendar(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteAccessCalendar(t)})("loaded",function(t){return rn(n),Ds().onAccessCalendarLoad(t)}),gs(),gs(),gs(),ps(23,"mat-tab"),us(24,UF,2,0,"ng-template",9),ps(25,"div",10),ms(26,"uds-logs-table",16),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("selectedIndex",i.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",i.metaPool&&i.gui),Oo(4),ds("rest",i.memberPools)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("customButtons",i.customButtons)("tableId","metaPools-d-members"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.memberUserServices)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-services"+i.metaPool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.groups)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-groups"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.accessCalendars)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-access"+i.metaPool.id)("pageSize",i.api.config.admin.page_size)("onItem",i.processsCalendarItem),Oo(4),ds("rest",i.rest.metaPools)("itemId",i.metaPool.id)("tableId","metaPools-d-log"+i.metaPool.id)("pageSize",i.api.config.admin.page_size)}}var YF=function(t){return["/pools","meta-pools",t]},qF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[WM.getGotoButton(FM,"pool_id")],this.customButtonsAssignedServices=[{id:"change-owner",html:MF,type:RM.SINGLE_SELECT},{id:"log",html:SF,type:RM.SINGLE_SELECT},WM.getGotoButton(VM,"owner_info.auth_id","owner_info.user_id")],this.metaPool=null,this.gui=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("metapool");this.rest.metaPools.get(e).subscribe(function(n){t.metaPool=n,t.rest.metaPools.gui().subscribe(function(e){t.gui=e}),t.memberPools=t.rest.metaPools.detail(e,"pools"),t.memberUserServices=t.rest.metaPools.detail(e,"services"),t.groups=t.rest.metaPools.detail(e,"groups"),t.accessCalendars=t.rest.metaPools.detail(e,"access")})},t.prototype.onNewMemberPool=function(t){FF.launch(this.api,this.memberPools).subscribe(function(){return t.table.overview()})},t.prototype.onEditMemberPool=function(t){FF.launch(this.api,this.memberPools,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDeleteMemberPool=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Remove member pool"))},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;yN.launch(this.api,e,this.memberUserServices).subscribe(function(e){return t.table.overview()})}else"log"===t.param.id&&JN.launch(this.api,e,this.memberUserServices)},t.prototype.onDeleteAssigned=function(t){EF.cleanInvalidSelections(t)||this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned service"))},t.prototype.onNewGroup=function(t){DN.launch(this.api,this.metaPool.id,this.groups).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewAccessCalendar=function(t){CN.launch(this.api,this.metaPool,this.accessCalendars).subscribe(function(e){return t.table.overview()})},t.prototype.onEditAccessCalendar=function(t){CN.launch(this.api,this.metaPool,this.accessCalendars,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteAccessCalendar=function(t){console.log("ID",t.table.selection.selected[0].id),-1!==t.table.selection.selected[0].id?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.metaPools.getFallbackAccess(this.metaPool.id).subscribe(function(n){var i=t.table.dataSource.data.filter(function(t){return!0});i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i})},t.prototype.processElement=function(t){t.enabled=this.api.yesno(t.enabled)},t.prototype.processsCalendarItem=function(t){t.name=t.calendar,t.atStart=this.api.yesno(t.atStart)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-meta-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","customButtons","tableId","pageSize","newAction","editAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","groups",3,"rest","multiSelect","allowExport","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","pageSize","onItem","newAction","editAction","deleteAction","loaded"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,WF,27,31,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,YF,e.metaPool?e.metaPool.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/metas.png"),Er),Oo(1),nl(" ",null==e.metaPool?null:e.metaPool.name," "),Oo(1),ds("ngIf",e.metaPool))},directives:[Gm,Lh,JA,GA,zA,oR,yR,VS,SR],styles:[".mat-column-enabled, .mat-column-priority{max-width:8rem;justify-content:center}"]}),t}(),XF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New pool group"),!1).subscribe(function(e){return t.table.overview()})},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit pool group"),!1).subscribe(function(e){return t.table.overview()})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete pool group"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("poolgroup"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-pool-groups"]],decls:1,vars:5,consts:[["icon","spool-group",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.servicesPoolGroups)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".mat-column-priority, .mat-column-thumb{max-width:7rem;justify-content:center}"]}),t}(),ZF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New calendar"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit calendar"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar"))},t.prototype.onDetail=function(t){this.api.navigation.gotoCalendarDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("calendar"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-calendars"]],decls:1,vars:5,consts:[["icon","calendars",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.calendars)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[""]}),t}(),KF=["mat-calendar-body",""];function $F(t,e){if(1&t&&(ps(0,"tr",2),ps(1,"td",3),tl(2),gs(),gs()),2&t){var n=Ds();Oo(1),js("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),ss("colspan",n.numCols),Oo(1),nl(" ",n.label," ")}}function QF(t,e){if(1&t&&(ps(0,"td",7),tl(1),gs()),2&t){var n=Ds(2);js("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),ss("colspan",n._firstRowOffset),Oo(1),nl(" ",n._firstRowOffset>=n.labelMinRequiredCells?n.label:""," ")}}function JF(t,e){if(1&t){var n=bs();ps(0,"td",8),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds(2)._cellClicked(i,t)}),ps(1,"div",9),tl(2),gs(),ms(3,"div",10),gs()}if(2&t){var i=e.$implicit,r=e.index,o=Ds().index,a=Ds();js("width",a._cellWidth)("padding-top",a._cellPadding)("padding-bottom",a._cellPadding),Gs("mat-calendar-body-disabled",!i.enabled)("mat-calendar-body-active",a._isActiveCell(o,r))("mat-calendar-body-range-start",a._isRangeStart(i.compareValue))("mat-calendar-body-range-end",a._isRangeEnd(i.compareValue))("mat-calendar-body-in-range",a._isInRange(i.compareValue))("mat-calendar-body-comparison-bridge-start",a._isComparisonBridgeStart(i.compareValue,o,r))("mat-calendar-body-comparison-bridge-end",a._isComparisonBridgeEnd(i.compareValue,o,r))("mat-calendar-body-comparison-start",a._isComparisonStart(i.compareValue))("mat-calendar-body-comparison-end",a._isComparisonEnd(i.compareValue))("mat-calendar-body-in-comparison-range",a._isInComparisonRange(i.compareValue))("mat-calendar-body-preview-start",a._isPreviewStart(i.compareValue))("mat-calendar-body-preview-end",a._isPreviewEnd(i.compareValue))("mat-calendar-body-in-preview",a._isInPreview(i.compareValue)),ds("ngClass",i.cssClasses)("tabindex",a._isActiveCell(o,r)?0:-1),ss("data-mat-row",o)("data-mat-col",r)("aria-label",i.ariaLabel)("aria-disabled",!i.enabled||null)("aria-selected",a._isSelected(i.compareValue)),Oo(1),Gs("mat-calendar-body-selected",a._isSelected(i.compareValue))("mat-calendar-body-comparison-identical",a._isComparisonIdentical(i.compareValue))("mat-calendar-body-today",a.todayValue===i.compareValue),Oo(1),nl(" ",i.displayValue," ")}}function tV(t,e){if(1&t&&(ps(0,"tr",4),us(1,QF,2,6,"td",5),us(2,JF,4,46,"td",6),gs()),2&t){var n=e.$implicit,i=e.index,r=Ds();Oo(1),ds("ngIf",0===i&&r._firstRowOffset),Oo(1),ds("ngForOf",n)}}function eV(t,e){if(1&t&&(ps(0,"th",5),tl(1),gs()),2&t){var n=e.$implicit;ss("aria-label",n.long),Oo(1),el(n.narrow)}}var nV=["*"];function iV(t,e){}function rV(t,e){if(1&t){var n=bs();ps(0,"mat-month-view",5),Ss("activeDateChange",function(t){return rn(n),Ds().activeDate=t})("_userSelection",function(t){return rn(n),Ds()._dateSelected(t)}),gs()}if(2&t){var i=Ds();ds("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)("comparisonStart",i.comparisonStart)("comparisonEnd",i.comparisonEnd)}}function oV(t,e){if(1&t){var n=bs();ps(0,"mat-year-view",6),Ss("activeDateChange",function(t){return rn(n),Ds().activeDate=t})("monthSelected",function(t){return rn(n),Ds()._monthSelectedInYearView(t)})("selectedChange",function(t){return rn(n),Ds()._goToDateInView(t,"month")}),gs()}if(2&t){var i=Ds();ds("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}function aV(t,e){if(1&t){var n=bs();ps(0,"mat-multi-year-view",7),Ss("activeDateChange",function(t){return rn(n),Ds().activeDate=t})("yearSelected",function(t){return rn(n),Ds()._yearSelectedInMultiYearView(t)})("selectedChange",function(t){return rn(n),Ds()._goToDateInView(t,"year")}),gs()}if(2&t){var i=Ds();ds("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}function sV(t,e){}var lV=["button"];function uV(t,e){1&t&&(On(),ps(0,"svg",3),ms(1,"path",4),gs())}var cV=[[["","matDatepickerToggleIcon",""]]],hV=["[matDatepickerToggleIcon]"],dV=function(){var t=function(){function t(){o(this,t),this.changes=new U,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return s(t,[{key:"formatYearRange",value:function(t,e){return"".concat(t," \u2013 ").concat(e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),fV=function t(e,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,l=arguments.length>6?arguments[6]:void 0;o(this,t),this.value=e,this.displayValue=n,this.ariaLabel=i,this.enabled=r,this.cssClasses=a,this.compareValue=s,this.rawValue=l},pV=function(){var t=function(){function t(e,n){var i=this;o(this,t),this._elementRef=e,this._ngZone=n,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new Bu,this.previewChange=new Bu,this._enterHandler=function(t){if(i._skipNextFocus&&"focus"===t.type)i._skipNextFocus=!1;else if(t.target&&i.isRange){var e=i._getCellFromElement(t.target);e&&i._ngZone.run(function(){return i.previewChange.emit({value:e.enabled?e:null,event:t})})}},this._leaveHandler=function(t){null!==i.previewEnd&&i.isRange&&t.target&&gV(t.target)&&i._ngZone.run(function(){return i.previewChange.emit({value:null,event:t})})},n.runOutsideAngular(function(){var t=e.nativeElement;t.addEventListener("mouseenter",i._enterHandler,!0),t.addEventListener("focus",i._enterHandler,!0),t.addEventListener("mouseleave",i._leaveHandler,!0),t.addEventListener("blur",i._leaveHandler,!0)})}return s(t,[{key:"_cellClicked",value:function(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}},{key:"_isSelected",value:function(t){return this.startValue===t||this.endValue===t}},{key:"ngOnChanges",value:function(t){var e=t.numCols,n=this.rows,i=this.numCols;(t.rows||e)&&(this._firstRowOffset=n&&n.length&&n[0].length?i-n[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding="".concat(50*this.cellAspectRatio/i,"%")),!e&&this._cellWidth||(this._cellWidth="".concat(100/i,"%"))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}},{key:"_isActiveCell",value:function(t,e){var n=t*this.numCols+e;return t&&(n-=this._firstRowOffset),n==this.activeCell}},{key:"_focusActiveCell",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.pipe(Nf(1)).subscribe(function(){var n=t._elementRef.nativeElement.querySelector(".mat-calendar-body-active");n&&(e||(t._skipNextFocus=!0),n.focus())})})}},{key:"_isRangeStart",value:function(t){return mV(t,this.startValue,this.endValue)}},{key:"_isRangeEnd",value:function(t){return vV(t,this.startValue,this.endValue)}},{key:"_isInRange",value:function(t){return yV(t,this.startValue,this.endValue,this.isRange)}},{key:"_isComparisonStart",value:function(t){return mV(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isComparisonBridgeStart",value:function(t,e,n){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;var i=this.rows[e][n-1];if(!i){var r=this.rows[e-1];i=r&&r[r.length-1]}return i&&!this._isRangeEnd(i.compareValue)}},{key:"_isComparisonBridgeEnd",value:function(t,e,n){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;var i=this.rows[e][n+1];if(!i){var r=this.rows[e+1];i=r&&r[0]}return i&&!this._isRangeStart(i.compareValue)}},{key:"_isComparisonEnd",value:function(t){return vV(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isInComparisonRange",value:function(t){return yV(t,this.comparisonStart,this.comparisonEnd,this.isRange)}},{key:"_isComparisonIdentical",value:function(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}},{key:"_isPreviewStart",value:function(t){return mV(t,this.previewStart,this.previewEnd)}},{key:"_isPreviewEnd",value:function(t){return vV(t,this.previewStart,this.previewEnd)}},{key:"_isInPreview",value:function(t){return yV(t,this.previewStart,this.previewEnd,this.isRange)}},{key:"_getCellFromElement",value:function(t){var e;if(gV(t)?e=t:gV(t.parentNode)&&(e=t.parentNode),e){var n=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(n&&i)return this.rows[parseInt(n)][parseInt(i)]}return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc))},t.\u0275cmp=he({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[Ee],attrs:KF,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(us(0,$F,3,6,"tr",0),us(1,tV,3,2,"tr",1)),2&t&&(ds("ngIf",e._firstRowOffset.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t}();function gV(t){return"TD"===t.nodeName}function mV(t,e,n){return null!==n&&e!==n&&t=e&&t===n}function yV(t,e,n,i){return i&&null!==e&&null!==n&&e!==n&&t>=e&&t<=n}var _V=function t(e,n){o(this,t),this.start=e,this.end=n},bV=function(){var t=function(){function t(e,n){o(this,t),this.selection=e,this._adapter=n,this._selectionChanged=new U,this.selectionChanged=this._selectionChanged,this.selection=e}return s(t,[{key:"updateSelection",value:function(t,e){var n=this.selection;this.selection=t,this._selectionChanged.next({selection:t,source:e,oldValue:n})}},{key:"ngOnDestroy",value:function(){this._selectionChanged.complete()}},{key:"_isValidDateInstance",value:function(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}},{key:"clone",value:function(){return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(void 0),zi(Sk))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),wV=function(){var t=function(t){u(n,t);var e=p(n);function n(t){return o(this,n),e.call(this,null,t)}return s(n,[{key:"add",value:function(t){r(i(n.prototype),"updateSelection",this).call(this,t,this)}},{key:"isValid",value:function(){return null!=this.selection&&this._isValidDateInstance(this.selection)}},{key:"isComplete",value:function(){return null!=this.selection}},{key:"clone",value:function(){var t=new n(this._adapter);return t.updateSelection(this.selection,this),t}}]),n}(bV);return t.\u0275fac=function(e){return new(e||t)(zi(Sk))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),xV={provide:bV,deps:[[new qi,new Xi,bV],Sk],useFactory:function(t,e){return t||new wV(e)}},kV=new wi("MAT_DATE_RANGE_SELECTION_STRATEGY"),SV=function(){var t=function(){function t(e,n,i,r,a){o(this,t),this._changeDetectorRef=e,this._dateFormats=n,this._dateAdapter=i,this._dir=r,this._rangeStrategy=a,this._rerenderSubscription=M.EMPTY,this.selectedChange=new Bu,this._userSelection=new Bu,this.activeDateChange=new Bu,this._activeDate=this._dateAdapter.today()}return s(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(zf(null)).subscribe(function(){return t._init()})}},{key:"ngOnChanges",value:function(t){var e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_dateSelected",value:function(t){var e,n,i=t.value,r=this._dateAdapter.getYear(this.activeDate),o=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.createDate(r,o,i);this._selected instanceof _V?(e=this._getDateInCurrentMonth(this._selected.start),n=this._getDateInCurrentMonth(this._selected.end)):e=n=this._getDateInCurrentMonth(this._selected),e===i&&n===i||this.selectedChange.emit(a),this._userSelection.emit({value:a,event:t.event}),this._previewStart=this._previewEnd=null,this._changeDetectorRef.markForCheck()}},{key:"_handleCalendarBodyKeydown",value:function(t){var e=this._activeDate,n=this._isRtl();switch(t.keyCode){case Ny:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case Vy:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case Fy:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case zy:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case Ly:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case Ry:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case Ey:case Py:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case Oy:return void(null==this._previewEnd||By(t)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}},{key:"_init",value:function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}},{key:"_focusActiveCell",value:function(t){this._matCalendarBody._focusActiveCell(t)}},{key:"_previewChanged",value:function(t){var e=t.value;if(this._rangeStrategy){var n=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(n.start),this._previewEnd=this._getCellCompareValue(n.end),this._changeDetectorRef.detectChanges()}}},{key:"_initWeekdays",value:function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),n=this._dateAdapter.getDayOfWeekNames("long").map(function(t,n){return{long:t,narrow:e[n]}});this._weekdays=n.slice(t).concat(n.slice(0,t))}},{key:"_createWeekCells",value:function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var n=0,i=this._firstWeekOffset;n=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}},{key:"_getDateInCurrentMonth",value:function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}},{key:"_hasSameMonthAndYear",value:function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}},{key:"_getCellCompareValue",value:function(t){if(t){var e=this._dateAdapter.getYear(t),n=this._dateAdapter.getMonth(t),i=this._dateAdapter.getDate(t);return new Date(e,n,i).getTime()}return null}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setRanges",value:function(t){t instanceof _V?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}},{key:"activeDate",get:function(){return this._activeDate},set:function(t){var e=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t instanceof _V?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}},{key:"minDate",get:function(){return this._minDate},set:function(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"maxDate",get:function(){return this._maxDate},set:function(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs(Ck,8),hs(Sk,8),hs(uy,8),hs(kV,8))},t.\u0275cmp=he({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){var n;1&t&&Ju(pV,1),2&t&&Qu(n=ec())&&(e._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[Ee],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(ps(0,"table",0),ps(1,"thead",1),ps(2,"tr"),us(3,eV,2,2,"th",2),gs(),ps(4,"tr"),ms(5,"th",3),gs(),gs(),ps(6,"tbody",4),Ss("selectedValueChange",function(t){return e._dateSelected(t)})("previewChange",function(t){return e._previewChanged(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),gs(),gs()),2&t&&(Oo(3),ds("ngForOf",e._weekdays),Oo(3),ds("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[Ph,pV],encapsulation:2,changeDetection:0}),t}(),CV=24,AV=function(){var t=function(){function t(e,n,i){o(this,t),this._changeDetectorRef=e,this._dateAdapter=n,this._dir=i,this._rerenderSubscription=M.EMPTY,this.selectedChange=new Bu,this.yearSelected=new Bu,this.activeDateChange=new Bu,this._activeDate=this._dateAdapter.today()}return s(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(zf(null)).subscribe(function(){return t._init()})}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_init",value:function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate)-IV(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var n=0,i=[];nthis._dateAdapter.getYear(this.maxDate)||this.minDate&&tn||t===n&&e>i}return!1}},{key:"_isYearAndMonthBeforeMinDate",value:function(t,e){if(this.minDate){var n=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return t enter",mb("120ms cubic-bezier(0, 0, 0.2, 1)",yb({opacity:1,transform:"scale(1, 1)"}))),wb("* => void",mb("100ms linear",yb({opacity:0})))]),fadeInCalendar:gb("fadeInCalendar",[_b("void",yb({opacity:0})),_b("enter",yb({opacity:1})),wb("void => *",mb("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},LV=0,NV=new wi("mat-datepicker-scroll-strategy"),FV={provide:NV,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},VV=vk(function t(e){o(this,t),this._elementRef=e}),zV=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this,t))._changeDetectorRef=i,u._globalModel=r,u._dateAdapter=a,u._rangeSelectionStrategy=s,u._subscriptions=new M,u._animationState="enter",u._animationDone=new U,u._actionsPortal=null,u._closeButtonText=(null==l?void 0:l.closeCalendarLabel)||"Close calendar",u}return s(n,[{key:"ngOnInit",value:function(){this._model=this._actionsPortal?this._globalModel.clone():this._globalModel}},{key:"ngAfterViewInit",value:function(){var t=this;this._subscriptions.add(this.datepicker.stateChanges.subscribe(function(){t._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}},{key:"ngOnDestroy",value:function(){this._subscriptions.unsubscribe(),this._animationDone.complete()}},{key:"_handleUserSelection",value:function(t){var e=this._model.selection,n=t.value,i=e instanceof _V;if(i&&this._rangeSelectionStrategy){var r=this._rangeSelectionStrategy.selectionFinished(n,e,t.event);this._model.updateSelection(r,this)}else!n||!i&&this._dateAdapter.sameDate(n,e)||this._model.add(n);this._model&&!this._model.isComplete()||this._actionsPortal||this.datepicker.close()}},{key:"_startExitAnimation",value:function(){this._animationState="void",this._changeDetectorRef.markForCheck()}},{key:"_getSelected",value:function(){return this._model.selection}},{key:"_applyPendingSelection",value:function(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}}]),n}(VV);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(bV),hs(Sk),hs(kV,8),hs(dV))},t.\u0275cmp=he({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){var n;1&t&&Ju(PV,1),2&t&&Qu(n=ec())&&(e._calendar=n.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&Cs("@transformPanel.done",function(){return e._animationDone.next()}),2&t&&(ol("@transformPanel",e._animationState),Gs("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[Xa],decls:5,vars:20,consts:[["cdkTrapFocus","",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","viewChanged","_userSelection"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"mat-calendar",1),Ss("yearSelected",function(t){return e.datepicker._selectYear(t)})("monthSelected",function(t){return e.datepicker._selectMonth(t)})("viewChanged",function(t){return e.datepicker._viewChanged(t)})("_userSelection",function(t){return e._handleUserSelection(t)}),gs(),us(2,sV,0,0,"ng-template",2),ps(3,"button",3),Ss("focus",function(){return e._closeButtonFocused=!0})("blur",function(){return e._closeButtonFocused=!1})("click",function(){return e.datepicker.close()}),tl(4),gs(),gs()),2&t&&(Gs("mat-datepicker-content-container-with-actions",e._actionsPortal),Oo(1),ds("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter"),Oo(1),ds("cdkPortalOutlet",e._actionsPortal),Oo(1),Gs("cdk-visually-hidden",!e._closeButtonFocused),ds("color",e.color||"primary"),Oo(1),el(e._closeButtonText))},directives:[X_,PV,Eh,My,LS],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"],encapsulation:2,data:{animation:[RV.transformPanel,RV.fadeInCalendar]},changeDetection:0}),t}(),BV=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c){o(this,t),this._dialog=e,this._overlay=n,this._ngZone=i,this._viewContainerRef=r,this._dateAdapter=s,this._dir=l,this._document=u,this._model=c,this._inputStateChanges=M.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,this.yearSelected=new Bu,this.monthSelected=new Bu,this.viewChanged=new Bu(!0),this.openedStream=new Bu,this.closedStream=new Bu,this._opened=!1,this.id="mat-datepicker-".concat(LV++),this._focusedElementBeforeOpen=null,this._backdropHarnessClass="".concat(this.id,"-backdrop"),this.stateChanges=new U,this._scrollStrategy=a}return s(t,[{key:"_getMinDate",value:function(){return this.datepickerInput&&this.datepickerInput.min}},{key:"_getMaxDate",value:function(){return this.datepickerInput&&this.datepickerInput.max}},{key:"_getDateFilter",value:function(){return this.datepickerInput&&this.datepickerInput.dateFilter}},{key:"ngOnChanges",value:function(t){var e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this.stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}},{key:"select",value:function(t){this._model.add(t)}},{key:"_selectYear",value:function(t){this.yearSelected.emit(t)}},{key:"_selectMonth",value:function(t){this.monthSelected.emit(t)}},{key:"_viewChanged",value:function(t){this.viewChanged.emit(t)}},{key:"registerInput",value:function(t){var e=this;return this._inputStateChanges.unsubscribe(),this.datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(function(){return e.stateChanges.next(void 0)}),this._model}},{key:"registerActions",value:function(t){this._actionsPortal=t}},{key:"removeActions",value:function(t){t===this._actionsPortal&&(this._actionsPortal=null)}},{key:"open",value:function(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}},{key:"close",value:function(){var t=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe(Nf(1)).subscribe(function(){return t._destroyPopup()})}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}}},{key:"_applyPendingSelection",value:function(){var t,e,n=(null===(t=this._popupComponentRef)||void 0===t?void 0:t.instance)||(null===(e=this._dialogRef)||void 0===e?void 0:e.componentInstance);null==n||n._applyPendingSelection()}},{key:"_openAsDialog",value:function(){var t=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(zV,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!1,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(function(){return t.close()}),this._forwardContentValues(this._dialogRef.componentInstance)}},{key:"_openAsPopup",value:function(){var t=this,e=new wy(zV,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){t._popupRef.updatePosition()})}},{key:"_forwardContentValues",value:function(t){t.datepicker=this,t.color=this.color,t._actionsPortal=this._actionsPortal}},{key:"_createPopup",value:function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new Zy({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),dt(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Ld(function(e){return e.keyCode===Oy&&!By(e)||t.datepickerInput&&By(e,"altKey")&&e.keyCode===Fy}))).subscribe(function(e){e&&e.preventDefault(),t.close()})}},{key:"_destroyPopup",value:function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}},{key:"_setConnectedPositions",value:function(t){var e="end"===this.xPosition?"end":"start",n="start"===e?"end":"start",i="above"===this.yPosition?"bottom":"top",r="top"===i?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:i},{originX:e,originY:i,overlayX:e,overlayY:r},{originX:n,originY:r,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:r}])}},{key:"startAt",get:function(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)},set:function(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"color",get:function(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)},set:function(t){this._color=t}},{key:"touchUi",get:function(){return this._touchUi},set:function(t){this._touchUi=fv(t)}},{key:"disabled",get:function(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled},set:function(t){var e=fv(t);e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}},{key:"restoreFocus",get:function(){return this._restoreFocus},set:function(t){this._restoreFocus=fv(t)}},{key:"panelClass",get:function(){return this._panelClass},set:function(t){this._panelClass=_v(t)}},{key:"opened",get:function(){return this._opened},set:function(t){fv(t)?this.open():this.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(wS),hs(g_),hs(Mc),hs(pu),hs(NV),hs(Sk,8),hs(uy,8),hs(uh,8),hs(bV))},t.\u0275dir=ve({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",restoreFocus:"restoreFocus",panelClass:"panelClass",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[Ee]}),t}(),HV=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(BV);return t.\u0275fac=function(e){return jV(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[wl([xV,{provide:BV,useExisting:t}]),Xa],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t}(),jV=mi(HV),GV=function t(e,n){o(this,t),this.target=e,this.targetElement=n,this.value=this.target.value},UV=function(){var t=function(){function t(e,n,i){var r=this;o(this,t),this._elementRef=e,this._dateAdapter=n,this._dateFormats=i,this.dateChange=new Bu,this.dateInput=new Bu,this.stateChanges=new U,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=M.EMPTY,this._localeSubscription=M.EMPTY,this._parseValidator=function(){return r._lastValueValid?null:{matDatepickerParse:{text:r._elementRef.nativeElement.value}}},this._filterValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value));return!e||r._matchesFilter(e)?null:{matDatepickerFilter:!0}},this._minValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMinDate();return!n||!e||r._dateAdapter.compareDate(n,e)<=0?null:{matDatepickerMin:{min:n,actual:e}}},this._maxValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMaxDate();return!n||!e||r._dateAdapter.compareDate(n,e)>=0?null:{matDatepickerMax:{max:n,actual:e}}},this._lastValueValid=!1,this._localeSubscription=n.localeChanges.subscribe(function(){r._assignValueProgrammatically(r.value)})}return s(t,[{key:"_getValidators",value:function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}},{key:"_registerModel",value:function(t){var e=this;this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(function(t){if(e._shouldHandleChangeEvent(t)){var n=e._getValueFromModel(t.selection);e._lastValueValid=e._isValidValue(n),e._cvaOnChange(n),e._onTouched(),e._formatValue(n),e.dateInput.emit(new GV(e,e._elementRef.nativeElement)),e.dateChange.emit(new GV(e,e._elementRef.nativeElement))}})}},{key:"ngAfterViewInit",value:function(){this._isInitialized=!0}},{key:"ngOnChanges",value:function(t){(function(t,e){for(var n=0,i=Object.keys(t);n2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):r=!0,r?Promise.resolve().then(function(){return n._updateModelValue(i)}):this._updateModelValue(i)}},{key:"_isSelected",value:function(t){return this._selectionModel&&this._selectionModel.isSelected(t)}},{key:"_isPrechecked",value:function(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(function(e){return null!=t.value&&e===t.value}):t.value===this._rawValue)}},{key:"_setSelectionByValue",value:function(t){var e=this;this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(function(t){return e._selectValue(t)})):(this._clearSelection(),this._selectValue(t)))}},{key:"_clearSelection",value:function(){this._selectionModel.clear(),this._buttonToggles.forEach(function(t){return t.checked=!1})}},{key:"_selectValue",value:function(t){var e=this._buttonToggles.find(function(e){return null!=e.value&&e.value===t});e&&(e.checked=!0,this._selectionModel.select(e))}},{key:"_updateModelValue",value:function(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}},{key:"name",get:function(){return this._name},set:function(t){var e=this;this._name=t,this._buttonToggles&&this._buttonToggles.forEach(function(t){t.name=e._name,t._markForCheck()})}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=fv(t)}},{key:"value",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(function(t){return t.value}):t[0]?t[0].value:void 0},set:function(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}},{key:"selected",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=fv(t)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=fv(t),this._buttonToggles&&this._buttonToggles.forEach(function(t){return t._markForCheck()})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs(JV,8))},t.\u0275dir=ve({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,az,1),2&t&&Qu(i=ec())&&(e._buttonToggles=i)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(ss("aria-disabled",e.disabled),Gs("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[wl([ez,{provide:tz,useExisting:t}])]}),t}(),oz=yk(function t(){o(this,t)}),az=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;o(this,n),(u=e.call(this))._changeDetectorRef=i,u._elementRef=r,u._focusMonitor=a,u._isSingleSelector=!1,u._checked=!1,u.ariaLabelledby=null,u._disabled=!1,u.change=new Bu;var c=Number(s);return u.tabIndex=c||0===c?c:null,u.buttonToggleGroup=t,u.appearance=l&&l.appearance?l.appearance:"standard",u}return s(n,[{key:"ngOnInit",value:function(){var t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-".concat(nz++),this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}},{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){var t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}},{key:"focus",value:function(t){this._buttonElement.nativeElement.focus(t)}},{key:"_onButtonClick",value:function(){var t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new iz(this,this.value))}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}},{key:"buttonId",get:function(){return"".concat(this.id,"-button")}},{key:"appearance",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance},set:function(t){this._appearance=t}},{key:"checked",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked},set:function(t){var e=fv(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(t){this._disabled=fv(t)}}]),n}(oz);return t.\u0275fac=function(e){return new(e||t)(hs(tz,8),hs(eu),hs(Tl),hs(ib),yi("tabindex"),hs(JV,8))},t.\u0275cmp=he({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var n;1&t&&Ju($V,1),2&t&&Qu(n=ec())&&(e._buttonElement=n.first)},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(t,e){1&t&&Ss("focus",function(){return e.focus()}),2&t&&(ss("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),Gs("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[Xa],ngContentSelectors:QV,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(Os(),ps(0,"button",0,1),Ss("click",function(){return e._onButtonClick()}),ps(2,"span",2),Ps(3),gs(),gs(),ms(4,"span",3),ms(5,"span",4)),2&t){var n=cs(1);ds("id",e.buttonId)("disabled",e.disabled||null),ss("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Oo(5),ds("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[Wk],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t}(),sz=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk,Yk],gk]}),t}();function lz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit rule"),gs())}function uz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New rule"),gs())}function cz(t,e){if(1&t&&(ps(0,"mat-option",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.value," ")}}function hz(t,e){if(1&t&&(ps(0,"mat-option",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.value," ")}}function dz(t,e){if(1&t&&(ps(0,"mat-button-toggle",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.value," ")}}function fz(t,e){if(1&t){var n=bs();ps(0,"div",23),ps(1,"span",24),ps(2,"uds-translate"),tl(3,"Weekdays"),gs(),gs(),ps(4,"mat-button-toggle-group",25),Ss("ngModelChange",function(t){return rn(n),Ds().wDays=t}),us(5,dz,2,2,"mat-button-toggle",8),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.wDays),Oo(1),ds("ngForOf",i.weekDays)}}function pz(t,e){if(1&t){var n=bs();ps(0,"mat-form-field",9),ps(1,"mat-label"),ps(2,"uds-translate"),tl(3,"Repeat every"),gs(),gs(),ps(4,"input",6),Ss("ngModelChange",function(t){return rn(n),Ds().rule.interval=t}),gs(),ps(5,"div",26),tl(6),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.rule.interval),Oo(2),nl("\xa0",i.frequency(),"")}}var gz={DAILY:[django.gettext("day"),django.gettext("days"),django.gettext("Daily")],WEEKLY:[django.gettext("week"),django.gettext("weeks"),django.gettext("Weekly")],MONTHLY:[django.gettext("month"),django.gettext("months"),django.gettext("Monthly")],YEARLY:[django.gettext("year"),django.gettext("years"),django.gettext("Yearly")],WEEKDAYS:["","",django.gettext("Weekdays")]},mz={MINUTES:django.gettext("Minutes"),HOURS:django.gettext("Hours"),DAYS:django.gettext("Days"),WEEKS:django.gettext("Weeks")},vz=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")],yz=function(t,e){void 0===e&&(e=!1);for(var n=new Array,i=0;i<7;i++)1&t&&n.push(vz[i].substr(0,e?100:3)),t>>=1;return n.length?n.join(", "):django.gettext("(no days)")},_z=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.dunits=Object.keys(mz).map(function(t){return{id:t,value:mz[t]}}),this.freqs=Object.keys(gz).map(function(t){return{id:t,value:gz[t][2]}}),this.weekDays=vz.map(function(t,e){return{id:1<0?" "+django.gettext("and every event will be active for")+" "+this.rule.duration+" "+mz[this.rule.duration_unit]:django.gettext("with no duration")}return t.replace("$FIELD",n)},t.prototype.save=function(){var t=this;this.rules.save(this.rule).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-calendar-rule"]],decls:73,vars:21,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],[1,"oneThird"],["matInput","","type","time",3,"ngModel","ngModelChange"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","ngModelChange"],["matSuffix","",3,"for"],["startDatePicker",""],["matInput","",3,"matDatepicker","ngModel","placeholder","ngModelChange"],["endDatePicker",""],[1,"weekdays"],[3,"ngModel","ngModelChange","valueChange"],["class","oneHalf mat-form-field-infix",4,"ngIf"],["class","oneHalf",4,"ngIf"],[1,"info"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"disabled","click"],[3,"value"],[1,"oneHalf","mat-form-field-infix"],[1,"label-weekdays"],["multiple","",3,"ngModel","ngModelChange"],["matSuffix",""]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,lz,2,0,"uds-translate",1),us(2,uz,2,0,"uds-translate",1),gs(),ps(3,"mat-dialog-content"),ps(4,"div",2),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Name"),gs(),gs(),ps(9,"input",3),Ss("ngModelChange",function(t){return e.rule.name=t}),gs(),gs(),ps(10,"mat-form-field"),ps(11,"mat-label"),ps(12,"uds-translate"),tl(13,"Comments"),gs(),gs(),ps(14,"input",3),Ss("ngModelChange",function(t){return e.rule.comments=t}),gs(),gs(),ps(15,"h3"),ps(16,"uds-translate"),tl(17,"Event"),gs(),gs(),ps(18,"mat-form-field",4),ps(19,"mat-label"),ps(20,"uds-translate"),tl(21,"Start time"),gs(),gs(),ps(22,"input",5),Ss("ngModelChange",function(t){return e.startTime=t}),gs(),gs(),ps(23,"mat-form-field",4),ps(24,"mat-label"),ps(25,"uds-translate"),tl(26,"Duration"),gs(),gs(),ps(27,"input",6),Ss("ngModelChange",function(t){return e.rule.duration=t}),gs(),gs(),ps(28,"mat-form-field",4),ps(29,"mat-label"),ps(30,"uds-translate"),tl(31,"Duration units"),gs(),gs(),ps(32,"mat-select",7),Ss("ngModelChange",function(t){return e.rule.duration_unit=t}),us(33,cz,2,2,"mat-option",8),gs(),gs(),ps(34,"h3"),tl(35," Repetition "),gs(),ps(36,"mat-form-field",9),ps(37,"mat-label"),ps(38,"uds-translate"),tl(39," Start date "),gs(),gs(),ps(40,"input",10),Ss("ngModelChange",function(t){return e.startDate=t}),gs(),ms(41,"mat-datepicker-toggle",11),ms(42,"mat-datepicker",null,12),gs(),ps(44,"mat-form-field",9),ps(45,"mat-label"),ps(46,"uds-translate"),tl(47," Repeat until date "),gs(),gs(),ps(48,"input",13),Ss("ngModelChange",function(t){return e.endDate=t}),gs(),ms(49,"mat-datepicker-toggle",11),ms(50,"mat-datepicker",null,14),gs(),ps(52,"div",15),ps(53,"mat-form-field",9),ps(54,"mat-label"),ps(55,"uds-translate"),tl(56,"Frequency"),gs(),gs(),ps(57,"mat-select",16),Ss("ngModelChange",function(t){return e.rule.frequency=t})("valueChange",function(){return e.rule.interval=1}),us(58,hz,2,2,"mat-option",8),gs(),gs(),us(59,fz,6,2,"div",17),us(60,pz,7,2,"mat-form-field",18),gs(),ps(61,"h3"),ps(62,"uds-translate"),tl(63,"Summary"),gs(),gs(),ps(64,"div",19),tl(65),gs(),gs(),gs(),ps(66,"mat-dialog-actions"),ps(67,"button",20),ps(68,"uds-translate"),tl(69,"Cancel"),gs(),gs(),ps(70,"button",21),Ss("click",function(){return e.save()}),ps(71,"uds-translate"),tl(72,"Ok"),gs(),gs(),gs()),2&t){var n=cs(43),i=cs(51);Oo(1),ds("ngIf",e.rule.id),Oo(1),ds("ngIf",!e.rule.id),Oo(7),ds("ngModel",e.rule.name),Oo(5),ds("ngModel",e.rule.comments),Oo(8),ds("ngModel",e.startTime),Oo(5),ds("ngModel",e.rule.duration),Oo(5),ds("ngModel",e.rule.duration_unit),Oo(1),ds("ngForOf",e.dunits),Oo(7),ds("matDatepicker",n)("ngModel",e.startDate),Oo(1),ds("for",n),Oo(7),ds("matDatepicker",i)("ngModel",e.endDate)("placeholder",e.FOREVER_STRING),Oo(1),ds("for",i),Oo(8),ds("ngModel",e.rule.frequency),Oo(1),ds("ngForOf",e.freqs),Oo(1),ds("ngIf","WEEKDAYS"===e.rule.frequency),Oo(1),ds("ngIf","WEEKDAYS"!==e.rule.frequency),Oo(5),nl(" ",e.summary()," "),Oo(5),ds("disabled",null!==e.updateRuleData()||""===e.rule.name)}},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,rA,SD,Ph,qV,ZV,$T,HV,AS,LS,kS,iS,rz,az],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]:not(.oneThird):not(.oneHalf){width:100%}.mat-form-field.oneThird[_ngcontent-%COMP%]{width:31%;margin-right:2%}.mat-form-field.oneHalf[_ngcontent-%COMP%]{width:48%;margin-right:2%}h3[_ngcontent-%COMP%]{width:100%;margin-top:.3rem;margin-bottom:1rem}.weekdays[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end}.label-weekdays[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.mat-datepicker-toggle[_ngcontent-%COMP%]{color:#00f}.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:rgba(35,35,133,.5);color:#fff}"]}),t}();function bz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Rules"),gs())}function wz(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),ps(3,"mat-tab"),us(4,bz,2,0,"ng-template",9),ps(5,"div",10),ps(6,"uds-table",11),Ss("newAction",function(t){return rn(n),Ds().onNewRule(t)})("editAction",function(t){return rn(n),Ds().onEditRule(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteRule(t)}),gs(),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("@.disabled",!0),Oo(4),ds("rest",i.calendarRules)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","calendars-d-rules"+i.calendar.id)("pageSize",i.api.config.admin.page_size)}}var xz=function(t){return["/pools","calendars",t]},kz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("calendar");this.rest.calendars.get(e).subscribe(function(e){t.calendar=e,t.calendarRules=t.rest.calendars.detail(e.id,"rules")})},t.prototype.onNewRule=function(t){_z.launch(this.api,this.calendarRules).subscribe(function(){return t.table.overview()})},t.prototype.onEditRule=function(t){_z.launch(this.api,this.calendarRules,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDeleteRule=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar rule"))},t.prototype.processElement=function(t){!function(t){t.interval="WEEKDAYS"===t.frequency?yz(t.interval):t.interval+" "+gz[t.frequency][django.pluralidx(t.interval)],t.duration=t.duration+" "+mz[t.duration_unit]}(t)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-calendars-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","pageSize","newAction","editAction","deleteAction"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,wz,7,7,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,xz,e.calendar?e.calendar.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/calendars.png"),Er),Oo(1),nl(" ",null==e.calendar?null:e.calendar.name," "),Oo(1),ds("ngIf",e.calendar))},directives:[Gm,Lh,JA,GA,zA,oR,VS],styles:[".mat-column-end, .mat-column-frequency, .mat-column-start{max-width:9rem} .mat-column-duration, .mat-column-interval{max-width:11rem}"]}),t}(),Sz='event'+django.gettext("Set time mark")+"",Cz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"timemark",html:Sz,type:RM.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New account"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit account"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account"))},t.prototype.onTimeMark=function(t){var e=this,n=t.table.selection.selected[0];this.api.gui.yesno(django.gettext("Time mark"),django.gettext("Set time mark for $NAME to current date/time?").replace("$NAME",n.name)).subscribe(function(i){i&&e.rest.accounts.timemark(n.id).subscribe(function(){e.api.gui.snackbar.open(django.gettext("Time mark stablished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})})},t.prototype.onDetail=function(t){this.api.navigation.gotoAccountDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("account"))},t.prototype.processElement=function(t){t.time_mark=78793200===t.time_mark?django.gettext("No time mark"):qI("SHORT_DATE_FORMAT",t.time_mark)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-accounts"]],decls:1,vars:7,consts:[["icon","accounts",3,"rest","multiSelect","allowExport","hasPermissions","customButtons","pageSize","onItem","customButtonAction","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("customButtonAction",function(t){return e.onTimeMark(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.accounts)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("onItem",e.processElement)},directives:[oR],styles:[""]}),t}();function Az(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Account usage"),gs())}function Mz(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),ps(3,"mat-tab"),us(4,Az,2,0,"ng-template",9),ps(5,"div",10),ps(6,"uds-table",11),Ss("deleteAction",function(t){return rn(n),Ds().onDeleteUsage(t)}),gs(),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("@.disabled",!0),Oo(4),ds("rest",i.accountUsage)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","account-d-usage"+i.account.id)}}var Iz=function(t){return["/pools","accounts",t]},Tz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("account");this.rest.accounts.get(e).subscribe(function(e){t.account=e,t.accountUsage=t.rest.accounts.detail(e.id,"usage")})},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account usage"))},t.prototype.processElement=function(t){t.running=this.api.yesno(t.running)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-accounts-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","accounts",3,"rest","multiSelect","allowExport","onItem","tableId","deleteAction"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,Mz,7,6,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,Iz,e.account?e.account.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/accounts.png"),Er),Oo(1),nl(" ",null==e.account?null:e.account.name," "),Oo(1),ds("ngIf",e.account))},directives:[Gm,Lh,JA,GA,zA,oR,VS],styles:[""]}),t}();function Dz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New image for"),gs())}function Ez(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit for"),gs())}var Oz=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.preview="",this.image={id:void 0,data:"",name:""},i.image&&(this.image.id=i.image.id)}return t.launch=function(e,n){void 0===n&&(n=null);var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{image:n},disableClose:!0}).componentInstance.onSave},t.prototype.onFileChanged=function(t){var e=this,n=t.target.files[0];if(n.size>262144)this.api.gui.alert(django.gettext("Error"),django.gettext("Image is too big (max. upload size is 256Kb)"));else if(["image/jpeg","image/png","image/gif"].includes(n.type)){var i=new FileReader;i.onload=function(t){var r=i.result;e.preview=r,e.image.data=r.substr(r.indexOf("base64,")+7),e.image.name||(e.image.name=n.name)},i.readAsDataURL(n)}else this.api.gui.alert(django.gettext("Error"),django.gettext("Invalid image type (only supports JPEG, PNG and GIF"))},t.prototype.ngOnInit=function(){var t=this;this.image.id&&this.rest.gallery.get(this.image.id).subscribe(function(e){switch(t.image=e,t.image.data.substr(2)){case"iV":t.preview="data:image/png;base64,"+t.image.data;break;case"/9":t.preview="data:image/jpeg;base64,"+t.image.data;break;default:t.preview="data:image/gif;base64,"+t.image.data}})},t.prototype.background=function(){var t=this.api.config.image_size[0],e=this.api.config.image_size[1],n={"width.px":t,"height.px":e,"background-size":t+"px "+e+"px"};return this.preview&&(n["background-image"]="url("+this.preview+")"),n},t.prototype.save=function(){var t=this;this.image.name&&this.image.data?this.rest.gallery.save(this.image).subscribe(function(){t.api.gui.snackbar.open(django.gettext("Successfully saved"),django.gettext("dismiss"),{duration:2e3}),t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, provide a name and a image"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-gallery-image"]],decls:32,vars:7,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["type","file",2,"display","none",3,"change"],["fileInput",""],["matInput","","type","text",3,"hidden","click"],[1,"preview",3,"click"],[1,"image-preview",3,"ngStyle"],[1,"help"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){if(1&t){var n=bs();ps(0,"h4",0),us(1,Dz,2,0,"uds-translate",1),us(2,Ez,2,0,"uds-translate",1),gs(),ps(3,"mat-dialog-content"),ps(4,"div",2),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Image name"),gs(),gs(),ps(9,"input",3),Ss("ngModelChange",function(t){return e.image.name=t}),gs(),gs(),ps(10,"input",4,5),Ss("change",function(t){return e.onFileChanged(t)}),gs(),ps(12,"mat-form-field"),ps(13,"mat-label"),ps(14,"uds-translate"),tl(15,"Image (click to change)"),gs(),gs(),ps(16,"input",6),Ss("click",function(){return rn(n),cs(11).click()}),gs(),ps(17,"div",7),Ss("click",function(){return rn(n),cs(11).click()}),ms(18,"div",8),gs(),gs(),ps(19,"div",9),ps(20,"uds-translate"),tl(21,' For optimal results, use "squared" images. '),gs(),ps(22,"uds-translate"),tl(23," The image will be resized on upload to "),gs(),tl(24),gs(),gs(),gs(),ps(25,"mat-dialog-actions"),ps(26,"button",10),ps(27,"uds-translate"),tl(28,"Cancel"),gs(),gs(),ps(29,"button",11),Ss("click",function(){return e.save()}),ps(30,"uds-translate"),tl(31,"Ok"),gs(),gs(),gs()}2&t&&(Oo(1),ds("ngIf",!e.image.id),Oo(1),ds("ngIf",e.image.id),Oo(7),ds("ngModel",e.image.name),Oo(7),ds("hidden",!0),Oo(2),ds("ngStyle",e.background()),Oo(6),il(" ",e.api.config.image_size[0],"x",e.api.config.image_size[1]," "))},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,jh,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%], .preview[_ngcontent-%COMP%]{width:100%}.preview[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.image-preview[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.3)}"]}),t}(),Pz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){Oz.launch(this.api).subscribe(function(){return t.table.overview()})},t.prototype.onEdit=function(t){Oz.launch(this.api,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete image"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("image"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-gallery"]],decls:1,vars:5,consts:[["icon","gallery",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.gallery)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".mat-column-thumb{max-width:7rem;justify-content:center} .mat-column-name{max-width:32rem}"]}),t}(),Rz='assessment'+django.gettext("Generate report")+"",Lz=function(){function t(t,e){this.rest=t,this.api=e,this.customButtons=[{id:"genreport",html:Rz,type:RM.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},t.prototype.generateReport=function(t){var e=this,n=new Bu;n.subscribe(function(n){e.api.gui.snackbar.open(django.gettext("Generating report...")),e.rest.reports.save(n,t.table.selection.selected[0].id).subscribe(function(t){for(var n=t.encoded?window.atob(t.data):t.data,i=n.length,r=new Uint8Array(i),o=0;o div[_ngcontent-%COMP%]{width:50%}.mat-form-field[_ngcontent-%COMP%]{width:100%}input[readonly][_ngcontent-%COMP%]{background-color:#e0e0e0}.slider-label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.config-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%;margin-top:2rem;margin-bottom:2rem}"]}),t}()},{path:"tools/actor_tokens",component:function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete actor token - USE WITH EXTREME CAUTION!!!"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-actor-tokens"]],decls:2,vars:4,consts:[["icon","maleta",3,"rest","multiSelect","allowExport","pageSize"]],template:function(t,e){1&t&&(ps(0,"div"),ms(1,"uds-table",0),gs()),2&t&&(Oo(1),ds("rest",e.rest.actorToken)("multiSelect",!0)("allowExport",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}()}]},{path:"**",redirectTo:"summary"}],Jz=function(){function t(){}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[nv.forRoot(Qz,{relativeLinkResolution:"legacy"})],nv]}),t}(),tB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),eB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Yk,gk,T_,tB],gk,tB]}),t}(),nB=["*"],iB=new wi("MatChipRemove"),rB=new wi("MatChipAvatar"),oB=new wi("MatChipTrailingIcon"),aB=_k(vk(yk(function t(e){o(this,t),this._elementRef=e}),"primary"),-1),sB=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c){var h;return o(this,n),(h=e.call(this,t))._elementRef=t,h._ngZone=i,h._changeDetectorRef=s,h._hasFocus=!1,h.chipListSelectable=!0,h._chipListMultiple=!1,h._chipListDisabled=!1,h._selected=!1,h._selectable=!0,h._disabled=!1,h._removable=!0,h._onFocus=new U,h._onBlur=new U,h.selectionChange=new Bu,h.destroyed=new Bu,h.removed=new Bu,h._addHostClassName(),h._chipRippleTarget=l.createElement("div"),h._chipRippleTarget.classList.add("mat-chip-ripple"),h._elementRef.nativeElement.appendChild(h._chipRippleTarget),h._chipRipple=new Hk(d(h),i,h._chipRippleTarget,r),h._chipRipple.setupTriggerEvents(t),h.rippleConfig=a||{},h._animationsDisabled="NoopAnimations"===u,h.tabIndex=null!=c&&parseInt(c)||-1,h}return s(n,[{key:"_addHostClassName",value:function(){var t="mat-basic-chip",e=this._elementRef.nativeElement;e.hasAttribute(t)||e.tagName.toLowerCase()===t?e.classList.add(t):e.classList.add("mat-standard-chip")}},{key:"ngOnDestroy",value:function(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"selectViaInteraction",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}},{key:"toggleSelected",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._selected=!this.selected,this._dispatchSelectionChange(t),this._changeDetectorRef.markForCheck(),this.selected}},{key:"focus",value:function(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}},{key:"remove",value:function(){this.removable&&this.removed.emit({chip:this})}},{key:"_handleClick",value:function(t){this.disabled?t.preventDefault():t.stopPropagation()}},{key:"_handleKeydown",value:function(t){if(!this.disabled)switch(t.keyCode){case 46:case 8:this.remove(),t.preventDefault();break;case Py:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}},{key:"_blur",value:function(){var t=this;this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){t._ngZone.run(function(){t._hasFocus=!1,t._onBlur.next({chip:t})})})}},{key:"_dispatchSelectionChange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}},{key:"rippleDisabled",get:function(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}},{key:"selected",get:function(){return this._selected},set:function(t){var e=fv(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}},{key:"value",get:function(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent},set:function(t){this._value=t}},{key:"selectable",get:function(){return this._selectable&&this.chipListSelectable},set:function(t){this._selectable=fv(t)}},{key:"disabled",get:function(){return this._chipListDisabled||this._disabled},set:function(t){this._disabled=fv(t)}},{key:"removable",get:function(){return this._removable},set:function(t){this._removable=fv(t)}},{key:"ariaSelected",get:function(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}}]),n}(aB);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(ey),hs(Uk,8),hs(eu),hs(uh),hs(rk,8),yi("tabindex"))},t.\u0275dir=ve({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,rB,1),tc(n,oB,1),tc(n,iB,1)),2&t&&(Qu(i=ec())&&(e.avatar=i.first),Qu(i=ec())&&(e.trailingIcon=i.first),Qu(i=ec())&&(e.removeIcon=i.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&Ss("click",function(t){return e._handleClick(t)})("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e.focus()})("blur",function(){return e._blur()}),2&t&&(ss("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),Gs("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[Xa]}),t}(),lB=function(){var t=function(){function t(e,n){o(this,t),this._parentChip=e,"BUTTON"===n.nativeElement.nodeName&&n.nativeElement.setAttribute("type","button")}return s(t,[{key:"_handleClick",value:function(t){var e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(sB),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&Ss("click",function(t){return e._handleClick(t)})},features:[wl([{provide:iB,useExisting:t}])]}),t}(),uB=new wi("mat-chips-default-options"),cB=bk(function t(e,n,i,r){o(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r}),hB=0,dB=function t(e,n){o(this,t),this.source=e,this.value=n},fB=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){var c;return o(this,n),(c=e.call(this,l,a,s,u))._elementRef=t,c._changeDetectorRef=i,c._dir=r,c.ngControl=u,c.controlType="mat-chip-list",c._lastDestroyedChipIndex=null,c._destroyed=new U,c._uid="mat-chip-list-".concat(hB++),c._tabIndex=0,c._userTabIndex=null,c._onTouched=function(){},c._onChange=function(){},c._multiple=!1,c._compareWith=function(t,e){return t===e},c._required=!1,c._disabled=!1,c.ariaOrientation="horizontal",c._selectable=!0,c.change=new Bu,c.valueChange=new Bu,c.ngControl&&(c.ngControl.valueAccessor=d(c)),c}return s(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new j_(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Uv(this._destroyed)).subscribe(function(e){return t._keyManager.withHorizontalOrientation(e)}),this._keyManager.tabOut.pipe(Uv(this._destroyed)).subscribe(function(){t._allowFocusEscape()}),this.chips.changes.pipe(zf(null),Uv(this._destroyed)).subscribe(function(){t.disabled&&Promise.resolve().then(function(){t._syncChipsState()}),t._resetChips(),t._initializeSelection(),t._updateTabIndex(),t._updateFocusForDestroyedChips(),t.stateChanges.next()})}},{key:"ngOnInit",value:function(){this._selectionModel=new py(this.multiple,void 0,!1),this.stateChanges.next()}},{key:"ngDoCheck",value:function(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}},{key:"registerInput",value:function(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"writeValue",value:function(t){this.chips&&this._setSelectionByValue(t,!1)}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this.stateChanges.next()}},{key:"onContainerClick",value:function(t){this._originatesFromChip(t)||this.focus()}},{key:"focus",value:function(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}},{key:"_focusInput",value:function(t){this._chipInput&&this._chipInput.focus(t)}},{key:"_keydown",value:function(t){var e=t.target;8===t.keyCode&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}},{key:"_updateTabIndex",value:function(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}},{key:"_updateFocusForDestroyedChips",value:function(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){var t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}},{key:"_isValidIndex",value:function(t){return t>=0&&t1&&void 0!==arguments[1])||arguments[1];if(this._clearSelection(),this.chips.forEach(function(t){return t.deselect()}),Array.isArray(t))t.forEach(function(t){return e._selectValue(t,n)}),this._sortValues();else{var i=this._selectValue(t,n);i&&n&&this._keyManager.setActiveItem(i)}}},{key:"_selectValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.chips.find(function(n){return null!=n.value&&e._compareWith(n.value,t)});return i&&(n?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then(function(){(t.ngControl||t._value)&&(t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value,!1),t.stateChanges.next())})}},{key:"_clearSelection",value:function(t){this._selectionModel.clear(),this.chips.forEach(function(e){e!==t&&e.deselect()}),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.chips.forEach(function(e){e.selected&&t._selectionModel.select(e)}),this.stateChanges.next())}},{key:"_propagateChanges",value:function(t){var e;e=Array.isArray(this.selected)?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.change.emit(new dB(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}},{key:"_blur",value:function(){var t=this;this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(function(){t.focused||t._markAsTouched()}):this._markAsTouched())}},{key:"_markAsTouched",value:function(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_allowFocusEscape",value:function(){var t=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(function(){t._tabIndex=t._userTabIndex||0,t._changeDetectorRef.markForCheck()}))}},{key:"_resetChips",value:function(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}},{key:"_dropSubscriptions",value:function(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}},{key:"_listenToChipsSelection",value:function(){var t=this;this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(function(e){e.source.selected?t._selectionModel.select(e.source):t._selectionModel.deselect(e.source),t.multiple||t.chips.forEach(function(e){!t._selectionModel.isSelected(e)&&e.selected&&e.deselect()}),e.isUserInput&&t._propagateChanges()})}},{key:"_listenToChipsFocus",value:function(){var t=this;this._chipFocusSubscription=this.chipFocusChanges.subscribe(function(e){var n=t.chips.toArray().indexOf(e.chip);t._isValidIndex(n)&&t._keyManager.updateActiveItem(n),t.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(function(){t._blur(),t.stateChanges.next()})}},{key:"_listenToChipsRemoved",value:function(){var t=this;this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(function(e){var n=e.chip,i=t.chips.toArray().indexOf(e.chip);t._isValidIndex(i)&&n._hasFocus&&(t._lastDestroyedChipIndex=i)})}},{key:"_originatesFromChip",value:function(t){for(var e=t.target;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}},{key:"_hasFocusedChip",value:function(){return this.chips&&this.chips.some(function(t){return t._hasFocus})}},{key:"_syncChipsState",value:function(){var t=this;this.chips&&this.chips.forEach(function(e){e._chipListDisabled=t._disabled,e._chipListMultiple=t.multiple})}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"role",get:function(){return this.empty?null:"listbox"}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=fv(t),this._syncChipsState()}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){this.writeValue(t),this._value=t}},{key:"id",get:function(){return this._chipInput?this._chipInput.id:this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t),this.stateChanges.next()}},{key:"placeholder",get:function(){return this._chipInput?this._chipInput.placeholder:this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"focused",get:function(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}},{key:"empty",get:function(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}},{key:"shouldLabelFloat",get:function(){return!this.empty||this.focused}},{key:"disabled",get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(t){this._disabled=fv(t),this._syncChipsState()}},{key:"selectable",get:function(){return this._selectable},set:function(t){var e=this;this._selectable=fv(t),this.chips&&this.chips.forEach(function(t){return t.chipListSelectable=e._selectable})}},{key:"tabIndex",set:function(t){this._userTabIndex=t,this._tabIndex=t}},{key:"chipSelectionChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t.selectionChange})))}},{key:"chipFocusChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t._onFocus})))}},{key:"chipBlurChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t._onBlur})))}},{key:"chipRemoveChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t.destroyed})))}}]),n}(cB);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(uy,8),hs(QC,8),hs(lA,8),hs(Lk),hs(SC,10))},t.\u0275cmp=he({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,sB,1),2&t&&Qu(i=ec())&&(e.chips=i)},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&Ss("focus",function(){return e.focus()})("blur",function(){return e._blur()})("keydown",function(t){return e._keydown(t)}),2&t&&(rl("id",e._uid),ss("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),Gs("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[wl([{provide:WT,useExisting:t}]),Xa],ngContentSelectors:nB,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(Os(),ps(0,"div",0),Ps(1),gs())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t}(),pB=0,gB=function(){var t=function(){function t(e,n){o(this,t),this._elementRef=e,this._defaultOptions=n,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new Bu,this.placeholder="",this.id="mat-chip-list-input-".concat(pB++),this._disabled=!1,this._inputElement=this._elementRef.nativeElement}return s(t,[{key:"ngOnChanges",value:function(){this._chipList.stateChanges.next()}},{key:"_keydown",value:function(t){t&&9===t.keyCode&&!By(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}},{key:"_blur",value:function(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}},{key:"_focus",value:function(){this.focused=!0,this._chipList.stateChanges.next()}},{key:"_emitChipEnd",value:function(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}},{key:"_onInput",value:function(){this._chipList.stateChanges.next()}},{key:"focus",value:function(t){this._inputElement.focus(t)}},{key:"_isSeparatorKey",value:function(t){return!By(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}},{key:"chipList",set:function(t){t&&(this._chipList=t,this._chipList.registerInput(this))}},{key:"addOnBlur",get:function(){return this._addOnBlur},set:function(t){this._addOnBlur=fv(t)}},{key:"disabled",get:function(){return this._disabled||this._chipList&&this._chipList.disabled},set:function(t){this._disabled=fv(t)}},{key:"empty",get:function(){return!this._inputElement.value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(uB))},t.\u0275dir=ve({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&Ss("keydown",function(t){return e._keydown(t)})("blur",function(){return e._blur()})("focus",function(){return e._focus()})("input",function(){return e._onInput()}),2&t&&(rl("id",e.id),ss("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[Ee]}),t}(),mB={separatorKeyCodes:[Ey]},vB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[Lk,{provide:uB,useValue:mB}],imports:[[gk]]}),t}(),yB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),_B=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Kh,gk,yB,Iy]]}),t}(),bB=["*",[["mat-toolbar-row"]]],wB=["*","mat-toolbar-row"],xB=vk(function t(e){o(this,t),this._elementRef=e}),kB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t}(),SB=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t))._platform=i,a._document=r,a}return s(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return t._checkToolbarMixedModes()}))}},{key:"_checkToolbarMixedModes",value:function(){}}]),n}(xB);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ey),hs(uh))},t.\u0275cmp=he({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,kB,1),2&t&&Qu(i=ec())&&(e._toolbarRows=i)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&Gs("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[Xa],ngContentSelectors:wB,decls:2,vars:0,template:function(t,e){1&t&&(Os(bB),Ps(0),Ps(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t}(),CB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk],gk]}),t}(),AB=function(){function t(){}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[{provide:tD,useValue:{floatLabel:"always"}},{provide:kk,useValue:udsData.language}],imports:[Kh,vA,yA,CB,FS,mP,RD,_B,IS,iD,AO,AD,KV,Rk,cO,qD,aE,$O,eB,aM,vB,sz,bL,KR,lI,yP]}),t}();function MB(t,e){if(1&t){var n=bs();ps(0,"button",6),Ss("click",function(){rn(n);var t=e.$implicit;return Ds().changeLang(t)}),tl(1),gs()}if(2&t){var i=e.$implicit;Oo(1),el(i.name)}}function IB(t,e){if(1&t&&(ps(0,"button",12),ps(1,"i",7),tl(2,"face"),gs(),tl(3),gs()),2&t){var n=Ds();ds("matMenuTriggerFor",cs(7)),Oo(3),el(n.api.user.user)}}function TB(t,e){if(1&t&&(ps(0,"button",18),tl(1),ps(2,"i",7),tl(3,"arrow_drop_down"),gs(),gs()),2&t){var n=Ds();ds("matMenuTriggerFor",cs(7)),Oo(1),nl("",n.api.user.user," ")}}var DB=function(){function t(t){this.api=t,this.isNavbarCollapsed=!0;var e=t.config.language;this.langs=[];for(var n=0,i=t.config.available_languages;n .mat-button[_ngcontent-%COMP%]{padding-left:1.5rem}.icon[_ngcontent-%COMP%]{width:24px;margin:0 1em 0 0}"]}),t}();function LB(t,e){1&t&&ms(0,"div",1),2&t&&ds("innerHTML",Ds().messages,Dr)}var NB=function(){function t(t){this.api=t,this.messages="",this.visible=!1}return t.prototype.ngOnInit=function(){var t=this;if(this.api.notices.length>0){var e='
';this.messages='
'+e+this.api.notices.map(function(t){return t.replace(/ /gm," ").replace(/([A-Z]+[A-Z]+)/gm,"$1").replace(/([0-9]+)/gm,"$1")}).join("
"+e)+"
",this.api.gui.alert("",this.messages,0,"80%").subscribe(function(){t.visible=!0})}},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-notices"]],decls:1,vars:1,consts:[["class","notice",3,"innerHTML",4,"ngIf"],[1,"notice",3,"innerHTML"]],template:function(t,e){1&t&&us(0,LB,1,1,"div",0),2&t&&ds("ngIf",e.visible)},directives:[Lh],styles:[".notice[_ngcontent-%COMP%]{display:block} .warn-notice-container{background:#4682b4;border-radius:3px;box-shadow:0 4px 20px 0 rgba(0,0,0,.14),0 7px 10px -5px rgba(70,93,156,.4);box-sizing:border-box;color:#fff;margin:1rem 2rem 0;padding:15px;word-wrap:break-word;display:flex;flex-direction:column} .warn-notice{display:block;width:100%;text-align:center;font-size:1.1em;margin-bottom:.5rem}"]}),t}(),FB=function(){function t(){}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-footer"]],decls:4,vars:0,consts:[["href","https://www.udsenterprise.com"]],template:function(t,e){1&t&&(ps(0,"div"),tl(1,"\xa9 2012-2020 "),ps(2,"a",0),tl(3,"Virtual Cable S.L.U."),gs(),gs())},styles:[""]}),t}(),VB=function(){function t(){this.title="uds admin"}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-root"]],decls:8,vars:0,consts:[[1,"page"],[1,"content"],[1,"footer"]],template:function(t,e){1&t&&(ms(0,"uds-navbar"),ms(1,"uds-sidebar"),ps(2,"div",0),ps(3,"div",1),ms(4,"uds-notices"),ms(5,"router-outlet"),gs(),ps(6,"div",2),ms(7,"uds-footer"),gs(),gs())},directives:[DB,RB,NB,Wm,FB],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.footer[_ngcontent-%COMP%]{flex-shrink:0;margin:1em;height:1em;display:flex;flex-direction:row;justify-content:flex-end}.content[_ngcontent-%COMP%]{flex:1 0 auto;width:calc(100% - 56px - 8px);margin:4rem auto auto 56px;padding-left:8px;overflow-x:hidden}"]}),t}(),zB=function(t){function e(){var e=t.call(this)||this;return e.itemsPerPageLabel=django.gettext("Items per page"),e}return pI(e,t),e.\u0275prov=Ot({token:e,factory:e.\u0275fac=function(t){return new(t||e)}}),e}(HD),BB=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-text"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:6,consts:[["appearance","standard"],["matInput","","type","text","autocomplete","nope",3,"ngModel","placeholder","required","disabled","maxlength","ngModelChange","change"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("maxlength",e.field.gui.length||128))},directives:[nD,qT,CO,QS,AC,eA,hA,gA],styles:[".cdk-text-field-autofilled[_ngcontent-%COMP%]{background-color:red}"]}),t}(),HB=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){this.field.value||0===this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-numeric"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","number",3,"ngModel","placeholder","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly))},directives:[nD,qT,CO,rA,QS,AC,eA,hA],styles:[""]}),t}(),jB=function(){function t(){this.changed=new Bu,this.passwordType="password"}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-password"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[["appearance","standard","floatLabel","always"],["matInput","","autocomplete","nope",3,"ngModel","placeholder","required","disabled","type","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],["matSuffix","",1,"material-icons"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),gs(),ps(4,"a",2),Ss("click",function(){return e.passwordType="text"===e.passwordType?"password":"text"}),ps(5,"i",3),tl(6,"remove_red_eye"),gs(),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("type",e.passwordType))},directives:[nD,qT,CO,QS,AC,eA,hA,NS,$T],styles:[".cdk-text-field-autofilled[_ngcontent-%COMP%]{background-color:red}"]}),t}(),GB=function(){function t(){}return t.prototype.ngOnInit=function(){""!==this.field.value&&void 0!==this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-hidden"]],inputs:{field:"field"},decls:0,vars:0,template:function(t,e){},styles:[""]}),t}(),UB=function(){function t(){}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-textbox"]],inputs:{field:"field",value:"value"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","auto"],["matInput","","type","text",3,"ngModel","placeholder","required","readonly","ngModelChange"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"textarea",1),Ss("ngModelChange",function(t){return e.field.value=t}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",e.field.gui.required)("readonly",e.field.gui.rdonly))},directives:[nD,qT,CO,QS,AC,eA,hA],styles:[""]}),t}();function WB(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",3),Ss("changed",function(t){return rn(n),Ds().filter=t}),gs()}}function YB(t,e){if(1&t&&(ps(0,"mat-option",4),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.text," ")}}var qB=function(){function t(){this.changed=new Bu,this.filter=""}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>0&&(this.field.value=this.field.gui.values[0].id),this.field.value=""+this.field.value},t.prototype.filteredValues=function(){if(!this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-choice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[[3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-select",0),Ss("ngModelChange",function(t){return e.field.value=t})("valueChange",function(){return e.changed.emit(e)}),us(4,WB,1,0,"uds-mat-select-search",1),us(5,YB,2,2,"mat-option",2),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(1),ds("ngIf",e.field.gui.values.length>10),Oo(1),ds("ngForOf",e.filteredValues()))},directives:[nD,qT,SD,AC,eA,hA,Lh,Ph,EO,iS],styles:[""]}),t}();function XB(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",3),Ss("changed",function(t){return rn(n),Ds().filter=t}),gs()}}function ZB(t,e){if(1&t&&(ps(0,"mat-option",4),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.text," ")}}var KB=function(){function t(){this.changed=new Bu,this.filter=""}return t.prototype.ngOnInit=function(){this.field.value=void 0,void 0!==this.field.values?this.field.values.forEach(function(t,e,n){n[e]=""+t.id}):this.field.values=new Array},t.prototype.filteredValues=function(){if(!this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-multichoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[["multiple","",3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-select",0),Ss("ngModelChange",function(t){return e.field.values=t})("valueChange",function(){return e.changed.emit(e)}),us(4,XB,1,0,"uds-mat-select-search",1),us(5,ZB,2,2,"mat-option",2),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.values)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(1),ds("ngIf",e.field.gui.values.length>10),Oo(1),ds("ngForOf",e.filteredValues()))},directives:[nD,qT,SD,AC,eA,hA,Lh,Ph,EO,iS],styles:[""]}),t}();function $B(t,e){if(1&t){var n=bs();ps(0,"div",12),ps(1,"div",13),tl(2),gs(),ps(3,"div",14),tl(4," \xa0"),ps(5,"a",15),Ss("click",function(){rn(n);var t=e.index;return Ds().removeElement(t)}),ps(6,"i",16),tl(7,"close"),gs(),gs(),gs(),gs()}if(2&t){var i=e.$implicit;Oo(2),nl(" ",i," ")}}var QB=function(){function t(t,e,n,i){var r=this;this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.values=[],this.input="",this.onSave=new Bu(!0),this.data.values.forEach(function(t){return r.values.push(t)})}return t.launch=function(e,n,i){var r=window.innerWidth<800?"50%":"30%";return e.gui.dialog.open(t,{width:r,data:{title:n,values:i},disableClose:!0}).componentInstance.onSave},t.prototype.addElements=function(){var t=this;this.input.split(",").forEach(function(e){t.values.push(e)}),this.input=""},t.prototype.checkKey=function(t){"Enter"===t.code&&this.addElements()},t.prototype.removeAll=function(){this.values.length=0},t.prototype.removeElement=function(t){this.values.splice(t,1)},t.prototype.save=function(){var t=this;this.data.values.length=0,this.values.forEach(function(e){return t.data.values.push(e)}),this.onSave.emit(this.values),this.dialogRef.close()},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-editlist-editor"]],decls:23,vars:3,consts:[["mat-dialog-title",""],[1,"content"],[1,"list"],["class","elem",4,"ngFor","ngForOf"],[1,"buttons"],["mat-raised-button","","color","warn",3,"click"],[1,"input"],[1,"example-full-width"],["type","text","matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","",1,"material-icons",3,"click"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[1,"elem"],[1,"val"],[1,"remove"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ps(0,"h4",0),tl(1),gs(),ps(2,"mat-dialog-content"),ps(3,"div",1),ps(4,"div",2),us(5,$B,8,1,"div",3),gs(),ps(6,"div",4),ps(7,"button",5),Ss("click",function(){return e.removeAll()}),ps(8,"uds-translate"),tl(9,"Remove all"),gs(),gs(),gs(),ps(10,"div",6),ps(11,"mat-form-field",7),ps(12,"input",8),Ss("keyup",function(t){return e.checkKey(t)})("ngModelChange",function(t){return e.input=t}),gs(),ps(13,"button",9),Ss("click",function(){return e.addElements()}),ps(14,"uds-translate"),tl(15,"Add"),gs(),gs(),gs(),gs(),gs(),gs(),ps(16,"mat-dialog-actions"),ps(17,"button",10),ps(18,"uds-translate"),tl(19,"Cancel"),gs(),gs(),ps(20,"button",11),Ss("click",function(){return e.save()}),ps(21,"uds-translate"),tl(22,"Ok"),gs(),gs(),gs()),2&t&&(Oo(1),nl(" ",e.data.title,"\n"),Oo(4),ds("ngForOf",e.values),Oo(7),ds("ngModel",e.input))},directives:[SS,CS,Ph,LS,VS,nD,CO,QS,AC,eA,$T,AS,kS],styles:[".content[_ngcontent-%COMP%]{width:100%;justify-content:space-between;justify-self:center}.content[_ngcontent-%COMP%], .list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.list[_ngcontent-%COMP%]{margin:1rem;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);padding:.5rem}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:1rem}.input[_ngcontent-%COMP%]{margin:0 1rem}.elem[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.elem[_ngcontent-%COMP%]:hover{background-color:#333;color:#fff;cursor:default}.val[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),JB=function(){function t(t){this.api=t,this.changed=new Bu}return t.prototype.ngOnInit=function(){},t.prototype.launch=function(){var t=this;void 0===this.field.values&&(this.field.values=[]),QB.launch(this.api,this.field.gui.label,this.field.values).subscribe(function(e){t.changed.emit({field:t.field})})},t.prototype.getValue=function(){if(void 0===this.field.values)return"";var t=this.field.values.filter(function(t,e,n){return e<5}).join(", ");return this.field.values.length>5&&(t+=django.gettext(", (%i more items)").replace("%i",""+(this.field.values.length-5))),t},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-field-editlist"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","text",1,"editlist",3,"readonly","value","placeholder","disabled","click"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("click",function(){return e.launch()}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("readonly",!0)("value",e.getValue())("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly))},directives:[nD,qT,CO],styles:[".editlist[_ngcontent-%COMP%]{cursor:pointer}"]}),t}(),tH=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){var t;this.field.value=XI(""===(t=this.field.value)||null==t?this.field.gui.defvalue:this.field.value)},t.prototype.getValue=function(){return XI(this.field.value)?django.gettext("Yes"):django.gettext("No")},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-checkbox"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:5,vars:5,consts:[[1,"mat-form-field-infix"],[1,"label"],[3,"ngModel","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"span",1),tl(2),gs(),ps(3,"mat-slide-toggle",2),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),tl(4),gs(),gs()),2&t&&(Oo(2),el(e.field.gui.label),Oo(1),ds("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(1),nl(" ",e.getValue()," "))},directives:[gL,vL,AC,eA,hA],styles:[".label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function eH(t,e){if(1&t&&ms(0,"div",5),2&t){var n=Ds().$implicit;ds("innerHTML",Ds().asIcon(n),Dr)}}function nH(t,e){if(1&t&&(ps(0,"div"),us(1,eH,1,1,"div",4),gs()),2&t){var n=e.$implicit,i=Ds();Oo(1),ds("ngIf",n.id==i.field.value)}}function iH(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",6),Ss("changed",function(t){return rn(n),Ds().filter=t}),gs()}}function rH(t,e){if(1&t&&(ps(0,"mat-option",7),ms(1,"div",5),gs()),2&t){var n=e.$implicit,i=Ds();ds("value",n.id),Oo(1),ds("innerHTML",i.asIcon(n),Dr)}}var oH=function(){function t(t){this.api=t,this.changed=new Bu,this.filter=""}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>=0&&(this.field.value=this.field.gui.values[0].id)},t.prototype.asIcon=function(t){return this.api.safeString(this.api.gui.icon(t.img)+t.text)},t.prototype.filteredValues=function(){if(!this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-field-imgchoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:8,vars:8,consts:[[3,"placeholder","ngModel","required","disabled","valueChange","ngModelChange"],[4,"ngFor","ngForOf"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-select",0),Ss("valueChange",function(){return e.changed.emit(e)})("ngModelChange",function(t){return e.field.value=t}),ps(4,"mat-select-trigger"),us(5,nH,2,1,"div",1),gs(),us(6,iH,1,0,"uds-mat-select-search",2),us(7,rH,2,2,"mat-option",3),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("placeholder",e.field.gui.tooltip)("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(2),ds("ngForOf",e.field.gui.values),Oo(1),ds("ngIf",e.field.gui.values.length>10),Oo(1),ds("ngForOf",e.filteredValues()))},directives:[nD,qT,SD,AC,eA,hA,xD,Ph,Lh,EO,iS],styles:[""]}),t}(),aH=function(){function t(){this.changed=new Bu,this.value=new Date}return Object.defineProperty(t.prototype,"date",{get:function(){return this.value},set:function(t){this.value!==t&&(this.value=t,this.field.value=zI("%Y-%m-%d",this.value))},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,"2000-01-01"===this.field.value?this.field.value=zI("%Y-01-01"):"2000-01-01"===this.field.value&&(this.field.value=zI("%Y-12-31"));var t=this.field.value.split("-");3===t.length&&(this.value=new Date(+t[0],+t[1]-1,+t[2]))},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-date"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","placeholder","disabled","ngModelChange"],["matSuffix","",3,"for"],["endDatePicker",""]],template:function(t,e){if(1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.date=t}),gs(),ms(4,"mat-datepicker-toggle",2),ms(5,"mat-datepicker",null,3),gs()),2&t){var n=cs(6);Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("matDatepicker",n)("ngModel",e.date)("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly),Oo(1),ds("for",n)}},directives:[nD,qT,CO,qV,QS,AC,eA,ZV,$T,HV],styles:[""]}),t}();function sH(t,e){if(1&t){var n=bs();ps(0,"mat-chip",5),Ss("removed",function(){rn(n);var t=e.$implicit;return Ds().remove(t)}),tl(1),ps(2,"i",6),tl(3,"cancel"),gs(),gs()}if(2&t){var i=e.$implicit,r=Ds();ds("selectable",!1)("removable",!0!==r.field.gui.rdonly),Oo(1),nl(" ",i," ")}}var lH,uH,cH,hH=function(){function t(){this.changed=new Bu,this.separatorKeysCodes=[Ey,188]}return t.prototype.ngOnInit=function(){void 0===this.field.values&&(this.field.values=new Array,this.field.value=void 0),this.field.values.forEach(function(t,e,n){""===t.trim()&&n.splice(e,1)})},t.prototype.add=function(t){var e=t.input,n=t.value;(n||"").trim()&&this.field.values.push(n.trim()),e&&(e.value="")},t.prototype.remove=function(t){var e=this.field.values.indexOf(t);e>=0&&this.field.values.splice(e,1)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-tags"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:8,consts:[["appearance","standard","floatLabel","always"],[3,"selectable","disabled","change"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],[3,"placeholder","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matChipInputTokenEnd"],[3,"selectable","removable","removed"],["matChipRemove","",1,"material-icons"]],template:function(t,e){if(1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-chip-list",1,2),Ss("change",function(){return e.changed.emit(e)}),us(5,sH,4,3,"mat-chip",3),ps(6,"input",4),Ss("matChipInputTokenEnd",function(t){return e.add(t)}),gs(),gs(),gs()),2&t){var n=cs(4);Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("selectable",!1)("disabled",!0===e.field.gui.rdonly),Oo(2),ds("ngForOf",e.field.values),Oo(1),ds("placeholder",e.field.gui.tooltip)("matChipInputFor",n)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",!0)}},directives:[nD,qT,fB,Ph,gB,sB,lB],styles:[".mat-chip-trailing-icon[_ngcontent-%COMP%]{position:relative;top:-4px;left:-4px}mat-form-field[_ngcontent-%COMP%]{width:99.5%}"]}),t}(),dH=(n("KcLy"),function(){function t(){}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t,bootstrap:[VB]}),t.\u0275inj=Pt({providers:[hI,LI,{provide:HD,useClass:zB}],imports:[[Od,vf,Jz,sk,AB,wT.forRoot({echarts:function(){return Promise.resolve().then(n.bind(null,"MT78"))}})]]}),t}());lH=[zh,OD,Bh,BB,UB,HB,jB,GB,qB,KB,JB,tH,oH,aH,hH],uH=[],(cH=_M.\u0275cmp).directiveDefs=function(){return lH.map(de)},cH.pipeDefs=function(){return uH.map(fe)},function(){if(zc)throw new Error("Cannot enable prod mode after platform setup.");Vc=!1}(),Dd().bootstrapModule(dH).catch(function(t){return console.log(t)})},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},KcLy:function(t,e,n){var i,r,o;r=[e,n("MT78")],void 0===(o="function"==typeof(i=function(t,e){if(e){var n="#eee",i=function(){return{axisLine:{lineStyle:{color:n}},axisTick:{lineStyle:{color:n}},axisLabel:{color:n},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:n}}}},r=["#52656b","#ff3b77","#a3cc00","#ffffff","#b8b89f","#ffccdb","#e5ff80","#f4f4f0"],o={color:r,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:n},crossStyle:{color:n}}},legend:{textStyle:{color:n}},title:{textStyle:{color:n}},toolbox:{iconStyle:{borderColor:n}},dataZoom:{dataBackgroundColor:"#eee",fillerColor:"rgba(200,200,200,0.2)",handleColor:"#52656b"},timeline:{itemStyle:{color:r[1]},lineStyle:{color:n},controlStyle:{color:n,borderColor:n},label:{color:n}},timeAxis:i(),logAxis:i(),valueAxis:i(),categoryAxis:i(),line:{symbol:"circle"},graph:{color:r},gauge:{axisLine:{lineStyle:{color:[[.2,"#ff3b77"],[.8,"#52656b"],[1,"#b8b89f"]],width:8}}}};o.categoryAxis.splitLine.show=!1,e.registerTheme("dark-digerati",o)}else"ECharts is not Loaded","undefined"!=typeof console&&console&&console.error&&console.error("ECharts is not Loaded")})?i.apply(e,r):i)||(t.exports=o)},MT78:function(t,e,n){"use strict";n.r(e),n.d(e,"version",function(){return oy}),n.d(e,"dependencies",function(){return ay}),n.d(e,"PRIORITY",function(){return uy}),n.d(e,"init",function(){return e_}),n.d(e,"connect",function(){return n_}),n.d(e,"disConnect",function(){return i_}),n.d(e,"disconnect",function(){return r_}),n.d(e,"dispose",function(){return o_}),n.d(e,"getInstanceByDom",function(){return a_}),n.d(e,"getInstanceById",function(){return s_}),n.d(e,"registerTheme",function(){return l_}),n.d(e,"registerPreprocessor",function(){return u_}),n.d(e,"registerProcessor",function(){return c_}),n.d(e,"registerPostInit",function(){return h_}),n.d(e,"registerPostUpdate",function(){return d_}),n.d(e,"registerAction",function(){return f_}),n.d(e,"registerCoordinateSystem",function(){return p_}),n.d(e,"getCoordinateSystemDimensions",function(){return g_}),n.d(e,"registerLocale",function(){return hh}),n.d(e,"registerLayout",function(){return m_}),n.d(e,"registerVisual",function(){return v_}),n.d(e,"registerLoading",function(){return b_}),n.d(e,"setCanvasCreator",function(){return w_}),n.d(e,"registerMap",function(){return x_}),n.d(e,"getMap",function(){return k_}),n.d(e,"registerTransform",function(){return S_}),n.d(e,"dataTool",function(){return C_}),n.d(e,"zrender",function(){return s}),n.d(e,"matrix",function(){return o}),n.d(e,"vector",function(){return r}),n.d(e,"zrUtil",function(){return i}),n.d(e,"color",function(){return a}),n.d(e,"throttle",function(){return ig}),n.d(e,"helper",function(){return u}),n.d(e,"use",function(){return I_}),n.d(e,"parseGeoJSON",function(){return Bv}),n.d(e,"parseGeoJson",function(){return Bv}),n.d(e,"number",function(){return c}),n.d(e,"time",function(){return h}),n.d(e,"graphic",function(){return d}),n.d(e,"format",function(){return f}),n.d(e,"util",function(){return p}),n.d(e,"env",function(){return w}),n.d(e,"List",function(){return ob}),n.d(e,"Model",function(){return ih}),n.d(e,"Axis",function(){return zw}),n.d(e,"ComponentModel",function(){return dd}),n.d(e,"ComponentView",function(){return Gp}),n.d(e,"SeriesModel",function(){return Hp}),n.d(e,"ChartView",function(){return Jp}),n.d(e,"innerDrawElementOnCanvas",function(){return ev}),n.d(e,"extendComponentModel",function(){return Bw}),n.d(e,"extendComponentView",function(){return Hw}),n.d(e,"extendSeriesModel",function(){return jw}),n.d(e,"extendChartView",function(){return Gw});var i={};n.r(i),n.d(i,"$override",function(){return P}),n.d(i,"guid",function(){return L}),n.d(i,"logError",function(){return N}),n.d(i,"clone",function(){return F}),n.d(i,"merge",function(){return V}),n.d(i,"mergeAll",function(){return z}),n.d(i,"extend",function(){return B}),n.d(i,"defaults",function(){return H}),n.d(i,"createCanvas",function(){return j}),n.d(i,"indexOf",function(){return G}),n.d(i,"inherits",function(){return U}),n.d(i,"mixin",function(){return W}),n.d(i,"isArrayLike",function(){return Y}),n.d(i,"each",function(){return q}),n.d(i,"map",function(){return X}),n.d(i,"reduce",function(){return Z}),n.d(i,"filter",function(){return K}),n.d(i,"find",function(){return $}),n.d(i,"keys",function(){return Q}),n.d(i,"bind",function(){return J}),n.d(i,"curry",function(){return tt}),n.d(i,"isArray",function(){return et}),n.d(i,"isFunction",function(){return nt}),n.d(i,"isString",function(){return it}),n.d(i,"isStringSafe",function(){return rt}),n.d(i,"isNumber",function(){return ot}),n.d(i,"isObject",function(){return at}),n.d(i,"isBuiltInObject",function(){return st}),n.d(i,"isTypedArray",function(){return lt}),n.d(i,"isDom",function(){return ut}),n.d(i,"isGradientObject",function(){return ct}),n.d(i,"isPatternObject",function(){return ht}),n.d(i,"isRegExp",function(){return dt}),n.d(i,"eqNaN",function(){return ft}),n.d(i,"retrieve",function(){return pt}),n.d(i,"retrieve2",function(){return gt}),n.d(i,"retrieve3",function(){return mt}),n.d(i,"slice",function(){return vt}),n.d(i,"normalizeCssArray",function(){return yt}),n.d(i,"assert",function(){return _t}),n.d(i,"trim",function(){return bt}),n.d(i,"setAsPrimitive",function(){return xt}),n.d(i,"isPrimitive",function(){return kt}),n.d(i,"HashMap",function(){return St}),n.d(i,"createHashMap",function(){return Ct}),n.d(i,"concatArray",function(){return At}),n.d(i,"createObject",function(){return Mt}),n.d(i,"hasOwn",function(){return It}),n.d(i,"noop",function(){return Tt});var r={};n.r(r),n.d(r,"create",function(){return Dt}),n.d(r,"copy",function(){return Et}),n.d(r,"clone",function(){return Ot}),n.d(r,"set",function(){return Pt}),n.d(r,"add",function(){return Rt}),n.d(r,"scaleAndAdd",function(){return Lt}),n.d(r,"sub",function(){return Nt}),n.d(r,"len",function(){return Ft}),n.d(r,"length",function(){return Vt}),n.d(r,"lenSquare",function(){return zt}),n.d(r,"lengthSquare",function(){return Bt}),n.d(r,"mul",function(){return Ht}),n.d(r,"div",function(){return jt}),n.d(r,"dot",function(){return Gt}),n.d(r,"scale",function(){return Ut}),n.d(r,"normalize",function(){return Wt}),n.d(r,"distance",function(){return Yt}),n.d(r,"dist",function(){return qt}),n.d(r,"distanceSquare",function(){return Xt}),n.d(r,"distSquare",function(){return Zt}),n.d(r,"negate",function(){return Kt}),n.d(r,"lerp",function(){return $t}),n.d(r,"applyTransform",function(){return Qt}),n.d(r,"min",function(){return Jt}),n.d(r,"max",function(){return te});var o={};n.r(o),n.d(o,"create",function(){return Oe}),n.d(o,"identity",function(){return Pe}),n.d(o,"copy",function(){return Re}),n.d(o,"mul",function(){return Le}),n.d(o,"translate",function(){return Ne}),n.d(o,"rotate",function(){return Fe}),n.d(o,"scale",function(){return Ve}),n.d(o,"invert",function(){return ze}),n.d(o,"clone",function(){return Be});var a={};n.r(a),n.d(a,"parse",function(){return fn}),n.d(a,"lift",function(){return gn}),n.d(a,"toHex",function(){return mn}),n.d(a,"fastLerp",function(){return vn}),n.d(a,"fastMapToColor",function(){return yn}),n.d(a,"lerp",function(){return _n}),n.d(a,"mapToColor",function(){return bn}),n.d(a,"modifyHSL",function(){return wn}),n.d(a,"modifyAlpha",function(){return xn}),n.d(a,"stringify",function(){return kn}),n.d(a,"lum",function(){return Sn}),n.d(a,"random",function(){return Cn});var s={};n.r(s),n.d(s,"init",function(){return ir}),n.d(s,"dispose",function(){return rr}),n.d(s,"disposeAll",function(){return or}),n.d(s,"getInstance",function(){return ar}),n.d(s,"registerPainter",function(){return sr}),n.d(s,"version",function(){return lr});var l={};n.r(l),n.d(l,"extendShape",function(){return Ju}),n.d(l,"extendPath",function(){return tc}),n.d(l,"registerShape",function(){return ec}),n.d(l,"getShapeClass",function(){return nc}),n.d(l,"makePath",function(){return ic}),n.d(l,"makeImage",function(){return rc}),n.d(l,"mergePath",function(){return ac}),n.d(l,"resizePath",function(){return sc}),n.d(l,"subPixelOptimizeLine",function(){return lc}),n.d(l,"subPixelOptimizeRect",function(){return uc}),n.d(l,"subPixelOptimize",function(){return cc}),n.d(l,"updateProps",function(){return dc}),n.d(l,"initProps",function(){return fc}),n.d(l,"removeElement",function(){return pc}),n.d(l,"removeElementWithFadeOut",function(){return mc}),n.d(l,"isElementRemoved",function(){return vc}),n.d(l,"getTransform",function(){return yc}),n.d(l,"applyTransform",function(){return _c}),n.d(l,"transformDirection",function(){return bc}),n.d(l,"groupTransition",function(){return xc}),n.d(l,"clipPointsByRect",function(){return kc}),n.d(l,"clipRectByRect",function(){return Sc}),n.d(l,"createIcon",function(){return Cc}),n.d(l,"linePolygonIntersect",function(){return Ac}),n.d(l,"lineLineIntersect",function(){return Mc}),n.d(l,"setTooltipConfig",function(){return Tc}),n.d(l,"Group",function(){return Qi}),n.d(l,"Image",function(){return gs}),n.d(l,"Text",function(){return Rs}),n.d(l,"Circle",function(){return $l}),n.d(l,"Ellipse",function(){return tu}),n.d(l,"Sector",function(){return gu}),n.d(l,"Ring",function(){return yu}),n.d(l,"Polygon",function(){return ku}),n.d(l,"Polyline",function(){return Au}),n.d(l,"Rect",function(){return ks}),n.d(l,"Line",function(){return Du}),n.d(l,"BezierCurve",function(){return Lu}),n.d(l,"Arc",function(){return Vu}),n.d(l,"IncrementalDisplayable",function(){return Zu}),n.d(l,"CompoundPath",function(){return zu}),n.d(l,"LinearGradient",function(){return Hu}),n.d(l,"RadialGradient",function(){return ju}),n.d(l,"BoundingRect",function(){return $n}),n.d(l,"OrientedBoundingRect",function(){return qu}),n.d(l,"Point",function(){return jn}),n.d(l,"Path",function(){return ls});var u={};n.r(u),n.d(u,"createList",function(){return Sw}),n.d(u,"getLayoutRect",function(){return rd}),n.d(u,"createDimensions",function(){return sb}),n.d(u,"dataStack",function(){return Cw}),n.d(u,"createSymbol",function(){return Vm}),n.d(u,"createScale",function(){return Aw}),n.d(u,"mixinAxisModelCommonMethods",function(){return Mw}),n.d(u,"getECData",function(){return Ls}),n.d(u,"enableHoverEmphasis",function(){return xl}),n.d(u,"createTextStyle",function(){return Iw});var c={};n.r(c),n.d(c,"linearMap",function(){return ur}),n.d(c,"round",function(){return hr}),n.d(c,"asc",function(){return dr}),n.d(c,"getPrecision",function(){return fr}),n.d(c,"getPrecisionSafe",function(){return pr}),n.d(c,"getPixelPrecision",function(){return gr}),n.d(c,"getPercentWithPrecision",function(){return mr}),n.d(c,"MAX_SAFE_INTEGER",function(){return vr}),n.d(c,"remRadian",function(){return yr}),n.d(c,"isRadianAroundZero",function(){return _r}),n.d(c,"parseDate",function(){return wr}),n.d(c,"quantity",function(){return xr}),n.d(c,"quantityExponent",function(){return kr}),n.d(c,"nice",function(){return Sr}),n.d(c,"quantile",function(){return Cr}),n.d(c,"reformIntervals",function(){return Ar}),n.d(c,"isNumeric",function(){return Ir}),n.d(c,"numericToNumber",function(){return Mr});var h={};n.r(h),n.d(h,"parse",function(){return wr}),n.d(h,"format",function(){return wh});var d={};n.r(d),n.d(d,"extendShape",function(){return Ju}),n.d(d,"extendPath",function(){return tc}),n.d(d,"makePath",function(){return ic}),n.d(d,"makeImage",function(){return rc}),n.d(d,"mergePath",function(){return ac}),n.d(d,"resizePath",function(){return sc}),n.d(d,"createIcon",function(){return Cc}),n.d(d,"updateProps",function(){return dc}),n.d(d,"initProps",function(){return fc}),n.d(d,"getTransform",function(){return yc}),n.d(d,"clipPointsByRect",function(){return kc}),n.d(d,"clipRectByRect",function(){return Sc}),n.d(d,"registerShape",function(){return ec}),n.d(d,"getShapeClass",function(){return nc}),n.d(d,"Group",function(){return Qi}),n.d(d,"Image",function(){return gs}),n.d(d,"Text",function(){return Rs}),n.d(d,"Circle",function(){return $l}),n.d(d,"Ellipse",function(){return tu}),n.d(d,"Sector",function(){return gu}),n.d(d,"Ring",function(){return yu}),n.d(d,"Polygon",function(){return ku}),n.d(d,"Polyline",function(){return Au}),n.d(d,"Rect",function(){return ks}),n.d(d,"Line",function(){return Du}),n.d(d,"BezierCurve",function(){return Lu}),n.d(d,"Arc",function(){return Vu}),n.d(d,"IncrementalDisplayable",function(){return Zu}),n.d(d,"CompoundPath",function(){return zu}),n.d(d,"LinearGradient",function(){return Hu}),n.d(d,"RadialGradient",function(){return ju}),n.d(d,"BoundingRect",function(){return $n});var f={};n.r(f),n.d(f,"addCommas",function(){return Vh}),n.d(f,"toCamelCase",function(){return zh}),n.d(f,"normalizeCssArray",function(){return Bh}),n.d(f,"encodeHTML",function(){return Gh}),n.d(f,"formatTpl",function(){return qh}),n.d(f,"getTooltipMarker",function(){return Xh}),n.d(f,"formatTime",function(){return Zh}),n.d(f,"capitalFirst",function(){return Kh}),n.d(f,"truncateText",function(){return bo}),n.d(f,"getTextRect",function(){return Tw});var p={};n.r(p),n.d(p,"map",function(){return X}),n.d(p,"each",function(){return q}),n.d(p,"indexOf",function(){return G}),n.d(p,"inherits",function(){return U}),n.d(p,"reduce",function(){return Z}),n.d(p,"filter",function(){return K}),n.d(p,"bind",function(){return J}),n.d(p,"curry",function(){return tt}),n.d(p,"isArray",function(){return et}),n.d(p,"isString",function(){return it}),n.d(p,"isObject",function(){return at}),n.d(p,"isFunction",function(){return nt}),n.d(p,"extend",function(){return B}),n.d(p,"defaults",function(){return H}),n.d(p,"clone",function(){return F}),n.d(p,"merge",function(){return V});var g=function(t,e){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function m(t,e){function n(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,i=arguments.length;n18),a&&(n.weChat=!0),e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,b);var w=b,x={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},k={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},S=Object.prototype.toString,C=Array.prototype,A=C.forEach,M=C.filter,I=C.slice,T=C.map,D=(function(){}).constructor,E=D?D.prototype:null,O={};function P(t,e){O[t]=e}var R=2311;function L(){return R++}function N(){for(var t=[],e=0;e>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(a)return a(t,n,i),!0}return!1}function ue(t){return"CANVAS"===t.nodeName.toUpperCase()}var ce="undefined"!=typeof window&&!!window.addEventListener,he=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,de=[];function fe(t,e,n,i){return n=n||{},i||!w.canvasSupported?pe(t,e,n):w.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):pe(t,e,n),n}function pe(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(ue(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(le(de,t,i,r))return n.zrX=de[0],void(n.zrY=de[1])}n.zrX=n.zrY=0}function ge(t){return t||window.event}function me(t,e,n){if(null!=(e=ge(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&fe(t,r,e,n)}else{fe(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;return null==n||null==i?e:3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&he.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ve(t,e,n,i){ce?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ye=ce?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function _e(t){return 2===t.which||3===t.which}var be=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=we(r)/we(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ke="silent";function Se(){ye(this.event)}var Ce=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return m(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ie),Ae=function(t,e){this.x=t,this.y=e},Me=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ie=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new Ae(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new Ce,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new ne(o),o}return m(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(q(Me,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=De(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new Ae(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ae(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Se}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new Ae(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=Te(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==ke)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new be);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new Ae;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(ie);function Te(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}i=i.__hostTarget||i.parent}return!r||ke}return!1}function De(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}q(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Ie.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=De(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||qt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});var Ee=Ie;function Oe(){return[1,0,0,1,0,0]}function Pe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Re(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Le(t,e,n){var i=e[1]*n[0]+e[3]*n[1],r=e[0]*n[2]+e[2]*n[3],o=e[1]*n[2]+e[3]*n[3],a=e[0]*n[4]+e[2]*n[5]+e[4],s=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=e[0]*n[0]+e[2]*n[1],t[1]=i,t[2]=r,t[3]=o,t[4]=a,t[5]=s,t}function Ne(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Fe(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),c=Math.cos(n);return t[0]=i*c+a*u,t[1]=-i*u+a*c,t[2]=r*c+s*u,t[3]=-r*u+c*s,t[4]=c*o+u*l,t[5]=c*l-u*o,t}function Ve(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function ze(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(t[0]=a*(l=1/l),t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function Be(t){var e=[1,0,0,1,0,0];return Re(e,t),e}var He=Pe;function je(t){return t>5e-5||t<-5e-5}var Ge=[],Ue=[],We=[1,0,0,1,0,0],Ye=Math.abs,qe=function(){function t(){}var e;return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return je(this.rotation)||je(this.x)||je(this.y)||je(this.scaleX-1)||je(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):He(i),e&&(n?Le(i,t.transform,i):Re(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&He(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Ge);var n=Ge[0]<0?-1:1,i=Ge[1]<0?-1:1,r=((Ge[0]-n)*e+n)/Ge[0]||0,o=((Ge[1]-i)*e+i)/Ge[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],ze(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3];je(e-1)&&(e=Math.sqrt(e)),je(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Le(Ue,t.invTransform,e),e=Ue);var n=this.originX,i=this.originY;(n||i)&&(We[4]=n,We[5]=i,Le(Ue,e,We),Ue[4]-=n,Ue[5]-=i,e=Ue),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Qt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Qt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Ye(t[0]-1)>1e-10&&Ye(t[3]-1)>1e-10?Math.sqrt(Ye(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){He(e=e||[]);var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,l=t.y;return e[4]-=n,e[5]-=i,e[0]*=r,e[1]*=o,e[2]*=r,e[3]*=o,e[4]*=r,e[5]*=o,a&&Fe(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=l,e},t.initDefaultProps=((e=t.prototype).x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.rotation=0,void(e.globalScaleRatio=1)),t}(),Xe={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Xe.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Xe.bounceIn(2*t):.5*Xe.bounceOut(2*t-1)+.5}},Ze=Xe,Ke=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Ze[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){this._startTime=t-(t-this._startTime-this._pausedTime)%this._life+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),$e=function(t){this.value=t},Qe=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new $e(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Je=function(){function t(t){this._list=new Qe,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new $e(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),tn={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 en(t){return(t=Math.round(t))<0?0:t>255?255:t}function nn(t){return t<0?0:t>1?1:t}function rn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?en(parseFloat(e)/100*255):en(parseInt(e,10))}function on(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?nn(parseFloat(e)/100):nn(parseFloat(e))}function an(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function sn(t,e,n){return t+(e-t)*n}function ln(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function un(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var cn=new Je(20),hn=null;function dn(t,e){hn&&un(hn,e),hn=cn.put(t,hn||e.slice())}function fn(t,e){if(t){e=e||[];var n=cn.get(t);if(n)return un(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in tn)return un(e,tn[i]),dn(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(ln(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),dn(t,e),e):void ln(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(ln(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),dn(t,e),e):void ln(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?ln(e,+u[0],+u[1],+u[2],1):ln(e,0,0,0,1);c=on(u.pop());case"rgb":return 3!==u.length?void ln(e,0,0,0,1):(ln(e,rn(u[0]),rn(u[1]),rn(u[2]),c),dn(t,e),e);case"hsla":return 4!==u.length?void ln(e,0,0,0,1):(u[3]=on(u[3]),pn(u,e),dn(t,e),e);case"hsl":return 3!==u.length?void ln(e,0,0,0,1):(pn(u,e),dn(t,e),e);default:return}}ln(e,0,0,0,1)}}function pn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=on(t[1]),r=on(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return ln(e=e||[],en(255*an(a,o,n+1/3)),en(255*an(a,o,n)),en(255*an(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function gn(t,e){var n=fn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return kn(n,4===n.length?"rgba":"rgb")}}function mn(t){var e=fn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function vn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=en(sn(a[0],s[0],l)),n[1]=en(sn(a[1],s[1],l)),n[2]=en(sn(a[2],s[2],l)),n[3]=nn(sn(a[3],s[3],l)),n}}var yn=vn;function _n(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=fn(e[r]),s=fn(e[o]),l=i-r,u=kn([en(sn(a[0],s[0],l)),en(sn(a[1],s[1],l)),en(sn(a[2],s[2],l)),nn(sn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var bn=_n;function wn(t,e,n,i){var r,o=fn(t);if(t)return o=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?e=d-h:r===s?e=1/3+c-d:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,n,u];return null!=t[3]&&f.push(t[3]),f}}(o),null!=e&&(o[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=n&&(o[1]=on(n)),null!=i&&(o[2]=on(i)),kn(pn(o),"rgba")}function xn(t,e){var n=fn(t);if(n&&null!=e)return n[3]=nn(e),kn(n,"rgba")}function kn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function Sn(t,e){var n=fn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function Cn(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}var An=Array.prototype.slice;function Mn(t,e,n){return(e-t)*n+t}function In(t,e,n,i){for(var r=e.length,o=0;oa)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(Y(e)){var r=function(t){return Y(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&On(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=fn(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&i>0&&(o=n[i-1],(this.isValueColor&&!On(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort(function(t,e){return t.time-e.time});for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&En(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var c=o[n+1],h=o[n];if(h&&c){this._lastFrame=n,this._lastFramePercent=e;var d=c.percent-h.percent;if(0!==d){var f=(e-h.percent)/d,p=i?this._additiveValue:u?zn:t[s];if((l>0||u)&&!p&&(p=this._additiveValue=[]),this.useSpline){var g=o[n][r],m=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],y=o[n>a-3?a-1:n+2][r];if(l>0)1===l?Rn(p,m,g,v,y,f,f*f,f*f*f):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,c=0;c0?1===l?In(p,h[r],c[r],f):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(h[r],c[r],f),i?this._additiveValue=_:t[s]=_);i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(fn(t[n],zn),Tn(zn,zn,i,1),t[n]=Nn(zn)):t[n]=t[n]+i:1===e?Tn(t[n],t[n],i,1):2===e&&Dn(t[n],t[n],i,1)},t}(),Hn=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?N("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,Q(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),jn=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Gn=Math.min,Un=Math.max,Wn=new jn,Yn=new jn,qn=new jn,Xn=new jn,Zn=new jn,Kn=new jn,$n=function(){function t(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Gn(t.x,this.x),n=Gn(t.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?Un(t.x+t.width,this.x+this.width)-e:t.width,this.height=isFinite(this.y)&&isFinite(this.height)?Un(t.y+t.height,this.y+this.height)-n:t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return Ne(r,r,[-e.x,-e.y]),Ve(r,r,[n,i]),Ne(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,c=e.y,h=e.y+e.height,d=!(op&&(p=_,jn.set(Kn,gp&&(p=b,jn.set(Kn,0,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[5];return e.x=n.x*r+i[4],e.y=n.y*o+a,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Wn.x=qn.x=n.x,Wn.y=Xn.y=n.y,Yn.x=Xn.x=n.x+n.width,Yn.y=qn.y=n.y+n.height,Wn.transform(i),Xn.transform(i),Yn.transform(i),qn.transform(i),e.x=Gn(Wn.x,Yn.x,qn.x,Xn.x),e.y=Gn(Wn.y,Yn.y,qn.y,Xn.y);var s=Un(Wn.x,Yn.x,qn.x,Xn.x),l=Un(Wn.y,Yn.y,qn.y,Xn.y);e.width=s-e.x,e.height=l-e.y}else e!==n&&t.copy(e,n)},t}(),Qn={},Jn="12px sans-serif";function ti(t,e){var n=Qn[e=e||Jn];n||(n=Qn[e]=new Je(500));var i=n.get(t);return null==i&&(i=function(t,e){return Fn||(Fn=j().getContext("2d")),Vn!==e&&(Vn=Fn.font=e||Jn),Fn.measureText(t)}(t,e).width,n.put(t,i)),i}function ei(t,e,n,i){var r=ti(t,e),o=oi(e),a=ii(0,r,n),s=ri(0,o,i);return new $n(a,s,r,o)}function ni(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return ei(r[0],e,n,i);for(var o=new $n(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function si(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(i instanceof Array)l+=ai(i[0],n.width),u+=ai(i[1],n.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var li=1;"undefined"!=typeof window&&(li=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ui=li,ci="#333",hi="#ccc",di="__zr_normal__",fi=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],pi={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},gi={},mi=new $n(0,0,0,0),vi=function(){function t(t){this.id=L(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var u=mi;u.copy(n.layoutRect?n.layoutRect:this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(gi,n,u):si(gi,n,u),r.x=gi.x,r.y=gi.y,o=gi.align,a=gi.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var h=void 0,d=void 0;"center"===c?(h=.5*u.width,d=.5*u.height):(h=ai(c[0],u.width),d=ai(c[1],u.height)),l=!0,r.originX=-r.x+h+(i?0:u.x),r.originY=-r.y+d+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var f=n.offset;f&&(r.x+=f[0],r.y+=f[1],l||(r.originX=-f[0],r.originY=-f[1]));var p=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;p&&this.canBeInsideText()?(v=n.insideStroke,null!=(m=n.insideFill)&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(v=n.outsideStroke,null!=(m=n.outsideFill)&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),s&&e.dirtyStyle(),e.markRedraw()}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?hi:ci},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&fn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,kn(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(at(t))for(var n=Q(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(di,!1,t)},t.prototype.useState=function(e,n,i){var r=e===di;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(G(o,e)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var l=!(!s||!s.hoverLayer);return l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(e,n),this._textGuide&&this._textGuide.useState(e,n),r?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT),s}N("State "+e+" not exists.")}}},t.prototype.useStates=function(e,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s0,d),this._textContent&&this._textContent.useStates(e),this._textGuide&&this._textGuide.useStates(e),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=G(i,t),o=G(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function yi(t,e,n,i,r){var o=[];wi(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},h=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var d=0;d0||r.force&&!a.length){for(var y=t.animators,_=[],b=0;b=0;)r++;return r-e}function Si(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Ci(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function Ai(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function Mi(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<32)Si(t,n,i,n+(o=ki(t,n,i,e)),e);else{var a=function(t,e){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var d=Ai(t[c],t,l,u,0,e);l+=d,0!=(u-=d)&&0!==(h=Ci(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,i,o,s){var l=0;for(l=0;l=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[f+l]=t[d+l];if(0===i){v=!0;break}}if(t[h--]=a[c--],1==--s){v=!0;break}if(0!=(m=s-Ci(t[u],a,0,s,s-1,e))){for(s-=m,f=1+(h-=m),d=1+(c-=m),l=0;l=7||m>=7);if(v)break;p<0&&(p=0),p+=2}if((r=p)<1&&(r=1),1===s){for(f=1+(h-=i),d=1+(u-=i),l=i-1;l>=0;l--)t[f+l]=t[d+l];t[h]=a[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l=0;l--)t[f+l]=t[d+l];t[h]=a[c]}else for(d=h-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=ki(t,n,i,e))s&&(l=s),Si(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var Ii=!1;function Ti(){Ii||(Ii=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Di(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Ei,Oi,Pi=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Di}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(Ti(),u.z=0),isNaN(u.z2)&&(Ti(),u.z2=0),isNaN(u.zlevel)&&(Ti(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=t.getDecalElement&&t.getDecalElement();c&&this._updateAndAddDisplayable(c,e,n);var h=t.getTextGuideLine();h&&this._updateAndAddDisplayable(h,e,n);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),Ri="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Li=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,n.stage=(e=e||{}).stage||{},n.onframe=e.onframe||function(){},n}return m(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,Ri(function e(){t._running&&(Ri(e),!t._paused&&t.update())})},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Hn(t,e.loop);return this.addAnimator(n),n},e}(ie),Ni=w.domSupported,Fi=(Oi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Ei=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:X(Ei,function(t){var e=t.replace("mouse","pointer");return Oi.hasOwnProperty(e)?e:t})}),Vi=["mousemove","mouseup"],zi=["pointermove","pointerup"],Bi=!1;function Hi(t){var e=t.pointerType;return"pen"===e||"touch"===e}function ji(t){t&&(t.zrByTouch=!0)}function Gi(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Ui=function(t,e){this.stopPropagation=Tt,this.stopImmediatePropagation=Tt,this.preventDefault=Tt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Wi={mousedown:function(t){t=me(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=me(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=me(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Gi(this,(t=me(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Bi=!0,t=me(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Bi||(t=me(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){ji(t=me(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Wi.mousemove.call(this,t),Wi.mousedown.call(this,t)},touchmove:function(t){ji(t=me(this.dom,t)),this.handler.processGesture(t,"change"),Wi.mousemove.call(this,t)},touchend:function(t){ji(t=me(this.dom,t)),this.handler.processGesture(t,"end"),Wi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Wi.click.call(this,t)},pointerdown:function(t){Wi.mousedown.call(this,t)},pointermove:function(t){Hi(t)||Wi.mousemove.call(this,t)},pointerup:function(t){Wi.mouseup.call(this,t)},pointerout:function(t){Hi(t)||Wi.mouseout.call(this,t)}};q(["click","dblclick","contextmenu"],function(t){Wi[t]=function(e){e=me(this.dom,e),this.trigger(t,e)}});var Yi={pointermove:function(t){Hi(t)||Yi.mousemove.call(this,t)},pointerup:function(t){Yi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function qi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,ve(t.domTarget,e,n,i)}function Xi(t){var e,n,i,r=t.mounted;for(var o in r)r.hasOwnProperty(o)&&(e=t.domTarget,n=o,i=r[o],ce?e.removeEventListener(n,i,t.listenerOpts[o]):e.detachEvent("on"+n,i));t.mounted={}}var Zi=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Ki=function(t){function e(e,n){var i,r,o,a=t.call(this)||this;return a.__pointerCapturing=!1,a.dom=e,a.painterRoot=n,a._localHandlerScope=new Zi(e,Wi),Ni&&(a._globalHandlerScope=new Zi(document,Yi)),i=a,o=(r=a._localHandlerScope).domHandlers,w.pointerEventsSupported?q(Fi.pointer,function(t){qi(r,t,function(e){o[t].call(i,e)})}):(w.touchEventsSupported&&q(Fi.touch,function(t){qi(r,t,function(e){o[t].call(i,e),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}(r)})}),q(Fi.mouse,function(t){qi(r,t,function(e){e=ge(e),r.touching||o[t].call(i,e)})})),a}return m(e,t),e.prototype.dispose=function(){Xi(this._localHandlerScope),Ni&&Xi(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Ni&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?function(t,e){function n(n){qi(e,n,function(i){i=ge(i),Gi(t,i.target)||(i=function(t,e){return me(t.dom,new Ui(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))},{capture:!0})}w.pointerEventsSupported?q(zi,n):w.touchEventsSupported||q(Vi,n)}(this,e):Xi(e)}},e}(ie),$i=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return m(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=G(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){this.painter.resize((t=t||{}).width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function cr(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function hr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function dr(t){return t.sort(function(t,e){return t-e}),t}function fr(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function pr(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function gr(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function mr(t,e,n){if(!t[e])return 0;var i=Z(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),o=X(t,function(t){return(isNaN(t)?0:t)/i*r*100}),a=100*r,s=X(o,function(t){return Math.floor(t)}),l=Z(s,function(t,e){return t+e},0),u=X(o,function(t,e){return t-s[e]});lc&&(c=u[d],h=d);++s[h],u[h]=0,++l}return s[e]/r}var vr=9007199254740991;function yr(t){var e=2*Math.PI;return(t%e+e)%e}function _r(t){return t>-1e-4&&t<1e-4}var br=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function wr(t){if(t instanceof Date)return t;if("string"==typeof t){var e=br.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function xr(t){return Math.pow(10,kr(t))}function kr(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function Sr(t,e){var n=kr(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function Cr(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function Ar(t){t.sort(function(t,e){return s(t,e,0)?-1:1});for(var e=-1/0,n=1,i=0;i=0||r&&G(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var ho=co([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),fo=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return ho(this,t,e)},t}(),po=new Je(50);function go(t){if("string"==typeof t){var e=po.get(t);return e&&e.image}return t}function mo(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=po.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!yo(e=o.image)&&o.pending.push(a):((e=new Image).onload=e.onerror=vo,po.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function vo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=ti(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function xo(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=ti(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ko(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=ti(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function ko(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&p+i.accumWidth>i.width&&(o=e.split("\n"),h=!0),i.accumWidth=p}else{var g=Do(e,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+f,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var m=0;m=33&&e<=255}(t)||!!Io[t]}function Do(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,c=0,h=0;hn:r+c+f>n)?c?(s||l)&&(p?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=d,s="",c=u+=f):(l&&(s+=l,c+=u,l="",u=0),o.push(s),a.push(c),s=d,c=f)):p?(o.push(l),a.push(u),l=d,u=f):(o.push(d),a.push(f)):(c+=f,p?(l+=d,u+=f):(l&&(s+=l,l="",u=0),s+=d))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=r),{accumWidth:c,lines:o,linesWidths:a}}var Eo="__zr_style_"+Math.round(10*Math.random()),Oo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Po={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Oo[Eo]=!0;var Ro=["z","z2","invisible"],Lo=function(t){function e(e){return t.call(this,e)||this}var n;return m(e,t),e.prototype._init=function(e){for(var n=Q(e),i=0;i-1e-8&&t<1e-8}function Xo(t){return t>1e-8||t<-1e-8}function Zo(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Ko(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function $o(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,c=s*s-3*a*l,h=s*l-9*a*u,d=l*l-3*s*u,f=0;if(qo(c)&&qo(h))qo(s)?o[0]=0:(S=-l/s)>=0&&S<=1&&(o[f++]=S);else{var p=h*h-4*c*d;if(qo(p)){var g=h/c,m=-g/2;(S=-s/a+g)>=0&&S<=1&&(o[f++]=S),m>=0&&m<=1&&(o[f++]=m)}else if(p>0){var v=Bo(p),y=c*s+1.5*a*(-h+v),_=c*s+1.5*a*(-h-v);(S=(-s-((y=y<0?-zo(-y,Go):zo(y,Go))+(_=_<0?-zo(-_,Go):zo(_,Go))))/(3*a))>=0&&S<=1&&(o[f++]=S)}else{var b=(2*c*s-3*a*h)/(2*Bo(c*c*c)),w=Math.acos(b)/3,x=Bo(c),k=Math.cos(w),S=(-s-2*x*k)/(3*a),C=(m=(-s+x*(k+jo*Math.sin(w)))/(3*a),(-s+x*(k-jo*Math.sin(w)))/(3*a));S>=0&&S<=1&&(o[f++]=S),m>=0&&m<=1&&(o[f++]=m),C>=0&&C<=1&&(o[f++]=C)}}return f}function Qo(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(qo(a))Xo(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var u=o*o-4*a*s;if(qo(u))r[0]=-o/(2*a);else if(u>0){var c,h=Bo(u),d=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}function Jo(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,c=(l-s)*r+s,h=(c-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function ta(t,e,n,i,r,o,a,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;Uo[0]=l,Uo[1]=u;for(var y=0;y<1;y+=.05)Wo[0]=Zo(t,n,r,a,y),Wo[1]=Zo(e,i,o,s,y),(p=Zt(Uo,Wo))=0&&p=0&&m1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(fa[0]=ha(r)*n+t,fa[1]=ca(r)*i+e,pa[0]=ha(o)*n+t,pa[1]=ca(o)*i+e,u(s,fa,pa),c(l,fa,pa),(r%=da)<0&&(r+=da),(o%=da)<0&&(o+=da),r>o&&!a?o+=da:rr&&(ga[0]=ha(f)*n+t,ga[1]=ca(f)*i+e,u(s,ga,s),c(l,ga,l))}var ka={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Sa=[],Ca=[],Aa=[],Ma=[],Ia=[],Ta=[],Da=Math.min,Ea=Math.max,Oa=Math.cos,Pa=Math.sin,Ra=Math.sqrt,La=Math.abs,Na=Math.PI,Fa=2*Na,Va="undefined"!=typeof Float32Array,za=[];function Ba(t){return Math.round(t/Na*1e8)/1e8%2*Na}function Ha(t,e){var n=Ba(t[0]);n<0&&(n+=Fa);var i=t[1];i+=n-t[0],!e&&i-n>=Fa?i=n+Fa:e&&n-i>=Fa?i=n-Fa:!e&&n>i?i=n+(Fa-Ba(n-i)):e&&n0&&(this._ux=La(n/ui/t)||0,this._uy=La(n/ui/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this.addData(ka.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=La(t-this._xi)>this._ux||La(e-this._yi)>this._uy||this._len<5;return this.addData(ka.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(ka.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(ka.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){return za[0]=i,za[1]=r,Ha(za,o),this.addData(ka.A,t,e,n,n,i=za[0],(r=za[1])-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Oa(r)*n+t,this._yi=Pa(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(ka.R,t,e,n,i),this},t.prototype.closePath=function(){this.addData(ka.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&f<=t||c<0&&f>=t||0===c&&(h>0&&p<=e||h<0&&p>=e);)f+=c*(n=o[i=this._dashIdx]),p+=h*n,this._dashIdx=(i+1)%g,c>0&&fl||h>0&&pu||a[i%2?"moveTo":"lineTo"](c>=0?Da(f,t):Ea(f,t),h>=0?Da(p,e):Ea(p,e));this._dashOffset=-Ra((c=f-t)*c+(h=p-e)*h)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var a,s,l,u,c,h=this._ctx,d=this._dashSum,f=this._dashOffset,p=this._lineDash,g=this._xi,m=this._yi,v=0,y=this._dashIdx,_=p.length,b=0;for(f<0&&(f=d+f),f%=d,a=0;a<1;a+=.1)s=Zo(g,t,n,r,a+.1)-Zo(g,t,n,r,a),l=Zo(m,e,i,o,a+.1)-Zo(m,e,i,o,a),v+=Ra(s*s+l*l);for(;y<_&&!((b+=p[y])>f);y++);for(a=(b-f)/v;a<=1;)u=Zo(g,t,n,r,a),c=Zo(m,e,i,o,a),y%2?h.moveTo(u,c):h.lineTo(u,c),a+=p[y]/v,y=(y+1)%_;y%2!=0&&h.lineTo(r,o),this._dashOffset=-Ra((s=r-u)*s+(l=o-c)*l)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,this._dashedBezierTo(t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,n,i,r,o)},t.prototype.toStatic=function(){if(this._saveData){var t=this.data;t instanceof Array&&(t.length=this._len,Va&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Aa[0]=Aa[1]=Ia[0]=Ia[1]=Number.MAX_VALUE,Ma[0]=Ma[1]=Ta[0]=Ta[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||La(m)>i||h===e-1)&&(p=Math.sqrt(T*T+m*m),r=g,o=_);break;case ka.C:var v=t[h++],y=t[h++],_=(g=t[h++],t[h++]),b=t[h++],w=t[h++];p=ea(r,o,v,y,g,_,b,w,10),r=b,o=w;break;case ka.Q:p=sa(r,o,v=t[h++],y=t[h++],g=t[h++],_=t[h++],10),r=g,o=_;break;case ka.A:var x=t[h++],k=t[h++],S=t[h++],C=t[h++],A=t[h++],M=t[h++],I=M+A;h+=1,h++,f&&(a=Oa(A)*S+x,s=Pa(A)*C+k),p=Ea(S,C)*Da(Fa,Math.abs(M)),r=Oa(I)*S+x,o=Pa(I)*C+k;break;case ka.R:a=r=t[h++],s=o=t[h++],p=2*t[h++]+2*t[h++];break;case ka.Z:var T=a-r;m=s-o,p=Math.sqrt(T*T+m*m),r=a,o=s}p>=0&&(l[c++]=p,u+=p)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,c=this.data,h=this._ux,d=this._uy,f=this._len,p=e<1,g=0,m=0;if(!p||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var v=0;vh||La(s-o)>d||v===f-1){if(p){if(g+(H=l[m++])>u){t.lineTo(r*(1-(j=(u-g)/H))+a*j,o*(1-j)+s*j);break t}g+=H}t.lineTo(a,s),r=a,o=s}break;case ka.C:var b=c[v++],w=c[v++],x=c[v++],k=c[v++],S=c[v++],C=c[v++];if(p){if(g+(H=l[m++])>u){Jo(r,b,x,S,j=(u-g)/H,Sa),Jo(o,w,k,C,j,Ca),t.bezierCurveTo(Sa[1],Ca[1],Sa[2],Ca[2],Sa[3],Ca[3]);break t}g+=H}t.bezierCurveTo(b,w,x,k,S,C),r=S,o=C;break;case ka.Q:if(b=c[v++],w=c[v++],x=c[v++],k=c[v++],p){if(g+(H=l[m++])>u){oa(r,b,x,j=(u-g)/H,Sa),oa(o,w,k,j,Ca),t.quadraticCurveTo(Sa[1],Ca[1],Sa[2],Ca[2]);break t}g+=H}t.quadraticCurveTo(b,w,x,k),r=x,o=k;break;case ka.A:var A=c[v++],M=c[v++],I=c[v++],T=c[v++],D=c[v++],E=c[v++],O=c[v++],P=!c[v++],R=I>T?I:T,L=La(I-T)>.001,N=D+E,F=!1;if(p&&(g+(H=l[m++])>u&&(N=D+E*(u-g)/H,F=!0),g+=H),L&&t.ellipse?t.ellipse(A,M,I,T,O,D,N,P):t.arc(A,M,R,D,N,P),F)break t;_&&(n=Oa(D)*I+A,i=Pa(D)*T+M),r=Oa(N)*I+A,o=Pa(N)*T+M;break;case ka.R:n=r=c[v],i=o=c[v+1],a=c[v++],s=c[v++];var V=c[v++],z=c[v++];if(p){if(g+(H=l[m++])>u){var B=u-g;t.moveTo(a,s),t.lineTo(a+Da(B,V),s),(B-=V)>0&&t.lineTo(a+V,s+Da(B,z)),(B-=z)>0&&t.lineTo(a+Ea(V-B,0),s+z),(B-=V)>0&&t.lineTo(a,s+Ea(z-B,0));break t}g+=H}t.rect(a,s,V,z);break;case ka.Z:if(p){var H;if(g+(H=l[m++])>u){var j;t.lineTo(r*(1-(j=(u-g)/H))+n*j,o*(1-j)+i*j);break t}g+=H}t.closePath(),r=n,o=i}}},t.CMD=ka,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,void(e._uy=0)),t}();function Ga(t,e,n,i,r,o,a){if(0===r)return!1;var s,l=r;if(a>e+l&&a>i+l||at+l&&o>n+l||oe+h&&c>i+h&&c>o+h&&c>s+h||ct+h&&u>n+h&&u>r+h&&u>a+h||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||c+ur&&(r+=Xa);var d=Math.atan2(l,s);return d<0&&(d+=Xa),d>=i&&d<=r||d+Xa>=i&&d+Xa<=r}function Ka(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var $a=ja.CMD,Qa=2*Math.PI,Ja=[-1,-1,-1],ts=[-1,-1];function es(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(c=ts[0],ts[0]=ts[1],ts[1]=c),p=Zo(e,i,o,s,ts[0]),f>1&&(g=Zo(e,i,o,s,ts[1]))),d+=2===f?ve&&s>i&&s>o||s=0&&c<=1&&(r[l++]=c);else{var u=a*a-4*o*s;if(qo(u))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,h=Bo(u),d=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,i,o,s,Ja);if(0===l)return 0;var u=ra(e,i,o);if(u>=0&&u<=1){for(var c=0,h=na(e,i,o,u),d=0;dn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Ja[0]=-l,Ja[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Qa-1e-4){i=0,r=Qa;var c=o?1:-1;return a>=Ja[0]+t&&a<=Ja[1]+t?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=Qa,r+=Qa);for(var d=0,f=0;f<2;f++){var p=Ja[f];if(p+t>a){var g=Math.atan2(s,p);c=o?1:-1,g<0&&(g=Qa+g),(g>=i&&g<=r||g+Qa>=i&&g+Qa<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),d+=c)}}return d}function rs(t,e,n,i,r){for(var o,a,s=t.data,l=t.len(),u=0,c=0,h=0,d=0,f=0,p=0;p1&&(n||(u+=Ka(c,h,d,f,i,r))),m&&(d=c=s[p],f=h=s[p+1]),g){case $a.M:c=d=s[p++],h=f=s[p++];break;case $a.L:if(n){if(Ga(c,h,s[p],s[p+1],e,i,r))return!0}else u+=Ka(c,h,s[p],s[p+1],i,r)||0;c=s[p++],h=s[p++];break;case $a.C:if(n){if(Ua(c,h,s[p++],s[p++],s[p++],s[p++],s[p],s[p+1],e,i,r))return!0}else u+=es(c,h,s[p++],s[p++],s[p++],s[p++],s[p],s[p+1],i,r)||0;c=s[p++],h=s[p++];break;case $a.Q:if(n){if(Wa(c,h,s[p++],s[p++],s[p],s[p+1],e,i,r))return!0}else u+=ns(c,h,s[p++],s[p++],s[p],s[p+1],i,r)||0;c=s[p++],h=s[p++];break;case $a.A:var v=s[p++],y=s[p++],_=s[p++],b=s[p++],w=s[p++],x=s[p++];p+=1;var k=!!(1-s[p++]);o=Math.cos(w)*_+v,a=Math.sin(w)*b+y,m?(d=o,f=a):u+=Ka(c,h,o,a,i,r);var S=(i-v)*b/_+v;if(n){if(Za(v,y,b,w,w+x,k,e,S,r))return!0}else u+=is(v,y,b,w,w+x,k,S,r);c=Math.cos(w+x)*_+v,h=Math.sin(w+x)*b+y;break;case $a.R:if(d=c=s[p++],f=h=s[p++],o=d+s[p++],a=f+s[p++],n){if(Ga(d,f,o,f,e,i,r)||Ga(o,f,o,a,e,i,r)||Ga(o,a,d,a,e,i,r)||Ga(d,a,d,f,e,i,r))return!0}else u+=Ka(o,f,o,a,i,r),u+=Ka(d,a,d,f,i,r);break;case $a.Z:if(n){if(Ga(c,h,d,f,e,i,r))return!0}else u+=Ka(c,h,d,f,i,r);c=d,h=f}}return n||Math.abs(h-f)<1e-4||(u+=Ka(c,h,d,f,i,r)||0),0!==u}var os=H({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Oo),as={style:H({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Po.style)},ss=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],ls=function(t){function e(e){return t.call(this,e)||this}var n;return m(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?ci:e>.2?"#eee":hi}if(t)return hi}return ci},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(it(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==Sn(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~e.SHAPE_CHANGED_BIT},e.prototype.createPathProxy=function(){this.path=new ja(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&e.SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var s=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;l=Math.max(l,null==u?4:u)}s>1e-10&&(a.width+=l/s,a.height+=l/s,a.x-=l/s/2,a.y-=l/s/2)}return a}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(i.contain(t=n[0],e=n[1])){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return rs(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return rs(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=e.SHAPE_CHANGED_BIT,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){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:B(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&e.SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return Mt(os,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=B({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=B({},i.shape),B(s,n.shape)):(s=B({},r?this.shape:i.shape),B(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=B({},this.shape);for(var u={},c=Q(s),h=0;h0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return Mt(us,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=ni(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Vo);cs.prototype.type="tspan";var hs=cs,ds=H({x:0,y:0},Oo),fs={style:H({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Po.style)},ps=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.createStyle=function(t){return Mt(ds,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return fs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new $n(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Vo);ps.prototype.type="image";var gs=ps,ms=Math.round;function vs(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(ms(2*i)===ms(2*r)&&(t.x1=t.x2=_s(i,s,!0)),ms(2*o)===ms(2*a)&&(t.y1=t.y2=_s(o,s,!0)),t):t}}function ys(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=_s(i,s,!0),t.y=_s(r,s,!0),t.width=Math.max(_s(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(_s(r+a,s,!1)-t.y,0===a?0:1),t):t}}function _s(t,e,n){if(!e)return t;var i=ms(2*t);return(i+ms(e))%2==0?i/2:(i+(n?1:-1))/2}var bs=function(){this.x=0,this.y=0,this.width=0,this.height=0},ws={},xs=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new bs},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=ys(ws,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,c=e.height,h=e.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=r=o=h:h instanceof Array?1===h.length?n=i=r=o=h[0]:2===h.length?(n=r=h[0],i=o=h[1]):3===h.length?(n=h[0],i=o=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],o=h[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>c&&(i*=c/(a=i+r),r*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+c-r),0!==r&&t.arc(s+u-r,l+c-r,r,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ls);xs.prototype.type="rect";var ks=xs,Ss={fill:"#000"},Cs={style:H({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},Po.style)},As=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ss,n.attr(e),n}return m(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;ed&&u){var f=Math.floor(d/l);n=n.slice(0,f)}var p=d,g=c;if(r&&(p+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var m=wo(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,C=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),A=i.calculatedLineHeight,M=0;Ml&&Mo(n,t.substring(l,u),e,s),Mo(n,i[2],e,s,i[1]),l=_o.lastIndex}lo){w>0?(y.tokens=y.tokens.slice(0,w),m(y,b,_),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var M=x.width,I=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))O.percentWidth=M,c.push(O),O.contentWidth=ti(O.text,C);else{if(I){var T=x.backgroundColor,D=T&&T.image;D&&yo(D=go(D))&&(O.width=Math.max(O.width,D.width*A/D.height))}var E=p&&null!=r?r-b:null;null!=E&&E=0&&"right"===(C=v[S]).align;)this._placeToken(C,t,_,d,k,"right",p),b-=C.width,k-=C.width,S--;for(x+=(n-(x-h)-(f-k)-b)/2;w<=S;)this._placeToken(C=v[w],t,_,d,x+C.width/2,"center",p),x+=C.width,w++;d+=_}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&Ps(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var c=!!s.backgroundColor,h=t.textPadding;h&&(r=Es(r,o,h),u-=t.height/2-h[0]-t.innerHeight/2);var d=this._getOrCreateChild(hs),f=d.createStyle();d.useStyle(f);var p=this._defaultStyle,g=!1,m=0,v=Ds("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,p.fill)),y=Ds("stroke"in s?s.stroke:"stroke"in e?e.stroke:c||a||p.autoStroke&&!g?null:(m=2,p.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=u,_&&(f.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,f.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||Jn,f.opacity=mt(s.opacity,e.opacity,1),y&&(f.lineWidth=mt(s.lineWidth,e.lineWidth,m),f.lineDash=gt(s.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=y),v&&(f.fill=v);var b=t.contentWidth,w=t.contentHeight;d.setBoundingRect(new $n(ii(f.x,b,f.textAlign),ri(f.y,w,f.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,c=t.borderWidth,h=t.borderColor,d=it(u),f=t.borderRadius,p=this;if(d||c&&h){(a=this._getOrCreateChild(ks)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=f,a.dirtyShape()}if(d)(l=a.style).fill=u||null,l.fillOpacity=gt(t.fillOpacity,1);else if(u&&u.image){(s=this._getOrCreateChild(gs)).onload=function(){p.dirtyStyle()};var m=s.style;m.image=u.image,m.x=n,m.y=i,m.width=r,m.height=o}c&&h&&((l=a.style).lineWidth=c,l.stroke=h,l.strokeOpacity=gt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var v=(a||s).style;v.shadowBlur=t.shadowBlur||0,v.shadowColor=t.shadowColor||"transparent",v.shadowOffsetX=t.shadowOffsetX||0,v.shadowOffsetY=t.shadowOffsetY||0,v.opacity=mt(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&bt(e)||t.textFont||t.font},e}(Vo),Ms={left:!0,right:1,center:1},Is={top:1,bottom:1,middle:1};function Ts(t){if(t){t.font=As.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||Ms[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||Is[n]?n:"top",t.padding&&(t.padding=yt(t.padding))}}function Ds(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Es(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function Os(t){var e=t.text;return null!=e&&(e+=""),e}function Ps(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var Rs=As,Ls=Ur(),Ns=1,Fs={},Vs=Ur(),zs=["emphasis","blur","select"],Bs=["normal","emphasis","blur","select"],Hs="highlight",js="downplay",Gs="select",Us="unselect",Ws="toggleSelect";function Ys(t){return null!=t&&"none"!==t}var qs=new Je(100);function Xs(t){if("string"!=typeof t)return t;var e=qs.get(t);return e||(e=gn(t,-.1),qs.put(t,e)),e}function Zs(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function Ks(t){Zs(t,"emphasis",2)}function $s(t){2===t.hoverState&&Zs(t,"normal",0)}function Qs(t){Zs(t,"blur",1)}function Js(t){1===t.hoverState&&Zs(t,"normal",0)}function tl(t){t.selected=!0}function el(t){t.selected=!1}function nl(t,e,n){e(t,n)}function il(t,e,n){nl(t,e,n),t.isGroup&&t.traverse(function(t){nl(t,e,n)})}function rl(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function ol(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var r=n&&G(n,"select")>=0,o=!1;if(t instanceof ls){var a=Vs(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Ys(s)||Ys(l)){var u=(i=i||{}).style||{};!Ys(u.fill)&&Ys(s)?(o=!0,i=B({},i),(u=B({},u)).fill=Xs(s)):!Ys(u.stroke)&&Ys(l)&&(o||(i=B({},i),u=B({},u)),u.stroke=Xs(l)),i.style=u}}if(i&&null==i.z2){o||(i=B({},i));var c=t.z2EmphasisLift;i.z2=t.z2+(null!=c?c:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=G(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}})}),e}function xl(t,e,n){Ml(t,!0),il(t,al),kl(t,e,n)}function kl(t,e,n){var i=Ls(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var Sl=["emphasis","blur","select"],Cl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Al(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=Ll(p),s*=Ll(p));var g=(r===o?-1:1)*Ll((a*a*(s*s)-a*a*(f*f)-s*s*(d*d))/(a*a*(f*f)+s*s*(d*d)))||0,m=g*a*f/s,v=g*-s*d/a,y=(t+n)/2+Fl(h)*m-Nl(h)*v,_=(e+i)/2+Nl(h)*m+Fl(h)*v,b=Hl([1,0],[(d-m)/a,(f-v)/s]),w=[(d-m)/a,(f-v)/s],x=[(-1*d-m)/a,(-1*f-v)/s],k=Hl(w,x);if(Bl(w,x)<=-1&&(k=Vl),Bl(w,x)>=1&&(k=0),k<0){var S=Math.round(k/Vl*1e6)/1e6;k=2*Vl+S%2*Vl}c.addData(u,y,_,a,s,b,k,h,o)}var Gl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Ul=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,Wl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.applyTransform=function(t){},e}(ls);function Yl(t){return null!=t.setData}function ql(t,e){var n=function(t){var e=new ja;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=ja.CMD,l=t.match(Gl);if(!l)return e;for(var u=0;uD*D+E*E&&(S=A,C=M),{cx:S,cy:C,x01:-c,y01:-h,x11:S*(r/w-1),y11:C*(r/w-1)}}var fu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},pu=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new fu},e.prototype.buildPath=function(t,e){!function(t,e){var n=uu(e.r,0),i=uu(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var o=n;n=i,i=o}var a,s=!!e.clockwise,l=e.startAngle,u=e.endAngle;if(l===u)a=0;else{var c=[l,u];Ha(c,!s),a=su(c[0]-c[1])}var h=e.cx,d=e.cy,f=e.cornerRadius||0,p=e.innerCornerRadius||0;if(n>hu)if(a>nu-hu)t.moveTo(h+n*ru(l),d+n*iu(l)),t.arc(h,d,n,l,u,!s),i>hu&&(t.moveTo(h+i*ru(u),d+i*iu(u)),t.arc(h,d,i,u,l,s));else{var g=su(n-i)/2,m=cu(g,f),v=cu(g,p),y=v,_=m,b=n*ru(l),w=n*iu(l),x=i*ru(u),k=i*iu(u),S=void 0,C=void 0,A=void 0,M=void 0;if((m>hu||v>hu)&&(S=n*ru(u),C=n*iu(u),A=i*ru(l),M=i*iu(l),ahu)if(_>hu){var L=du(A,M,b,w,n,_,s),N=du(S,C,x,k,n,_,s);t.moveTo(h+L.cx+L.x01,d+L.cy+L.y01),_hu&&a>hu?y>hu?(L=du(x,k,S,C,i,-y,s),N=du(b,w,A,M,i,-y,s),t.lineTo(h+L.cx+L.x01,d+L.cy+L.y01),y=2){if(i&&"spline"!==i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],c=[],h=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;dn-2?n-1:l+1],f=t[l>n-3?n-1:l+2]);var p=u*u,g=u*p;i.push([_u(c[0],h[0],d[0],f[0],u,p,g),_u(c[1],h[1],d[1],f[1],u,p,g)])}return i}(r,n)),t.moveTo(r[0][0],r[0][1]),s=1;for(var h=r.length;sUu[1]){if(a=!1,r)return a;var u=Math.abs(Uu[0]-Gu[1]),c=Math.abs(Gu[0]-Uu[1]);Math.min(u,c)>i.len()&&jn.scale(i,l,u0?l?e.animateFrom(n,{duration:p,delay:m||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:p,delay:m||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function dc(t,e,n,i,r,o){hc("update",t,e,n,i,r,o)}function fc(t,e,n,i,r,o){hc("init",t,e,n,i,r,o)}function pc(t,e,n,i,r,o){vc(t)||hc("remove",t,e,n,i,r,o)}function gc(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),pc(t,{style:{opacity:0}},e,n,i)}function mc(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||gc(t,e,n,i)}):gc(t,e,n,i)}function vc(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function wc(t){return!t.isGroup}function xc(t,e,n){if(t&&e){var i,r=(i={},t.traverse(function(t){wc(t)&&t.anid&&(i[t.anid]=t)}),i);e.traverse(function(t){if(wc(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),dc(t,i,n,Ls(t).dataIndex)}}})}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=B({},t.shape)),e}}function kc(t,e){return X(t,function(t){var n=t[0];n=Ku(n,e.x),n=$u(n,e.x+e.width);var i=t[1];return i=Ku(i,e.y),[n,i=$u(i,e.y+e.height)]})}function Sc(t,e){var n=Ku(t.x,e.x),i=$u(t.x+t.width,e.x+e.width),r=Ku(t.y,e.y),o=$u(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Cc(t,e,n){var i=B({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),H(r,n),new gs(i)):ic(t.replace("path://",""),i,n,"center")}function Ac(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var p=t-r,g=e-o,m=Ic(p,g,u,c)/f;if(m<0||m>1)return!1;var v=Ic(p,g,h,d)/f;return!(v<0||v>1)}function Ic(t,e,n,i){return t*i-n*e}function Tc(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=it(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&q(Q(l),function(t){It(s,t)||(s[t]=l[t],s.$vars.push(t))});var u=Ls(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:H({content:i,formatterParams:s},r)}}ec("circle",$l),ec("ellipse",tu),ec("sector",gu),ec("ring",yu),ec("polygon",ku),ec("polyline",Au),ec("rect",ks),ec("line",Du),ec("bezierCurve",Lu),ec("arc",Vu);var Dc={};function Ec(t,e){for(var n=0;n-1?sh:"EN";function hh(t,e){t=t.toUpperCase(),uh[t]=new ih(e),lh[t]=e}hh("EN",{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:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},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:". "}}}}),hh(sh,{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"}},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 dh=36e5,fh=864e5,ph=31536e6,gh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},mh={year:"{yyyy}",month:"{yyyy}-{MM}",day:"{yyyy}-{MM}-{dd}",hour:"{yyyy}-{MM}-{dd} "+gh.hour,minute:"{yyyy}-{MM}-{dd} "+gh.minute,second:"{yyyy}-{MM}-{dd} "+gh.second,millisecond:gh.none},vh=["year","month","day","hour","minute","second","millisecond"],yh=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function _h(t,e){return"0000".substr(0,e-(t+="").length)+t}function bh(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function wh(t,e,n,i){var r=wr(t),o=r[Sh(n)](),a=r[Ch(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[Ah(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[Mh(n)](),h=(c-1)%12+1,d=r[Ih(n)](),f=r[Th(n)](),p=r[Dh(n)](),g=(i instanceof ih?i:function(t){return uh[t]}(i||ch)||uh.EN).getModel("time"),m=g.get("month"),v=g.get("monthAbbr"),y=g.get("dayOfWeek"),_=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,_h(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,_h(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,y[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,_h(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,_h(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,_h(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,_h(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,_h(p,3)).replace(/{S}/g,p+"")}function xh(t,e){var n=wr(t),i=n[Ch(e)]()+1,r=n[Ah(e)](),o=n[Mh(e)](),a=n[Ih(e)](),s=n[Th(e)](),l=0===n[Dh(e)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,d=h&&1===r;return d&&1===i?"year":d?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function kh(t,e,n){var i="number"==typeof t?wr(t):t;switch(e=e||xh(t,n)){case"year":return i[Sh(n)]();case"half-year":return i[Ch(n)]()>=6?1:0;case"quarter":return Math.floor((i[Ch(n)]()+1)/4);case"month":return i[Ch(n)]();case"day":return i[Ah(n)]();case"half-day":return i[Mh(n)]()/24;case"hour":return i[Mh(n)]();case"minute":return i[Ih(n)]();case"second":return i[Th(n)]();case"millisecond":return i[Dh(n)]()}}function Sh(t){return t?"getUTCFullYear":"getFullYear"}function Ch(t){return t?"getUTCMonth":"getMonth"}function Ah(t){return t?"getUTCDate":"getDate"}function Mh(t){return t?"getUTCHours":"getHours"}function Ih(t){return t?"getUTCMinutes":"getMinutes"}function Th(t){return t?"getUTCSeconds":"getSeconds"}function Dh(t){return t?"getUTCSeconds":"getSeconds"}function Eh(t){return t?"setUTCFullYear":"setFullYear"}function Oh(t){return t?"setUTCMonth":"setMonth"}function Ph(t){return t?"setUTCDate":"setDate"}function Rh(t){return t?"setUTCHours":"setHours"}function Lh(t){return t?"setUTCMinutes":"setMinutes"}function Nh(t){return t?"setUTCSeconds":"setSeconds"}function Fh(t){return t?"setUTCSeconds":"setSeconds"}function Vh(t){if(!Ir(t))return it(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function zh(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var Bh=yt,Hh=/([&<>"'])/g,jh={"&":"&","<":"<",">":">",'"':""","'":"'"};function Gh(t){return null==t?"":(t+"").replace(Hh,function(t,e){return jh[e]})}function Uh(t,e,n){function i(t){return t&&bt(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?wr(t):t;if(!isNaN(+s))return wh(s,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return rt(t)?i(t):ot(t)&&r(t)?t+"":"-";var l=Mr(t);return r(l)?Vh(l):rt(t)?i(t):"-"}var Wh=["a","b","c","d","e","f","g"],Yh=function(t,e){return"{"+t+(null==e?"":e)+"}"};function qh(t,e,n){et(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Zh(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=wr(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),c=i["get"+r+"Seconds"](),h=i["get"+r+"Milliseconds"]();return t.replace("MM",_h(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100+"").replace("dd",_h(s,2)).replace("d",s).replace("hh",_h(l,2)).replace("h",l).replace("mm",_h(u,2)).replace("m",u).replace("ss",_h(c,2)).replace("s",c).replace("SSS",_h(h,3))}function Kh(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function $h(t,e){return e=e||"transparent",it(t)?t:at(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Qh(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Jh=q,td=["left","right","top","bottom","width","height"],ed=[["width","left","right"],["height","top","bottom"]];function nd(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,u){var c,h,d=l.getBoundingRect(),f=e.childAt(u+1),p=f&&f.getBoundingRect();if("horizontal"===t){var g=d.width+(p?-p.x+d.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(p?-p.y+d.y:0);(h=a+m)>r||l.newline?(o+=s+n,a=0,h=m,s=d.width):s=Math.max(s,d.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)})}var id=nd;function rd(t,e,n){n=Bh(n||0);var i=e.width,r=e.height,o=cr(t.left,i),a=cr(t.top,r),s=cr(t.right,i),l=cr(t.bottom,r),u=cr(t.width,i),c=cr(t.height,r),h=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(c)&&(c=r-l-h-a),null!=f&&(isNaN(u)&&isNaN(c)&&(f>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(o)&&(o=i-s-u-d),isNaN(a)&&(a=r-l-c-h),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(t.top||t.bottom){case"middle":case"center":a=r/2-c/2-n[0];break;case"bottom":a=r-c-h}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(c)&&(c=r-h-a-(l||0));var p=new $n(o+n[3],a+n[0],u,c);return p.margin=n,p}function od(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new $n(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}var c=rd(H({width:l.width,height:l.height},e),n,i),h=o?c.x-l.x:0,d=a?c.y-l.y:0;"raw"===s?(t.x=h,t.y=d):(t.x+=h,t.y+=d),t.markRedraw()}}function ad(t){var e=t.layoutMode||t.constructor.layoutMode;return at(e)?e:e?{type:e}:null}function sd(t,e,n){var i=n&&n.ignoreSize;!et(i)&&(i=[i,i]);var r=a(ed[0],0),o=a(ed[1],1);function a(n,r){var o={},a=0,u={},c=0;if(Jh(n,function(e){u[e]=t[e]}),Jh(n,function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&c++}),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var h=0;h=0;a--)o=V(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Id";return Kr(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(n,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(ih);oo(hd,ih),uo(hd),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=no(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=no(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(hd),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,e,i,r){if(t.length){var o=function(t){var e={},i=[];return q(t,function(r){var o,a,s=n(e,r),l=function(t,e){var n=[];return q(t,function(t){G(e,t)>=0&&n.push(t)}),n}(s.originalDeps=(a=[],q(hd.getClassesByMainType(o=r),function(t){a=a.concat(t.dependencies||t.prototype.dependencies||[])}),a=X(a,function(t){return no(t).main}),"dataset"!==o&&G(a,"dataset")<=0&&a.unshift("dataset"),a),t);s.entryCount=l.length,0===s.entryCount&&i.push(r),q(l,function(t){G(s.predecessor,t)<0&&s.predecessor.push(t);var i=n(e,t);G(i.successor,t)<0&&i.successor.push(r)})}),{graph:e,noEntryList:i}}(e),a=o.graph,s=o.noEntryList,l={};for(q(t,function(t){l[t]=!0});s.length;){var u=s.pop(),c=a[u],h=!!l[u];h&&(i.call(r,u,c.originalDeps.slice()),delete l[u]),q(c.successor,h?f:d)}q(l,function(){throw new Error("")})}function d(t){a[t].entryCount--,0===a[t].entryCount&&s.push(t)}function f(t){l[t]=!0,d(t)}}}(hd);var dd=hd,fd="";"undefined"!=typeof navigator&&(fd=navigator.platform||"");var pd="rgba(0, 0, 0, 0.2)",gd={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:pd,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:pd,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:pd,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:pd,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:pd,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:pd,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:fd.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},md=Ct(["tooltip","label","itemName","itemId","seriesName"]),vd="original",yd="arrayRows",_d="objectRows",bd="keyedColumns",wd="typedArray",xd="unknown",kd="column",Sd="row",Cd=Ur();function Ad(t,e,n){var i={},r=Id(e);if(!r||!t)return i;var o,a,s=[],l=[],u=Cd(e.ecModel).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;q(t=t.slice(),function(e,n){var r=at(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]});var h=u.get(c)||u.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((c=c||n)&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}var Bd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new ih(i),this._locale=new ih(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=Gd(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Gd(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):Pd(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&q(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=Ct(),s=e&&e.replaceMergeMainTypeMap;Cd(this).datasetMap=Ct(),q(t,function(t,e){null!=t&&(dd.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?F(t):V(n[e],t,!0))}),s&&s.each(function(t,e){dd.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))}),dd.topologicalTravel(o,dd.getAllClassMainTypes(),function(e){var o=function(t,e,n){var i=Rd.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,Pr(t[e])),a=i.get(e),l=Fr(a,o,a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll");(function(t,e,n){q(t,function(t){var i=t.newOption;at(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))})})(l,e,dd),n[e]=null,i.set(e,null),r.set(e,0);var u=[],c=[],h=0;q(l,function(t,n){var i=t.existing,r=t.newOption;if(r){var o=dd.getClass(e,t.keyInfo.subType,!("series"===e));if(!o)return;if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var a=B({componentIndex:n},t.keyInfo);B(i=new o(r,this,this,a),a),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(u.push(i.option),c.push(i),h++):(u.push(void 0),c.push(void 0))},this),n[e]=u,i.set(e,c),r.set(e,h),"series"===e&&Ed(this)},this),this._seriesIndices||Ed(this)},e.prototype.getOption=function(){var t=F(this.option);return q(t,function(e,n){if(dd.hasClass(n)){for(var i=Pr(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!jr(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}}),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}}),r}var $d=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&(q(Pr(t.series),function(t){t&&t.data&<(t.data)&&xt(t.data)}),q(Pr(t.dataset),function(t){t&&t.source&<(t.source)&&xt(t.source)})),t=F(t);var i=this._optionBackup,r=function(t,e,n){var i,r,o=[],a=t.baseOption,s=t.timeline,l=t.options,u=t.media,c=!!t.media,h=!!(l||s||a&&a.timeline);function d(t){q(e,function(e){e(t,n)})}return a?(r=a).timeline||(r.timeline=s):((h||c)&&(t.options=t.media=null),r=t),c&&et(u)&&q(u,function(t){t&&t.option&&(t.query?o.push(t):i||(i=t))}),d(r),q(l,function(t){return d(t)}),q(o,function(t){return d(t.option)}),{baseOption:r,timelineOptions:l||[],mediaDefault:i,mediaList:o}}(t,e,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],F(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=F(n[i.getCurrentIndex()]))}return e},t.prototype.getMediaOption=function(t){var e,n=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,a=[],s=[];if(!r.length&&!o)return s;for(var l=0,u=r.length;l=0;p--){var g=t[p];if(a||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var m=g.data.getByRawIndex(g.stackResultDimension,h);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return i[0]=d,i[1]=f,i});o.hostModel.setData(s),e.data=s})}var _f,bf,wf,xf,kf,Sf=function(t){this.data=t.data||(t.sourceFormat===bd?{}:[]),this.sourceFormat=t.sourceFormat||xd,this.seriesLayoutBy=t.seriesLayoutBy||kd,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function Cf(t){return t instanceof Sf}function Af(t,e,n,i){n=n||Tf(t);var r=e.seriesLayoutBy,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:Df(r),startIndex:a,dimensionsDetectedCount:o};if(e===yd){var s=t;"auto"===i||null==i?Ef(function(t){null!=t&&"-"!==t&&(it(t)?null==a&&(a=1):a=0)},n,s,10):a=ot(i)?i:i?1:0,r||1!==a||(r=[],Ef(function(t,e){r[e]=null!=t?t+"":""},n,s,1/0)),o=r?r.length:n===Sd?s.length:s[0]?s[0].length:null}else if(e===_d)r||(r=function(t){for(var e,n=0;nu&&(u=f)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(o||d1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},ep=function(){function t(t,e){"number"!=typeof e&&Kf(""),this._opFn=tp[t],this._rvalFloat=Mr(e)}return t.prototype.evaluate=function(t){return this._opFn("number"==typeof t?t:Mr(t),this._rvalFloat)},t}(),np=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,r="number"===n?t:Mr(t),o="number"===i?e:Mr(e),a=isNaN(r),s=isNaN(o);if(a&&(r=this._incomparable),s&&(o=this._incomparable),a&&s){var l="string"===n,u="string"===i;l&&(r=u?t:0),u&&(o=l?e:0)}return ro?-this._resultLT:0},t}(),ip=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Mr(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=Mr(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function rp(t,e){return"eq"===t||"ne"===t?new ip("eq"===t,e):It(tp,t)?new ep(t,e):null}var op=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return $f(t,e)},t}();function ap(t){return dp(t.sourceFormat)||Kf(""),t.data}function sp(t){var e=t.sourceFormat,n=t.data;if(dp(e)||Kf(""),e===yd){for(var i=[],r=0,o=n.length;r9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(gp(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=lt(a=o.get("data",!0))?wd:vd,e=[];var c=this._getSourceMetaRawOption(),h=l?l.metaRawOption:null;t=[Af(a,{seriesLayoutBy:gt(c.seriesLayoutBy,h?h.seriesLayoutBy:null),sourceHeader:gt(c.sourceHeader,h?h.sourceHeader:null),dimensions:gt(c.dimensions,h?h.dimensions:null)},s,o.get("encode",!0))]}else{var d=n;if(r){var f=this._applyTransform(i);t=f.sourceList,e=f.upstreamSignList}else t=[Af(d.get("source",!0),this._getSourceMetaRawOption(),null,null)],e=[]}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);null!=r&&1!==t.length&&mp("");var o,a=[],s=[];return q(t,function(t){t.prepareSource();var e=t.getSource(r||0);null==r||e||mp(""),a.push(e),s.push(t._getVersionSign())}),i?e=function(t,e,n){var i=Pr(t),r=i.length;r||Kf("");for(var o=0,a=r;o1||e>0&&!t.noHeader,i=0;q(t.blocks,function(t){wp(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))}),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var r=e.noHeader,o=Sp(e),a=function(t,e,n,i){var r=[],o=e.blocks||[];_t(!o||et(o)),o=o||[];var a=t.orderMode;if(e.sortBlocks&&a){o=o.slice();var s={valueAsc:"asc",valueDesc:"desc"};if(It(s,a)){var l=new np(s[a],null);o.sort(function(t,e){return l.evaluate(t.sortParam,e.sortParam)})}else"seriesDesc"===a&&o.reverse()}var u=Sp(e);if(q(o,function(e,n){var o=wp(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)}),r.length)return"richText"===t.renderMode?r.join(u.richText):Cp(r.join(""),n)}(t,e,r?n:o.html,i);if(r)return a;var s=Uh(e.header,"ordinal",t.useUTC),l=vp(i,t.renderMode).nameStyle;return"richText"===t.renderMode?Ap(t,s,l)+o.richText+a:Cp('
'+Gh(s)+"
"+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,c=t.useUTC;if(!o||!a){var h=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),d=o?"":Uh(l,"ordinal",c),f=e.valueType,p=a?[]:et(u)?X(u,function(t,e){return Uh(t,et(f)?f[e]:f,c)}):[Uh(u,et(f)?f[0]:f,c)],g=!s||!o,m=!s&&o,v=vp(i,r),y=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":h)+(o?"":Ap(t,d,y))+(a?"":function(t,e,n,i,r){var o=[r];return n&&o.push({padding:[0,0,0,i?10:20],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,p,g,m,_)):Cp((s?"":h)+(o?"":function(t,e,n){return''+Gh(t)+""}(d,!s,y))+(a?"":function(t,e,n,i){return''+X(t,function(t){return Gh(t)}).join("  ")+""}(p,g,m,_)),n)}}}};function kp(t,e,n,i,r,o){if(t){var a=wp(t);return a.planLayout(t),a.build({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e},t,0,o)}}function Sp(t){var e=t.__gapLevelBetweenSubBlocks;return{html:yp[e],richText:_p[e]}}function Cp(t,e){return'
'+t+'
'}function Ap(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Mp(t,e){return $h(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Ip(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Tp=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Tr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=Xh({color:e,type:t,renderMode:n,markerId:i});return it(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};et(e)?q(e,function(t){return B(n,t)}):B(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function Dp(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,h=o.getRawValue(a),d=et(h),f=Mp(o,a);if(c>1||d&&!c){var p=function(t,e,n,i,r){var o=e.getData(),a=Z(t,function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName},!1),s=[],l=[],u=[];function c(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(bp("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?q(i,function(t){c(Gf(o,n,t),t)}):q(t,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,o,a,u,f);e=p.inlineValues,n=p.inlineValueTypes,i=p.blocks,r=p.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);r=e=Gf(l,a,u[0]),n=g.type}else r=e=d?h[0]:h;var m=Hr(o),v=m&&o.name||"",y=l.getName(a),_=s?v:y;return bp("section",{header:v,noHeader:s||!m,sortParam:r,blocks:[bp("nameValue",{markerType:"item",markerColor:f,name:_,noName:!bt(_),value:e,valueType:n})].concat(i||[])})}var Ep=Ur();function Op(t,e){return t.getName(e)||t.getId(e)}var Pp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return m(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=qf({count:Lp,reset:Np}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Ep(this).sourceManager=new fp(this)).prepareSource();var i=this.getInitialData(t,n);Vp(i,this),this.dataTask.context.data=i,Ep(this).dataBeforeProcessed=i,Rp(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=ad(this),i=n?ld(t):{},r=this.subType;dd.hasClass(r)&&(r+="Series"),V(t,e.getTheme().get(this.subType)),V(t,this.getDefaultOption()),Rr(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&sd(t,i,n)},e.prototype.mergeOption=function(t,e){t=V(this.option,t,!0),this.fillDataTextStyle(t.data);var n=ad(this);n&&sd(this.option,t,n);var i=Ep(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);Vp(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,Ep(this).dataBeforeProcessed=r,Rp(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!lt(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=Fd.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},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,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[Op(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s0&&this._innerSelect(t,e)}},e.registerClass=function(t){return dd.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.useColorPaletteOnData=!1,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(dd);function Rp(t){var e=t.name;Hr(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return q(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)}),i.join(" ")}(t)||e)}function Lp(t){return t.model.getRawData().count()}function Np(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Fp}function Fp(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Vp(t,e){q(y(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,tt(zp,e))})}function zp(t,e){var n=Bp(t);return n&&n.setOutputEnd((e||this).count()),e}function Bp(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}W(Pp,Wf),W(Pp,Fd),oo(Pp,dd);var Hp=Pp,jp=function(){function t(){this.group=new Qi,this.uid=oh("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();io(jp),uo(jp);var Gp=jp;function Up(){var t=Ur();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}var Wp=Ur(),Yp=Up(),qp=function(){function t(){this.group=new Qi,this.uid=oh("viewChart"),this.renderTask=qf({plan:Kp,reset:$p}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){Zp(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){Zp(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){Wp(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Xp(t,e,n){t&&("emphasis"===e?ul:cl)(t,n)}function Zp(t,e,n){var i=Gr(t,e),r=e&&null!=e.highlightKey?function(t){var e=Fs[t];return null==e&&Ns<=32&&(e=Fs[t]=Ns++),e}(e.highlightKey):null;null!=i?q(Pr(i),function(e){Xp(t.getItemGraphicEl(e),n,r)}):t.eachItemGraphicEl(function(t){Xp(t,n,r)})}function Kp(t){return Yp(t.model)}function $p(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Wp(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Qp[l]}io(qp),uo(qp);var Qp={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Jp=qp,tg="\0__throttleOriginMethod",eg="\0__throttleRate",ng="\0__throttleType";function ig(t,e,n){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var d=function(){for(var t=[],d=0;d=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){s=t},d}function rg(t,e,n,i){var r=t[e];if(r){var o=r[tg]||r;if(r[eg]!==n||r[ng]!==i){if(null==n||!i)return t[e]=o;(r=t[e]=ig(o,n,"debounce"===i))[tg]=o,r[ng]=i,r[eg]=n}return r}}var og=Ur(),ag={itemStyle:co(Jc,!0),lineStyle:co(Kc,!0)},sg={lineStyle:"stroke",itemStyle:"fill"};function lg(t,e){return t.visualStyleMapper||ag[e]||(console.warn("Unkown style type '"+e+"'."),ag.itemStyle)}function ug(t,e){return t.visualDrawType||sg[e]||(console.warn("Unkown style type '"+e+"'."),"fill")}var cg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=lg(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=ug(t,i),l=o[s],u=nt(l)?l:null;if(!o[s]||u||"auto"===o.fill||"auto"===o.stroke){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||"function"==typeof o.fill?c:o.fill,o.stroke="auto"===o.stroke||"function"==typeof o.stroke?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=B({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},hg=new ih,dg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=lg(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){hg.option=n[i];var a=r(hg);B(t.ensureUniqueItemVisual(e,"style"),a),hg.option.decal&&(t.setItemVisual(e,"decal",hg.option.decal),hg.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},fg={performRawSeries:!0,overallReset:function(t){var e=Ct();t.eachSeries(function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||e.set(t.type,n={}),og(t).scope=n}}),t.eachSeries(function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=og(e).scope,a=ug(e,e.visualStyleAccessPath||"itemStyle");r.each(function(t){var e=r.getRawIndex(t);i[e]=t}),n.each(function(t){var s=i[t];if(r.getItemVisual(s,"colorFromPalette")){var l=r.ensureUniqueItemVisual(s,"style"),u=n.getName(t)||t+"",c=n.count();l[a]=e.getColorFromPalette(u,o,c)}})}})}},pg=Math.PI,gg=function(){function t(t,e,n,i){this._stageTaskMap=Ct(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Ct();t.eachSeries(function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;q(this._allHandlers,function(i){var r=t.get(i.uid)||t.set(i.uid,{});_t(!(i.reset&&i.overallReset),""),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)},this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}q(t,function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each(function(t){a(i,t)&&(t.dirty(),h=!0)}),h&&c.dirty(),o.updatePayload(c,n);var f=o.getPerformArgs(c,i.block);d.each(function(t){t.perform(f)}),c.perform(f)&&(r=!0)}else u&&u.each(function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)})}}),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=Ct(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||qf({plan:bg,reset:wg,count:Sg}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||qf({reset:mg});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=Ct(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1;function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,qf({reset:vg,onDirty:_g})));n.context={model:t,overallProgress:c},n.agent=o,n.__block=c,r._pipe(t,n)}_t(!t.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(c=!1,q(n.getSeries(),d)),h&&o.dirty()},t.prototype._pipe=function(t,e){var n=this._pipelineMap.get(t.uid);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},t.wrapStageHandler=function(t,e){return nt(t)&&(t={overallReset:t,seriesType:Cg(t)}),t.uid=oh("stageHandler"),e&&(t.visualType=e),t},t}();function mg(t){t.overallReset(t.ecModel,t.api,t.payload)}function vg(t){return t.overallProgress&&yg}function yg(){this.agent.dirty(),this.getDownstream().dirty()}function _g(){this.agent&&this.agent.dirty()}function bg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function wg(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Pr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?X(e,function(t,e){return kg(e)}):xg}var xg=kg(0);function kg(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Bg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendSymbol&&n.setVisual("legendSymbol",t.legendSymbol),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),o=t.get("symbolKeepAspect"),a=t.get("symbolRotate"),s=t.get("symbolOffset"),l=nt(i),u=nt(r),c=nt(a),h=nt(s),d=l||u||c||h,f=!l&&i?i:t.defaultSymbol;if(n.setVisual({legendSymbol:t.legendSymbol||f,symbol:f,symbolSize:u?null:r,symbolKeepAspect:o,symbolRotate:c?null:a,symbolOffset:h?null:s}),!e.isSeriesFiltered(t))return{dataEach:d?function(e,n){var o=t.getRawValue(n),d=t.getDataParams(n);l&&e.setItemVisual(n,"symbol",i(o,d)),u&&e.setItemVisual(n,"symbolSize",r(o,d)),c&&e.setItemVisual(n,"symbolRotate",a(o,d)),h&&e.setItemVisual(n,"symbolOffset",s(o,d))}:null}}}};function Hg(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function jg(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function Gg(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i)}}var Ug=2*Math.PI,Wg=ja.CMD,Yg=["top","right","bottom","left"];function qg(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function Xg(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+t,h=(s/=u)*n+e;if(Math.abs(i-r)%Ug<1e-4)return l[0]=c,l[1]=h,u-n;if(o){var d=i;i=qa(r),r=qa(d)}else i=qa(i),r=qa(r);i>r&&(r+=Ug);var f=Math.atan2(s,a);if(f<0&&(f+=Ug),f>=i&&f<=r||f+Ug>=i&&f+Ug<=r)return l[0]=c,l[1]=h,u-n;var p=n*Math.cos(i)+t,g=n*Math.sin(i)+e,m=n*Math.cos(r)+t,v=n*Math.sin(r)+e,y=(p-a)*(p-a)+(g-s)*(g-s),_=(m-a)*(m-a)+(v-s)*(v-s);return y<_?(l[0]=p,l[1]=g,Math.sqrt(y)):(l[0]=m,l[1]=v,Math.sqrt(_))}function Zg(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,c=n-t,h=i-e,d=Math.sqrt(c*c+h*h),f=(l*(c/=d)+u*(h/=d))/d;s&&(f=Math.min(Math.max(f,0),1));var p=a[0]=t+(f*=d)*c,g=a[1]=e+f*h;return Math.sqrt((p-r)*(p-r)+(g-o)*(g-o))}function Kg(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),c=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var $g=[];function Qg(t,e,n){var i=Kg(e.x,e.y,e.width,e.height,t.x,t.y,$g);return n.set($g[0],$g[1]),i}function Jg(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=e.data,h=t.x,d=t.y,f=0;f0){e=e/180*Math.PI,tm.fromArray(t[0]),em.fromArray(t[1]),nm.fromArray(t[2]),jn.sub(im,tm,em),jn.sub(rm,nm,em);var n=im.len(),i=rm.len();if(!(n<.001||i<.001)){im.scale(1/n),rm.scale(1/i);var r=im.dot(rm);if(Math.cos(e)1&&jn.copy(sm,nm),sm.toArray(t[1])}}}}function um(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,tm.fromArray(t[0]),em.fromArray(t[1]),nm.fromArray(t[2]),jn.sub(im,em,tm),jn.sub(rm,nm,em);var i=im.len(),r=rm.len();if(!(i<.001||r<.001)&&(im.scale(1/i),rm.scale(1/r),im.dot(e)=a)jn.copy(sm,nm);else{sm.scaleAndAdd(rm,o/Math.tan(Math.PI/2-s));var l=nm.x!==em.x?(sm.x-em.x)/(nm.x-em.x):(sm.y-em.y)/(nm.y-em.y);if(isNaN(l))return;l<0?jn.copy(sm,em):l>1&&jn.copy(sm,nm)}sm.toArray(t[1])}}}function cm(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function hm(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=qt(i[0],i[1]),o=qt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=$t([],i[1],i[0],a/r),l=$t([],i[1],i[2],a/o),u=$t([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&o&&x(-h/a,0,a);var m,v,y=t[0],_=t[a-1];return b(),m<0&&k(-m,.8),v<0&&k(v,.8),b(),w(m,v,1),w(v,m,-1),b(),m<0&&S(-m),v<0&&S(v),u}function b(){m=y.rect[e]-i,v=r-_.rect[e]-_.rect[n]}function w(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&k(-r*n,1)}else k(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--)x(-o[l-1]*h,l,a)}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function gm(t,e,n,i){return pm(t,"y","height",e,n,i)}function mm(t){if(t){for(var e=[],n=0;n=0&&n.attr(f.oldLayoutSelect),G(u,"emphasis")>=0&&n.attr(f.oldLayoutEmphasis)),dc(n,s,e,a)}else if(n.attr(s),!jc(n).valueAnimation){var c=gt(n.style.opacity,1);n.style.opacity=0,fc(n,{style:{opacity:c}},e,a)}if(f.oldLayout=s,n.states.select){var h=f.oldLayoutSelect={};xm(h,s,km),xm(h,n.states.select,km)}if(n.states.emphasis){var d=f.oldLayoutEmphasis={};xm(d,s,km),xm(d,n.states.emphasis,km)}Uc(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){var f=wm(i),p={points:i.shape.points};(r=f.oldLayout)?(i.attr({shape:r}),dc(i,{shape:p},e)):(i.setShape(p),i.style.strokePercent=0,fc(i,{style:{strokePercent:1}},e)),f.oldLayout=p}},t}();function Cm(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},function(t){i.push(t.seriesIndex)}),i}q([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],function(t){e(t[0],function(e,i,r){e=B({},e),r.dispatchAction(B(e,{type:t[1],seriesIndex:n(i,e)}))})})}function Am(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e=t.seriesIndex,i=r.selected,a=0;a0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:ot(t)?[t]:et(t)?t:null):null}var jm=new ja(!0);function Gm(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Um(t){var e=t.fill;return null!=e&&"none"!==e}function Wm(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Ym(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function qm(t,e,n){var i=mo(e.image,e.__image,n);if(yo(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r.setTransform){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var Xm=["shadowBlur","shadowOffsetX","shadowOffsetY"],Zm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Km(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){o||(Jm(t,r),o=!0);var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Oo.opacity:a}(i||e.blend!==n.blend)&&(o||(Jm(t,r),o=!0),t.globalCompositeOperation=e.blend||Oo.blend);for(var s=0;s0&&Hm(n.lineDash,n.lineWidth),x=n.lineDashOffset,k=!!t.setLineDash,S=e.getGlobalScale();if(u.setScale(S[0],S[1],e.segmentIgnoreThreshold),w){var C=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;C&&1!==C&&(w=X(w,function(t){return t/C}),x/=C)}var A=!0;(l||e.__dirty&ls.SHAPE_CHANGED_BIT||w&&!k&&r)&&(u.setDPR(t.dpr),s?u.setContext(null):(u.setContext(t),A=!1),u.reset(),w&&!k&&(u.setLineDash(w),u.setLineDashOffset(x)),e.buildPath(u,e.shape,i),u.toStatic(),e.pathUpdated()),A&&u.rebuildPath(t,s?a:1),w&&k&&(t.setLineDash(w),t.lineDashOffset=x),i||(n.strokeFirst?(r&&Ym(t,n),o&&Wm(t,n)):(o&&Wm(t,n),r&&Ym(t,n))),w&&k&&t.setLineDash([])}(t,e,f,d),d&&(n.batchFill=f.fill||"",n.batchStroke=f.stroke||"")):e instanceof hs?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),$m(t,e,u,l,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||Jn,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var o=n.lineDash&&n.lineWidth>0&&Hm(n.lineDash,n.lineWidth),a=n.lineDashOffset;if(o){var s=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;s&&1!==s&&(o=X(o,function(t){return t/s}),a/=s),t.setLineDash(o),t.lineDashOffset=a,r=!0}}n.strokeFirst?(Gm(n)&&t.strokeText(i,n.x,n.y),Um(n)&&t.fillText(i,n.x,n.y)):(Um(n)&&t.fillText(i,n.x,n.y),Gm(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,f)):e instanceof gs?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(t,e,n,i,r){Km(t,tv(e,r.inHover),n&&tv(n,r.inHover),i,r)}(t,e,u,l,n),function(t,e,n){var i=e.__image=mo(n.image,e.__image,e,e.onload);if(i&&yo(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight)t.drawImage(i,u=n.sx||0,c=n.sy||0,n.sWidth,n.sHeight,r,o,a,s);else if(n.sx&&n.sy){var u,c;t.drawImage(i,u=n.sx,c=n.sy,a-u,s-c,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,f)):e instanceof Zu&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=s&&(u=Dv(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var d=i;(i=new Qi).add(d),d.scaleX=d.scaleY=u.scale,d.x=u.x,d.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new ks({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=iv[s];if(u&&It(iv,s)){a=u.call(this,t,e);var c=t.getAttribute("name");if(c){var h={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(h),"g"===s&&(l=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var d=vv[s];if(d&&It(vv,s)){var f=d.call(this,t),p=t.getAttribute("id");p&&(this._defs[p]=f)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new hs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});bv(e,n),xv(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(iv={g:function(t,e){var n=new Qi;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new ks;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new $l;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new Du;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new tu;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=wv(i));var r=new ku({shape:{points:n||[]},silent:!0});return bv(e,r),xv(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=wv(i));var r=new Au({shape:{points:n||[]},silent:!0});return bv(e,r),xv(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new gs;return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Qi;return bv(e,a),xv(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Qi;return bv(e,a),xv(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=Xl(t.getAttribute("d")||"");return bv(e,n),xv(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),vv={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new Hu(e,n,i,r);return yv(t,o),_v(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new ju(e,n,i);return yv(t,r),_v(t,r),r}};function yv(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function _v(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i,r=n.getAttribute("offset");i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};Tv(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:a})}n=n.nextSibling}}function bv(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),H(e.__inheritedStyle,t.__inheritedStyle))}function wv(t){for(var e=Av(t),n=[],i=0;i0;o-=2){var a=i[o],s=void 0;switch(r=r||[1,0,0,1,0,0],i[o-1]){case"translate":s=Av(a),Ne(r,r,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":s=Av(a),Ve(r,r,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":s=Av(a),Fe(r,r,-parseFloat(s[0])/180*Math.PI);break;case"skew":s=Av(a),console.warn("Skew transform is not supported yet");break;case"matrix":s=Av(a),r[0]=parseFloat(s[0]),r[1]=parseFloat(s[1]),r[2]=parseFloat(s[2]),r[3]=parseFloat(s[3]),r[4]=parseFloat(s[4]),r[5]=parseFloat(s[5])}}e.setLocalTransform(r)}}(t,e),Tv(t,a,s),i||function(t,e,n){for(var i=0;i>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function Bv(t,e){return X(K((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);for(var i=e.features,r=0;r0}),function(t){var n,i=t.properties,r=t.geometry,o=[];"Polygon"===r.type&&o.push({type:"polygon",exterior:(n=r.coordinates)[0],interiors:n.slice(1)}),"MultiPolygon"===r.type&&q(n=r.coordinates,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Lv(i[e||"name"],o,i.cp);return a.properties=i,a})}for(var Hv=[126,25],jv=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Gv=0;Gv0&&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.setOption=function(t,e,n){if(this._disposed);else{var i,r,o;if(ny(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new $d(this._api),s=this._theme,l=this._model=new Ud;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},Uy),Py(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(gy(this),yy.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,xy.call(this,i),ky.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},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||ry&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(w.canvasSupported)return(t=B({},t||{})).pixelRatio=t.pixelRatio||this.getDevicePixelRatio(),t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},e.prototype.getSvgDataURL=function(){if(w.svgSupported){var t=this._zr;return q(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=this._model,n=[],i=this;ty((t=t||{}).excludeComponents,function(t){e.eachComponent({mainType:t},function(t){var e=i._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ty(n,function(t){t.group.ignore=!1}),r}},e.prototype.getConnectedDataURL=function(t){if(this._disposed);else if(w.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if($y[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();q(Ky,function(o,h){if(o.group===n){var d=e?o.getZr().painter.getSvgDom().innerHTML:o.getRenderedCanvas(F(t)),f=o.getDom().getBoundingClientRect();a=i(f.left,a),s=i(f.top,s),l=r(f.right,l),u=r(f.bottom,u),c.push({dom:d,left:f.left,top:f.top})}});var d=(l*=h)-(a*=h),f=(u*=h)-(s*=h),p=j(),g=ir(p,{renderer:e?"svg":"canvas"});if(g.resize({width:d,height:f}),e){var m="";return ty(c,function(t){m+=''+t.dom+""}),g.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new ks({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),ty(c,function(t){var e=new gs({style:{x:t.left*h-a,y:t.top*h-s,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return _y(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return _y(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return q(Yr(this._model,t),function(t,i){i.indexOf("Models")>=0&&q(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}},this)},this),!!n},e.prototype.getVisual=function(t,e){var n=Yr(this._model,t,{defaultMainType:"series"}),i=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?Hg(i,r,e):jg(i,e)},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,e,n=this;ty(By,function(t){var e=function(e){var i,r=n.getModel(),o=e.target;if("globalout"===t?i={}:o&&Mm(o,function(t){var e=Ls(t);if(e&&null!=e.dataIndex){var n=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return i=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return i=B({},e.eventData),!0},!0),i){var a=i.componentType,s=i.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=i.seriesIndex);var l=a&&null!=s&&r.getComponent(a,s),u=l&&n["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,n._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:l,view:u},n.trigger(t,i)}};e.zrEventfulCallAtLast=!0,n._zr.on(t,e,n)}),ty(jy,function(t,e){n._messageCenter.on(e,function(t){this.trigger(e,t)},n)}),ty(["selectchanged"],function(t){n._messageCenter.on(t,function(e){this.trigger(t,e)},n)}),t=this,e=this._api,this._messageCenter.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(Am("map","selectchanged",t,i,n),Am("pie","selectchanged",t,i,n)):"select"===n.fromAction?(Am("map","selected",t,i,n),Am("pie","selected",t,i,n)):"unselect"===n.fromAction&&(Am("map","unselected",t,i,n),Am("pie","unselected",t,i,n))})},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed||this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed);else{this._disposed=!0,$r(this.getDom(),t_,"");var t=this._api,e=this._model;ty(this._componentsViews,function(n){n.dispose(e,t)}),ty(this._chartsViews,function(n){n.dispose(e,t)}),this._zr.dispose(),delete Ky[this.id]}},e.prototype.resize=function(t){if(this._disposed);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__flagInMainProcess=!0,n&&gy(this),yy.update.call(this,{type:"resize",animation:B({duration:0},t&&t.animation)}),this.__flagInMainProcess=!1,xy.call(this,i),ky.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed);else if(ny(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Zy[t]){var n=Zy[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=B({},t);return e.type=jy[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed);else if(ny(e)||(e={silent:!!e}),Hy[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;wy.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&w.browser.weChat&&this._throttledZrFlush(),xy.call(this,n),ky.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed);else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse(function(e){if(e.states&&e.states.emphasis){if(vc(e))return;if(e instanceof ls&&function(t){var e=Vs(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}})}gy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),my(t,!0),my(t,!1),e.plan()},my=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!w.node&&!w.worker&&e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}})}(t,n)},Dy=function(t,e){ty(Yy,function(n){n(t,e)})},Ry=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},Ly=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse(function(e){vc(e)||t(e)}),e.__needsUpdateStatus=!1)},Ey=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return m(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){ul(e,n),Ry(t)},n.prototype.leaveEmphasis=function(e,n){cl(e,n),Ry(t)},n.prototype.enterBlur=function(e){hl(e),Ry(t)},n.prototype.leaveBlur=function(e){dl(e),Ry(t)},n.prototype.enterSelect=function(e){fl(e),Ry(t)},n.prototype.leaveSelect=function(e){pl(e),Ry(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(Yd))(t)},Oy=function(t){function e(t,e){for(var n=0;n=0)){y_.push(n);var o=Dg.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function b_(t,e){Zy[t]=e}function w_(t){P("createCanvas",t)}function x_(t,e,n){!function(t,e,n){if(e.svg){var i=new Vv(t,e.svg);Kv.set(t,i)}else{var r=e.geoJson||e.geoJSON;r&&!e.features?n=e.specialAreas:r=e,i=new Xv(t,r,n),Kv.set(t,i)}}(t,e,n)}function k_(t){return function(t){var e=Kv.get(t);return e&&"geoJSON"===e.type&&e.getMapForUser()}(t)}var S_=function(t){var e=(t=F(t)).type;e||Kf("");var n=e.split(":");2!==n.length&&Kf("");var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,cp.set(e,t)};v_(sy,cg),v_(ly,dg),v_(ly,fg),v_(sy,Bg),v_(ly,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolOffset",!0),s=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolOffset",a),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s)}:null}}}),v_(7e3,function(t,e){t.eachRawSeries(function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=sv(n,e))});var r=i.getVisual("decal");r&&(i.getVisual("style").decal=sv(r,e))}})}),u_(vf),c_(900,function(t){var e=Ct();t.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(yf)}),b_("default",function(t,e){H(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Qi,i=new ks({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new Rs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new ks({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new Vu({shape:{startAngle:-pg/2,endAngle:-pg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*pg/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*pg/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}),f_({type:Hs,event:Hs,update:Hs},Tt),f_({type:js,event:js,update:js},Tt),f_({type:Gs,event:Gs,update:Gs},Tt),f_({type:Us,event:Us,update:Us},Tt),f_({type:Ws,event:Ws,update:Ws},Tt),l_("light",Og),l_("dark",Vg);var C_={},A_=[],M_={registerPreprocessor:u_,registerProcessor:c_,registerPostInit:h_,registerPostUpdate:d_,registerAction:f_,registerCoordinateSystem:p_,registerLayout:m_,registerVisual:v_,registerTransform:S_,registerLoading:b_,registerMap:x_,PRIORITY:uy,ComponentModel:dd,ComponentView:Gp,SeriesModel:Hp,ChartView:Jp,registerComponentModel:function(t){dd.registerClass(t)},registerComponentView:function(t){Gp.registerClass(t)},registerSeriesModel:function(t){Hp.registerClass(t)},registerChartView:function(t){Jp.registerClass(t)},registerSubTypeDefaulter:function(t,e){dd.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){sr(t,e)}};function I_(t){et(t)?q(t,function(t){I_(t)}):G(A_,t)>=0||(A_.push(t),nt(t)&&(t={install:t}),t.install(M_))}function T_(t){return null==t?0:t.length||1}function D_(t){return t}var E_=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||D_,this._newKeyGetter=i||D_,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._new,e={},n={},i=[],r=[];this._initIndexMap(this._old,e,i,"_oldKeyGetter"),this._initIndexMap(t,n,r,"_newKeyGetter");for(var o=0;o1&&1===c)this._updateManyToOne&&this._updateManyToOne(l,s),n[a]=null;else if(1===u&&c>1)this._updateOneToMany&&this._updateOneToMany(l,s),n[a]=null;else if(1===u&&1===c)this._update&&this._update(l,s),n[a]=null;else if(u>1)for(var h=0;h1)for(var a=0;av[1]&&(v[1]=m)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||j_(this,d))}this._rawCount=this._count=s,this._extent={},L_(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,c=this._rawExtent,h=i.getSource().sourceFormat===vd,d=0;dw[1]&&(w[1]=b)}if(h&&!i.pure&&g){var x=g.name;null==l[m]&&null!=x&&(l[m]=Br(x,null));var k=g.id;null==u[m]&&null!=k&&(u[m]=Br(k,null))}this._dontMakeIdFromName||j_(this,m)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},L_(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=this._count;if((r=e.constructor)===Array){t=new r(n);for(var i=0;i=0&&e=0&&e=0&&ea&&(a=l)}return this._extent[t]=i=[o,a],i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){K_(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=h,a=c,s=0),c===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=h&&C<=d||isNaN(C))&&(s[l++]=g),g++;p=!0}else if(2===o){m=f[c[0]];var y=f[c[1]],_=t[i[1]][0],b=t[i[1]][1];for(v=0;v=h&&C<=d||isNaN(C))&&(w>=_&&w<=b||isNaN(w))&&(s[l++]=g),g++}p=!0}}if(!p)if(1===o)for(v=0;v=h&&C<=d||isNaN(C))&&(s[l++]=x)}else for(v=0;vt[A][1])&&(k=!1)}k&&(s[l++]=this.getRawIndex(v))}return lb[1]&&(b[1]=_)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=U_(this,[t]),o=r._storage,a=[],s=Z_(1/e),l=o[t],u=this.count(),c=r._rawExtent[t],h=new(N_(this))(u),d=0,f=0;fu-f&&(a.length=s=u-f);for(var p=0;pc[1]&&(c[1]=m),h[d++]=v}return r._count=d,r._indices=h,r.getRawIndex=z_,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=U_(this,[]),a=o._storage[t],s=this.count(),l=new(N_(this))(s),u=0,c=Z_(1/e),h=this.getRawIndex(0);l[u++]=h;for(var d=1;dn&&(n=i,r=k)}l[u++]=r,h=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=z_,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new ih(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new E_(t?t.getIndices():[],this.getIndices(),function(e){return B_(t,e)},function(t){return B_(e,t)})},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},K_(t)?B(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(et(r=this.getVisual(e))?r=r.slice():K_(r)&&(r=B({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,K_(e)?B(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(K_(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?B(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=Ls(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(Y_,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){q(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},t.prototype.cloneShallow=function(e){if(e||(e=new t($_(this.dimensions,this.getDimensionInfo,this),this.hostModel)),e._storage=this._storage,e._storageArr=this._storageArr,q_(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r65535?tb:nb},F_=function(t,e,n,i){var r=J_[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u=0?this._indices[t]:-1},B_=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=H_(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},G_=function(t){return et(t)||(t=null!=t?[t]:[]),t},U_=function(e,n){var i=e.dimensions,r=new t($_(i,e.getDimensionInfo,e),e.hostModel);q_(r,e);for(var o,a,s=r._storage={},l=e._storage,u=r._storageArr=[],c=0;c=0?(s[h]=(a=void 0,(a=(o=l[h]).constructor)===Array?o.slice():new a(o)),r._rawExtent[h]=W_(),r._extent[h]=null):s[h]=l[h],u.push(s[h]))}return r},W_=function(){return[1/0,-1/0]},Y_=function(t){var e=Ls(t),n=Ls(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},q_=function(t,e){q(ib.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,q(rb,function(n){t[n]=F(e[n])}),t._calculationInfo=B({},e._calculationInfo)},j_=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=H_(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=H_(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();function ab(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function sb(t,e){return function(t,e,n){Cf(e)||(e=Mf(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=Ct(),o=Ct(),a=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return q(e,function(t){var e;at(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))}),r}(e,t,i,n.dimCount),l=0;le[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();uo(gb);var mb=gb;function vb(t){return at(t)&&null!=t.value?t.value:t+""}var yb=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&X(i,vb);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return this.categories[e=this.categories.length]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(this.categories[e=this.categories.length]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Ct(this.categories))},t}(),_b=hr;function bb(t){return pr(t)+2}function wb(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function xb(t,e){return t>=e[0]&&t<=e[1]}function kb(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Sb(t,e){return t*(e[1]-e[0])+e[0]}var Cb=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new yb({})),et(i)&&(i=new yb({categories:X(i,function(t){return at(t)?t.value:t})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return m(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return xb(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return kb(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Sb(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(mb);mb.registerClass(Cb);var Ab=Cb,Mb=hr,Ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return m(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xb(t,this._extent)},e.prototype.normalize=function(t){return kb(t,this._extent)},e.prototype.scale=function(t){return Sb(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=bb(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&o.push(t?{value:Mb(s+e,r)}:{value:n[1]}),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&ui&&(o=r.interval=i);var a=r.intervalPrecision=bb(o);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),wb(t,0,e),wb(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[_b(Math.ceil(t[0]/o)*o,a),_b(Math.floor(t[1]/o)*o,a)],t),r}(i,t,e,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},e.prototype.niceExtent=function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var n=e[0];t.fixMax||(e[1]+=n/2),e[0]-=n/2}else e[1]=1;isFinite(e[1]-e[0])||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var i=this._interval;t.fixMin||(e[0]=Mb(Math.floor(e[0]/i)*i)),t.fixMax||(e[1]=Mb(Math.ceil(e[1]/i)*i))},e.type="interval",e}(mb);mb.registerClass(Ib);var Tb=Ib,Db="__ec_stack_",Eb="undefined"!=typeof Float32Array?Float32Array:Array;function Ob(t){return t.get("stack")||Db+t.seriesIndex}function Pb(t){return t.dim+t.index}function Rb(t,e){var n=[];return e.eachSeriesByType(t,function(t){Bb(t)&&!Hb(t)&&n.push(t)}),n}function Lb(t){var e=function(t){var e={};q(t,function(t){var n=t.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=t.getData(),r=n.dim+"_"+n.index,o=i.mapDimension(n.dim),a=0,s=i.count();a0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return q(t,function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=e[r.dim+"_"+r.index],s=Math.abs(o[1]-o[0]),l=r.scale.getExtent(),u=Math.abs(l[1]-l[0]);i=a?s/u*a:s}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var h=cr(t.get("barWidth"),i),d=cr(t.get("barMaxWidth"),i),f=cr(t.get("barMinWidth")||1,i),p=t.get("barGap"),g=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:h,barMaxWidth:d,barMinWidth:f,barGap:p,barCategoryGap:g,axisKey:Pb(r),stackId:Ob(t)})}),Nb(n)}function Nb(t){var e={};q(t,function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var d=t.barCategoryGap;null!=d&&(o.categoryGap=d)});var n={};return q(e,function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=Q(i).length;o=Math.max(35-4*a,15)+"%"}var s=cr(o,r),l=cr(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),q(i,function(t){var e=t.maxWidth,n=t.minWidth;if(t.width)i=t.width,e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,c--;else{var i=h;e&&ei&&(i=n),i!==h&&(t.width=i,u-=i+l*i,c--)}}),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var d,f=0;q(i,function(t,e){t.width||(t.width=h),d=t,f+=t.width*(1+l)}),d&&(f-=d.width*l);var p=-f/2;q(i,function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:p,width:t.width},p+=t.width*(1+l)})}),n}function Fb(t,e,n){if(t&&e){var i=t[Pb(e)];return null!=i&&null!=n?i[Ob(n)]:i}}function Vb(t,e){var n=Rb(t,e),i=Lb(n),r={};q(n,function(t){var e=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=Ob(t),s=i[Pb(o)][a],l=s.offset,u=s.width,c=n.getOtherAxis(o),h=t.get("barMinHeight")||0;r[a]=r[a]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=e.mapDimension(c.dim),f=e.mapDimension(o.dim),p=db(e,d),g=c.isHorizontal(),m=jb(0,c),v=0,y=e.count();v=0?"p":"n",x=m;p&&(r[a][b]||(r[a][b]={p:m,n:m}),x=r[a][b][w]);var k,S=void 0,C=void 0,A=void 0,M=void 0;g?(S=x,C=(k=n.dataToPoint([_,b]))[1]+l,A=k[0]-m,M=u,Math.abs(A).5||(c=.5),{progress:function(t,e){for(var r,h=t.count,d=new Eb(2*h),f=new Eb(2*h),p=new Eb(h),g=[],m=[],v=0,y=0;null!=(r=t.next());)m[u]=e.get(a,r),m[1-u]=e.get(s,r),g=n.dataToPoint(m,null,g),f[v]=l?i.x+i.width:g[0],d[v++]=g[0],f[v]=l?g[1]:i.y+i.height,d[v++]=g[1],p[y++]=r;e.setLayout({largePoints:d,largeDataIndices:p,largeBackgroundPoints:f,barWidth:c,valueAxisStart:jb(0,o),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Bb(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Hb(t){return t.pipelineContext&&t.pipelineContext.large}function jb(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Gb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return m(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return wh(t.value,mh[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(bh(this._minLevelUnit))]||mh.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=B({},gh);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(et(o)){var c=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[c=Math.min(c,o.length-1)]}}return wh(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(t){var e=this._extent,n=[];if(!this._interval)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r,o=yh,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,c=l[r]();u1&&0===u&&o.unshift({value:o[0].value-d})}}for(u=0;u=i[0]&&v<=i[1]&&h++)}var y=(i[1]-i[0])/e;if(h>1.5*y&&d>y/1.5)break;if(u.push(g),h>y||t===o[f])break}c=[]}}var _=K(X(u,function(t){return K(t,function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd})}),function(t){return t.length>0}),b=[],w=_.length-1;for(f=0;f<_.length;++f)for(var x=_[f],k=0;kn&&(this._approxInterval=n);var r=Ub.length,o=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Yb(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function qb(t){return(t/=dh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Xb(t,e){return(t/=e?6e4:1e3)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Zb(t){return Sr(t,!0)}function Kb(t,e,n){var i=new Date(t);switch(bh(e)){case"year":case"month":i[Oh(n)](0);case"day":i[Ph(n)](1);case"hour":i[Rh(n)](0);case"minute":i[Lh(n)](0);case"second":i[Nh(n)](0),i[Fh(n)](0)}return i.getTime()}mb.registerClass(Gb);var $b=Gb,Qb=mb.prototype,Jb=Tb.prototype,tw=pr,ew=hr,nw=Math.floor,iw=Math.ceil,rw=Math.pow,ow=Math.log,aw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Tb,e._interval=0,e}return m(e,t),e.prototype.getTicks=function(t){var e=this._extent,n=this._originalScale.getExtent();return X(Jb.getTicks.call(this,t),function(t){var i=t.value,r=hr(rw(this.base,i));return r=i===e[0]&&this._fixMin?lw(r,n[0]):r,{value:r=i===e[1]&&this._fixMax?lw(r,n[1]):r}},this)},e.prototype.setExtent=function(t,e){var n=this.base;t=ow(t)/ow(n),e=ow(e)/ow(n),Jb.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=Qb.getExtent.call(this);e[0]=rw(t,e[0]),e[1]=rw(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=lw(e[0],n[0])),this._fixMax&&(e[1]=lw(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=ow(t[0])/ow(e),t[1]=ow(t[1])/ow(e),Qb.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=xr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[hr(iw(e[0]/i)*i),hr(nw(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){Jb.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xb(t=ow(t)/ow(this.base),this._extent)},e.prototype.normalize=function(t){return kb(t=ow(t)/ow(this.base),this._extent)},e.prototype.scale=function(t){return t=Sb(t,this._extent),rw(this.base,t)},e.type="log",e}(mb),sw=aw.prototype;function lw(t,e){return ew(t,tw(e))}sw.getMinorTicks=Jb.getMinorTicks,sw.getLabel=Jb.getLabel,mb.registerClass(aw);var uw=aw,cw=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]s&&(a=NaN,s=NaN);var c=ft(a)||ft(s)||t&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var h=this._determinedMin,d=this._determinedMax;return null!=h&&(a=h,l=!0),null!=d&&(s=d,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[dw[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[hw[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),hw={min:"_determinedMin",max:"_determinedMax"},dw={min:"_dataMin",max:"_dataMax"};function fw(t,e,n){var i=t.rawExtentInfo;return i||(i=new cw(t,e,n),t.rawExtentInfo=i,i)}function pw(t,e){return null==e?null:ft(e)?NaN:t.parse(e)}function gw(t,e){var n=t.type,i=fw(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Rb("bar",a),l=!1;if(q(s,function(t){l=l||t.getBaseAxis()===e.axis}),l){var u=Lb(s),c=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=Fb(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;q(a,function(t){s=Math.min(t.offset,s)});var l=-1/0;q(a,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=c/(1-(s+l)/o)-c;return{min:t-=h*(s/u),max:e+=h*(l/u)}}(r,o,e,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function mw(t,e){var n=gw(t,e),i=n.extent,r=e.get("splitNumber");t instanceof uw&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var a=e.get("interval");null!=a&&t.setInterval&&t.setInterval(a)}function vw(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Ab({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new $b({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(mb.getClass(e)||Tb)}}function yw(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(_w(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function _w(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function bw(t){var e=t.get("interval");return null==e?"auto":e}function ww(t){return"category"===t.type&&0===bw(t.getLabelModel())}function xw(t,e){var n={};return q(t.mapDimensionsAll(e),function(e){n[fb(t,e)]=!0}),Q(n)}var kw=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();function Sw(t){return pb(t.getSource(),t)}var Cw={isDimensionStacked:db,enableDataStack:hb,getStackedDimension:fb};function Aw(t,e){var n=e;e instanceof ih||(n=new ih(e));var i=vw(n);return i.setExtent(t[0],t[1]),mw(i,n),i}function Mw(t){W(t,kw)}function Iw(t,e){return Lc(t,null,null,"normal"!==(e=e||{}).state)}function Tw(t,e,n,i,r,o,a,s){return new Rs({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}var Dw=Ur();function Ew(t,e){var n,i,r=Ow(t,"labels"),o=bw(e);return Pw(r,o)||(nt(o)?n=Nw(t,o):(i="auto"===o?function(t){var e=Dw(t).autoInterval;return null!=e?e:Dw(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=Lw(t,i)),Rw(r,o,{labels:n,labelCategoryInterval:i}))}function Ow(t,e){return Dw(t)[e]||(Dw(t)[e]=[])}function Pw(t,e){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=ww(t),d=a.get("showMinLabel")||h,f=a.get("showMaxLabel")||h;d&&u!==o[0]&&g(o[0]);for(var p=u;p<=o[1];p+=l)g(p);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return f&&p-l!==o[1]&&g(o[1]),s}function Nw(t,e,n){var i=t.scale,r=yw(t),o=[];return q(i.getTicks(),function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})}),o}var Fw=[0,1];function Vw(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var zw=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return gr(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&Vw(n=n.slice(),i.count()),ur(t,Fw,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Vw(n=n.slice(),i.count());var r=ur(t,n,Fw,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=X(function(t,e){return"category"===t.type?function(t,e){var n,i,r=Ow(t,"ticks"),o=bw(e),a=Pw(r,o);if(a)return a;if(e.get("show")&&!t.scale.isBlank()||(n=[]),nt(o))n=Nw(t,o,!0);else if("auto"===o){var s=Ew(t,t.getLabelModel());i=s.labelCategoryInterval,n=X(s.labels,function(t){return t.tickValue})}else n=Lw(t,i=o,!0);return Rw(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:X(t.scale.getTicks(),function(t){return t.value})}}(this,e).ticks,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this);return function(t,e,n,i){var r=e.length;if(t.onBand&&!n&&r){var o,a=t.getExtent();if(1===r)e[0].coord=a[0],o=e[1]={coord:a[0]};else{var s=(e[r-1].coord-e[0].coord)/(e[r-1].tickValue-e[0].tickValue);q(e,function(t){t.coord-=s/2});var l=t.scale.getExtent();e.push(o={coord:e[r-1].coord+s*(1+l[1]-e[r-1].tickValue)})}var u=a[0]>a[1];c(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift()),i&&c(a[0],e[0].coord)&&e.unshift({coord:a[0]}),c(a[1],o.coord)&&(i?o.coord=a[1]:e.pop()),i&&c(o.coord,a[1])&&e.push({coord:a[1]})}function c(t,e){return t=hr(t),e=hr(e),u?t>e:t0&&t<100||(t=5),X(this.scale.getMinorTicks(t),function(t){return X(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},t.prototype.getViewLabels=function(){return(t=this,"category"===t.type?function(t){var e=t.getLabelModel(),n=Ew(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=yw(t);return{labels:X(e,function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}})}}(t)).labels;var t},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=yw(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=o[1];l+=s){var p,g=ni(n({value:l}),e.font,"center","top");p=1.3*g.height,d=Math.max(d,1.3*g.width,7),f=Math.max(f,p,7)}var m=d/c,v=f/h;isNaN(m)&&(m=1/0),isNaN(v)&&(v=1/0);var y=Math.max(0,Math.floor(Math.min(m,v))),_=Dw(t.model),b=t.getExtent(),w=_.lastAutoInterval,x=_.lastTickCount;return null!=w&&null!=x&&Math.abs(w-y)<=1&&Math.abs(x-a)<=1&&w>y&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?y=w:(_.lastTickCount=a,_.lastAutoInterval=y,_.axisExtent0=b[0],_.axisExtent1=b[1]),y}(this)},t}();function Bw(t){var e=dd.extend(t);return dd.registerClass(e),e}function Hw(t){var e=Gp.extend(t);return Gp.registerClass(e),e}function jw(t){var e=Hp.extend(t);return Hp.registerClass(e),e}function Gw(t){var e=Jp.extend(t);return Jp.registerClass(e),e}function Uw(){return!1}function Ww(t,e,n){var i=j(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var Yw=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||ui,"string"==typeof e?r=Ww(e,n,i):at(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(r.onselectstart=Uw,a.webkitUserSelect="none",a.userSelect="none",a.webkitTapHighlightColor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=n,o.config=null,o.dpr=i,o}return m(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Ww("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new $n(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length)(e=new $n(0,0,0,0)).copy(t),o.push(e);else{for(var e,n=!1,i=1/0,r=0,u=0;u=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&c.restore()};if(d)if(0===d.length)f=s.__endIndex;else for(var b=h.dpr,w=0;w0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}else N("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?Zw:0),this._needsManuallyCompositing),u.__builtin__||N("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.__drawIndex=u.incremental?-1:r,e(r),o=u),s.__dirty&xi.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,q(this._layers,function(t){t.setUnpainted()})},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?V(n[t],e,!0):n[t]=e;for(var i=0;i-1e-4}function dx(t,e){e&&fx(t,"transform","matrix("+ux(e[0])+","+ux(e[1])+","+ux(e[2])+","+ux(e[3])+","+cx(e[4])+","+cx(e[5])+")")}function fx(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function px(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof gs)t.style.opacity=i+"";else{if(function(t){var e=t.fill;return null!=e&&e!==nx}(e)){var r=e.fill;fx(t,"fill",r="transparent"===r?nx:r),fx(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*i:i)+"")}else fx(t,"fill",nx);if(function(t){var e=t.stroke;return null!=e&&e!==nx}(e)){var o=e.stroke;fx(t,"stroke",o="transparent"===o?nx:o);var a=e.lineWidth,s=e.strokeNoScale?n.getLineScale():1;fx(t,"stroke-width",(s?a/s:0)+""),fx(t,"paint-order",e.strokeFirst?"stroke":"fill"),fx(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*i:i)+"");var l=e.lineDash&&a>0&&Hm(e.lineDash,a);if(l){var u=e.lineDashOffset;s&&1!==s&&(l=X(l,function(t){return t/s}),u&&(u=ix(u/=s))),fx(t,"stroke-dasharray",l.join(",")),fx(t,"stroke-dashoffset",(u||0)+"")}else fx(t,"stroke-dasharray","");e.lineCap&&fx(t,"stroke-linecap",e.lineCap),e.lineJoin&&fx(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&fx(t,"stroke-miterlimit",e.miterLimit+"")}else fx(t,"stroke",nx)}}var gx=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=0===this._d.length,u=a-o,c=!s,h=Math.abs(u),d=hx(h-sx)||(c?u>=sx:-u>=sx),f=u>0?u%sx:u%sx+sx,p=!1;p=!!d||!hx(h)&&f>=ax==!!c;var g=cx(t+n*ox(o)),m=cx(e+i*rx(o));d&&(u=c?sx-1e-4:1e-4-sx,p=!0,l&&this._d.push("M",g,m));var v=cx(t+n*ox(o+u)),y=cx(e+i*rx(o+u));if(isNaN(g)||isNaN(m)||isNaN(n)||isNaN(i)||isNaN(r)||isNaN(lx)||isNaN(v)||isNaN(y))return"";this._d.push("A",cx(n),cx(i),ix(r*lx),+p,+c,v,y)},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){this._d.push(t);for(var u=1;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doUpdate=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},t.prototype.add=function(t){return null},t.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},t.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},t.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return q(this._tagNames,function(n){for(var i=t.getElementsByTagName(n),r=0;r-1){var s=fn(a)[3],l=mn(a);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s+"")}else o.setAttribute("stop-color",n[i].color);e.appendChild(o)}t.__dom=e},e.prototype.markUsed=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom),(n=e.style.stroke)&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom)}},e}(bx);function Ax(t){return t&&(!!t.image||!!t.svgElement)}var Mx=new Tm,Ix=function(t){function e(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return m(e,t),e.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;q(["fill","stroke"],function(i){var r=e.style[i];if(Ax(r)){var o=n.getDefs(!0),a=Mx.get(r);a?o.contains(a)||n.addDom(a):a=n.add(r),n.markUsed(e);var s=a.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}})}},e.prototype.add=function(t){if(Ax(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},e.prototype.update=function(t){if(Ax(t)){var e=this;this.doUpdate(t,function(){var n=Mx.get(t);e.updateDom(t,n)})}},e.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,r=e.getElementsByTagName("image");if(r.length){if(!t.image)return void e.removeChild(r[0]);i=r[0]}else t.image&&(i=this.createElement("image"));if(i){var o=void 0;if("string"==typeof t.image?o=t.image:t.image instanceof HTMLImageElement?o=t.image.src:t.image instanceof HTMLCanvasElement&&(o=t.image.toDataURL()),o){i.setAttribute("href",o),i.setAttribute("x","0"),i.setAttribute("y","0");var a=mo(o,i,{dirty:function(){}},function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")});a&&a.width&&a.height&&(e.setAttribute("width",a.width+""),e.setAttribute("height",a.height+"")),e.appendChild(i)}}}var s=(t.rotation||0)/Math.PI*180;e.setAttribute("patternTransform","translate("+(t.x||0)+", "+(t.y||0)+") rotate("+s+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")"),Mx.set(t,e)},e.prototype.markUsed=function(e){e.style&&(Ax(e.style.fill)&&t.prototype.markDomUsed.call(this,Mx.get(e.style.fill)),Ax(e.style.stroke)&&t.prototype.markDomUsed.call(this,Mx.get(e.style.stroke)))},e}(bx);function Tx(t){var e=t.__clipPaths;return e&&e.length>0}var Dx=function(t){function e(e,n){var i=t.call(this,e,n,"clipPath","__clippath_in_use__")||this;return i._refGroups={},i._keyDuplicateCount={},i}return m(e,t),e.prototype.markAllUnused=function(){for(var e in t.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[e]);this._keyDuplicateCount={}},e.prototype._getClipPathGroup=function(t,e){if(Tx(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,r=function(t){var e=[];if(t)for(var n=0;n0){var n=this.getDefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getAttribute("id"),n.contains(r=i._dom)||n.appendChild(r)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(r),i._dom=r),this.getSvgProxy(i).brush(i);var a=this.getSvgElement(i);r.innerHTML="",r.appendChild(a),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(r,e.slice(1))}else t&&t.setAttribute("clip-path","none")},e.prototype.markUsed=function(e){var n=this;e.__clipPaths&&q(e.__clipPaths,function(e){e._dom&&t.prototype.markDomUsed.call(n,e._dom)})},e.prototype.removeUnused=function(){t.prototype.removeUnused.call(this);var e={};for(var n in this._refGroups){var i=this._refGroups[n];this.isDomUnused(i)?i.parentNode&&i.parentNode.removeChild(i):e[n]=i}this._refGroups=e},e}(bx),Ex=function(t){function e(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowDom")||this;return i._shadowDomMap={},i._shadowDomPool=[],i}return m(e,t),e.prototype._getFromPool=function(){var t=this._shadowDomPool.pop();if(!t){(t=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++);var e=this.createElement("feDropShadow");t.appendChild(e),this.addDom(t)}return t},e.prototype.update=function(t,e){if((r=e.style)&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)){var n=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),i=e._shadowDom=this._shadowDomMap[n];i||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)}else this.remove(t,e);var r},e.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},e.prototype.updateDom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getGlobalScale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowOffsetY||0,u=r.shadowBlur,c=r.shadowColor;i.setAttribute("dx",(r.shadowOffsetX||0)/a+""),i.setAttribute("dy",l/s+""),i.setAttribute("flood-color",c),i.setAttribute("stdDeviation",u/2/a+" "+u/2/s),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),e._shadowDom=n;var h=n.getAttribute("id");t.style.filter="url(#"+h+")"}},e.prototype.removeUnused=function(){if(this.getDefs(!1)){var t=this._shadowDomPool;for(var e in this._shadowDomMap)t.push(this._shadowDomMap[e]);this._shadowDomMap={}}},e}(bx);function Ox(t){return parseInt(t,10)}function Px(t){return t instanceof ls?mx:t instanceof gs?vx:t instanceof hs?_x:mx}function Rx(t,e){return e&&t&&e.parentNode!==t}function Lx(t,e,n){if(Rx(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function Nx(t,e){if(Rx(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function Fx(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function Vx(t){return t.__svgEl}function zx(t){return function(){N('In SVG mode painter not support method "'+t+'"')}}var Bx=function(){function t(t,e,n,i){this.type="svg",this.refreshHover=zx("refreshHover"),this.pathToImage=zx("pathToImage"),this.configLayer=zx("configLayer"),this.root=t,this.storage=e,this._opts=n=B({},n||{});var r=Qw("svg");r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=Qw("g");r.appendChild(o);var a=Qw("g");r.appendChild(a),this._gradientManager=new Cx(i,a),this._patternManager=new Ix(i,a),this._clipPathManager=new Dx(i,a),this._shadowManager=new Ex(i,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=r,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,t.appendChild(s),s.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]}return t.prototype.getType=function(){return"svg"},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.getSvgRoot=function(){return this._svgRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},t.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=Qw("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},t.prototype.createSVGElement=function(t){return Qw(t)},t.prototype.paintOne=function(t){var e=Px(t);return e&&e.brush(t),Vx(t)},t.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,r=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),r.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u=i&&l+1>=r){for(var u=[],c=0;c=i&&h+1>=r)return ex(l.components);s[a]=l}else s[a]=void 0}var p;o++}for(;o<=a;){var d=h();if(d)return d}}(a,l,undefined);for(u=0;u\n\r<"))},t}(),Hx=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return m(e,t),e.prototype.getInitialData=function(t){return pb(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var e=new Qi,n=Vm("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),r="none"===i?"circle":i,o=.8*t.itemHeight,a=Vm(r,(t.itemWidth-o)/2,(t.itemHeight-o)/2,o,o,t.itemStyle.fill,t.symbolKeepAspect);return e.add(a),a.setStyle(t.itemStyle),r.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},e}(Hp);function jx(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=Gf(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a0?n=i[0]:i[1]<0&&(n=i[1]),n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),c="x"===s||"radius"===s?1:0,h=X(t.dimensions,function(t){return e.mapDimension(t)}),d=!1,f=e.getCalculationInfo("stackResultDimension");return db(e,h[0])&&(d=!0,h[0]=f),db(e,h[1])&&(d=!0,h[1]=f),{dataDimsForPoint:h,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!d,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function $x(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var Qx="undefined"!=typeof Float32Array,Jx=Qx?Float32Array:Array;function tk(t){return et(t)?Qx?new Float32Array(t):t:new Jx(t)}var ek=Math.min,nk=Math.max;function ik(t,e){return isNaN(t)||isNaN(e)}function rk(t,e,n,i,r,o,a,s,l){for(var u,c,h,d,f,p,g=n,m=0;m=r||g<0)break;if(ik(v,y)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,y),h=v,d=y;else{var _=v-u,b=y-c;if(_*_+b*b<.5){g+=o;continue}if(a>0){var w=g+o,x=e[2*w],k=e[2*w+1],S=m+1;if(l)for(;ik(x,k)&&S=i||ik(x,k))f=v,p=y;else{A=x-u,M=k-c;var D=v-u,E=x-v,O=y-c,P=k-y,R=void 0,L=void 0;"x"===s?(R=Math.abs(D),L=Math.abs(E),f=v-R*a,p=y,I=v+R*a,T=y):"y"===s?(R=Math.abs(O),L=Math.abs(P),f=v,p=y-R*a,I=v,T=y+R*a):(R=Math.sqrt(D*D+O*O),f=v-A*a*(1-(C=(L=Math.sqrt(E*E+P*P))/(L+R))),p=y-M*a*(1-C),T=y+M*a*C,I=ek(I=v+A*a*C,nk(x,v)),T=ek(T,nk(k,y)),I=nk(I,ek(x,v)),p=y-(M=(T=nk(T,ek(k,y)))-y)*R/L,f=ek(f=v-(A=I-v)*R/L,nk(u,v)),p=ek(p,nk(c,y)),I=v+(A=v-(f=nk(f,ek(u,v))))*L/R,T=y+(M=y-(p=nk(p,ek(c,y))))*L/R)}t.bezierCurveTo(h,d,f,p,v,y),h=I,d=T}else t.lineTo(v,y)}u=v,c=y,g+=o}return m}var ok=function(){this.smooth=0,this.smoothConstraint=!0},ak=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new ok},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&ik(n[2*r-2],n[2*r-1]);r--);for(;i=0){var m=a?(c-i)*g+i:(u-n)*g+n;return a?[t,m]:[m,t]}n=u,i=c;break;case o.C:u=r[l++],c=r[l++],h=r[l++],d=r[l++],f=r[l++],p=r[l++];var v=a?$o(n,u,h,f,t,s):$o(i,c,d,p,t,s);if(v>0)for(var y=0;y=0)return m=a?Zo(i,c,d,p,_):Zo(n,u,h,f,_),a?[t,m]:[m,t]}n=f,i=p}}},e}(ls),sk=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e}(ok),lk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return m(e,t),e.prototype.getDefaultShape=function(){return new sk},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&ik(n[2*o-2],n[2*o-1]);o--);for(;ri)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return q(o.getViewLabels(),function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}(t,a,r),k=this._data;k&&k.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),k.setItemGraphicEl(e,null))}),w||d.remove(),o.add(g);var S,C=!c&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(null!=(S=r.getArea()).width?(S.x-=.1,S.y-=.1,S.width+=.2,S.height+=.2):S.r0&&(S.r0-=.5,S.r+=.5)),this._clipShapeForSymbol=S;var A=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r,o=n.length-1;o>=0;o--){var a=t.getDimensionInfo(t.dimensions[n[o].dimension]);if("x"===(i=a&&a.coordDim)||"y"===i){r=n[o];break}}if(r){var s=e.getAxis(i),l=X(r.stops,function(t){return{offset:0,coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),u=l.length,c=r.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),c.reverse());var h=l[0].coord-10,d=l[u-1].coord+10,f=d-h;if(f<.001)return"transparent";q(l,function(t){t.offset=(t.coord-h)/f}),l.push({offset:u?l[u-1].offset:.5,color:c[1]||"transparent"}),l.unshift({offset:u?l[0].offset:.5,color:c[0]||"transparent"});var p=new Hu(0,0,0,0,l,!0);return p[i]=h,p[i+"2"]=d,p}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")];f&&h.type===r.type&&C===this._step?(v&&!p?p=this._newPolygon(u,b):p&&!v&&(g.remove(p),p=this._polygon=null),c||this._initOrUpdateEndLabel(t,r,$h(A)),g.setClipPath(_k(this,r,!1,t)),w&&d.updateData(a,{isIgnore:x,clipShape:S,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),fk(this._stackedOnPoints,b)&&fk(this._points,u)||(m?this._doUpdateAnimation(a,b,r,n,C,y):(C&&(u=vk(u,r,C),b&&(b=vk(b,r,C))),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:b})))):(w&&d.updateData(a,{isIgnore:x,clipShape:S,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),m&&this._initSymbolLabelAnimation(a,r,S),C&&(u=vk(u,r,C),b&&(b=vk(b,r,C))),f=this._newPolyline(u),v&&(p=this._newPolygon(u,b)),c||this._initOrUpdateEndLabel(t,r,$h(A)),g.setClipPath(_k(this,r,!0,t)));var M=t.get(["emphasis","focus"]),I=t.get(["emphasis","blurScope"]);f.useStyle(H(s.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),Al(f,t,"lineStyle"),f.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1),Ls(f).seriesIndex=t.seriesIndex,xl(f,M,I);var T=mk(t.get("smooth")),D=t.get("smoothMonotone"),E=t.get("connectNulls");if(f.setShape({smooth:T,smoothMonotone:D,connectNulls:E}),p){var O=a.getCalculationInfo("stackedOnSeries"),P=0;p.useStyle(H(l.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),O&&(P=mk(O.get("smooth"))),p.setShape({smooth:T,stackedOnSmooth:P,smoothMonotone:D,connectNulls:E}),Al(p,t,"areaStyle"),Ls(p).seriesIndex=t.seriesIndex,xl(p,M,I)}var R=function(t){i._changePolyState(t)};a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=R)}),this._polyline.onHoverStateChange=R,this._data=a,this._coordSys=r,this._stackedOnPoints=b,this._points=u,this._step=C,this._valueOrigin=y},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Gr(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;(s=new Wx(r,o)).x=l,s.y=u,s.setZ(t.get("zlevel"),t.get("z"));var c=s.getSymbolPath().getTextContent();c&&(c.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Jp.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Gr(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Jp.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;rl(this._polyline,t),e&&rl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new ak({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new lk({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,c="function"==typeof u?u(null):u;t.eachItemGraphicEl(function(t,o){var s=t;if(s){var h=void 0,d=void 0,f=void 0;if(r){var p=n,g=e.pointToCoord([t.x,t.y]);i?(h=p.startAngle,d=p.endAngle,f=-g[1]/180*Math.PI):(h=p.r0,d=p.r,f=g[0])}else i?(h=n.x,d=n.x+n.width,f=t.x):(h=n.y+n.height,d=n.y,f=t.y);var m=d===h?0:(f-h)/(d-h);a&&(m=1-m);var v="function"==typeof u?u(o):l*m+c,y=s.getSymbolPath(),_=y.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:v}),_&&_.animateFrom({style:{opacity:0}},{duration:300,delay:v}),y.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(i.get("show")){var r=t.getData(),o=this._polyline,a=this._endLabel;a||((a=this._endLabel=new Rs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var s=function(t){for(var e,n=t.length/2;n>0&&(e=t[2*n-1],isNaN(t[2*n-2])||isNaN(e));n--);return n-1}(r.getLayout("points"));s>=0&&(Pc(o,Rc(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:s,defaultText:function(t,e,n){return null!=n?Gx(r,n):jx(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),d=o.get("precision"),f=o.get("distance")||0,p=a.getBaseAxis(),g=p.isHorizontal(),m=p.inverse,v=e.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?f:0)*(m?-1:1),b=(g?0:-f)*(m?-1:1),w=g?"x":"y",x=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,y,w),k=x.range,S=k[1]-k[0],C=void 0;if(S>=1){if(S>1&&!h){var A=yk(u,k[0]);s.attr({x:A[0]+_,y:A[1]+b}),r&&(C=c.getRawValue(k[0]))}else{(A=l.getPointOn(y,w))&&s.attr({x:A[0]+_,y:A[1]+b});var M=c.getRawValue(k[0]),I=c.getRawValue(k[1]);r&&(C=Jr(n,d,M,I,x.t))}i.lastFrameIndex=k[0]}else{var T=1===t||i.lastFrameIndex>0?k[0]:0;A=yk(u,T),r&&(C=c.getRawValue(T)),s.attr({x:A[0]+_,y:A[1]+b})}r&&jc(s).setLabelText(C)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add(function(t){n.push({cmd:"+",idx:t})}).update(function(t,e){n.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){n.push({cmd:"-",idx:t})}).execute(),n}(t,e),u=[],c=[],h=[],d=[],f=[],p=[],g=[],m=Kx(r,e,a),v=(Kx(o,t,s),t.getLayout("points")||[]),y=e.getLayout("points")||[],_=0;_3e3||s&&gk(h,f)>3e3)return a.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));a.shape.__points=u.current,a.shape.points=c;var p={shape:{points:d}};u.current!==c&&(p.shape.__points=u.next),a.stopAnimation(),dc(a,p,l),s&&(s.setShape({points:c,stackedOnPoints:h}),s.stopAnimation(),dc(s,{shape:{stackedOnPoints:f}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],m=u.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(c||1),d=Math.round(a/h);if(d>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/d));var f=void 0;"string"==typeof r?f=xk[r]:"function"==typeof r&&(f=r),f&&t.setData(i.downSample(i.mapDimension(l.dim),1/d,f,kk))}}}}}var Ck=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.getInitialData=function(t,e){return pb(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Hp);Hp.registerClass(Ck);var Ak=Ck,Mk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.getInitialData=function(){return pb(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=ah(Ak.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Ak),Ik=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Tk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return m(e,t),e.prototype.getDefaultShape=function(){return new Ik},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(h*r+n,d*r+i),t.arc(h*s+n,d*s+i,a,-Math.PI+l,l,!c)),t.arc(n,i,o,l,u,!c),t.moveTo(f*o+n,p*o+i),t.arc(f*s+n,p*s+i,a,u-2*Math.PI,u-Math.PI,!c),0!==r&&(t.arc(n,i,r,u,l,c),t.moveTo(h*r+n,p*r+i)),t.closePath()},e}(ls),Dk=[0,0],Ek=Math.max,Ok=Math.min,Pk=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return m(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,h=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);h&&this._enableRealtimeSort(h,a,n);var d=t.get("clip",!0)||h,f=function(t,e){var n=t.getArea&&t.getArea();if(dk(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var p=t.get("roundCap",!0),g=t.get("showBackground",!0),m=t.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],_=this._backgroundEls,b=i&&i.isInitSort,w=i&&"changeAxisOrder"===i.type;function x(t){var e=Fk[l.type](a,t),n=function(t,e,n){return new("polar"===t.type?gu:ks)({shape:Gk(e,n,t),silent:!0,z2:0})}(l,r,e);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",v),y[t]=n,n}a.diff(s).add(function(e){var n=a.getItemModel(e),i=Fk[l.type](a,e,n);if(g&&x(e),a.hasValue(e)){var s=!1;d&&(s=Rk[l.type](f,i));var m=Lk[l.type](t,a,e,i,r,c,u.model,!1,p);Vk(m,a,e,n,i,t,r,"polar"===l.type),b?m.attr({shape:i}):h?Nk(h,c,m,i,e,r,!1,!1):fc(m,{shape:i},t,e),a.setItemGraphicEl(e,m),o.add(m),m.ignore=s}}).update(function(e,n){var i=a.getItemModel(e),k=Fk[l.type](a,e,i);if(g){var S=void 0;0===_.length?S=x(n):((S=_[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type&&S.setShape("r",v),y[e]=S);var C=Fk[l.type](a,e);dc(S,{shape:Gk(r,C,l)},c,e)}var A=s.getItemGraphicEl(n);if(!a.hasValue(e))return o.remove(A),void(A=null);var M=!1;d&&(M=Rk[l.type](f,k))&&o.remove(A),A||(A=Lk[l.type](t,a,e,k,r,c,u.model,!!A,p)),w||Vk(A,a,e,i,k,t,r,"polar"===l.type),b?A.attr({shape:k}):h?Nk(h,c,A,k,e,r,!0,w):dc(A,{shape:k},t,e,null),a.setItemGraphicEl(e,A),A.ignore=M,o.add(A)}).remove(function(e){var n=s.getItemGraphicEl(e);n&&mc(n,t,e)}).execute();var k=this._backgroundGroup||(this._backgroundGroup=new Qi);k.removeAll();for(var S=0;So)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r,animation:{duration:0}})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(e){mc(e,t,Ls(e).dataIndex)})):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Jp),Rk={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=Ek(e.x,t.x),s=Ok(e.x+e.width,r),l=Ek(e.y,t.y),u=Ok(e.y+e.height,o),c=sr?s:a,e.y=h&&l>o?u:l,e.width=c?0:s-a,e.height=h?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=Ok(e.r,t.r),o=Ek(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),a}},Lk={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new ks({shape:B({},i),z2:1});return u.__dataIndex=n,u.name="item",o&&(u.shape[r?"height":"width"]=0),u},polar:function(t,e,n,i,r,o,a,s,l){var u=new(!r&&l?Tk:gu)({shape:H({clockwise:i.startAngle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function Vk(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");if(u&&t.attr("cursor",u),!s){var c=a?r.height>0?"bottom":"top":r.width>0?"left":"right",h=Rc(i);Pc(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:jx(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c}),Gc(t.getTextContent(),h,o.getRawValue(n),function(t){return Gx(e,t)})}var d=i.getModel(["emphasis"]);xl(t,d.get("focus"),d.get("blurScope")),Al(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",q(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var zk=function(){},Bk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return m(e,t),e.prototype.getDefaultShape=function(){return new zk},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o=h&&m<=d&&(l<=v?c>=l&&c<=v:c>=v&&c<=l))return a[f]}return-1}(this,t.offsetX,t.offsetY);Ls(this).dataIndex=e>=0?e:null},30,!1);function Gk(t,e,n){if(dk(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:e.r0,r:t?r.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}}var Uk=Pk,Wk=2*Math.PI,Yk=Math.PI/180;function qk(t,e,n){e.eachSeriesByType(t,function(t){var e=t.getData(),i=e.mapDimension("value"),r=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,n),o=t.get("center"),a=t.get("radius");et(a)||(a=[0,a]),et(o)||(o=[o,o]);var s=cr(r.width,n.getWidth()),l=cr(r.height,n.getHeight()),u=Math.min(s,l),c=cr(o[0],s)+r.x,h=cr(o[1],l)+r.y,d=cr(a[0],u/2),f=cr(a[1],u/2),p=-t.get("startAngle")*Yk,g=t.get("minAngle")*Yk,m=0;e.each(i,function(t){!isNaN(t)&&m++});var v=e.getSum(i),y=Math.PI/(v||m)*2,_=t.get("clockwise"),b=t.get("roseType"),w=t.get("stillShowZeroSum"),x=e.getDataExtent(i);x[0]=0;var k=Wk,S=0,C=p,A=_?1:-1;if(e.setLayout({viewRect:r,r:f}),e.each(i,function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:c,cy:h,r0:d,r:b?NaN:f});else{(i="area"!==b?0===v&&w?y:t*y:Wk/m)n?a:o,c=Math.abs(l.label.y-n);if(c>u.maxY){var h=l.label.x-e-l.len2*r,f=i+l.len,p=Math.abs(h)0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u0?"right":"left":D>0?"left":"right"}var z=m.get("rotate");if(O="number"==typeof z?z*(Math.PI/180):z?D<0?-T+Math.PI:-T:0,o=!!O,d.x=C,d.y=A,d.rotation=O,d.setStyle({verticalAlign:"middle"}),P){d.setStyle({align:I});var B=d.states.select;B&&(B.x+=d.x,B.y+=d.y)}else{var H=d.getBoundingRect().clone();H.applyTransform(d.getComputedTransform());var j=(d.style.margin||0)+2.1;H.y-=j/2,H.height+=j,r.push({label:d,labelLine:p,position:v,len:k,len2:S,minTurnAngle:x.get("minTurnAngle"),maxSurfaceAngle:x.get("maxSurfaceAngle"),surfaceNormal:new jn(D,E),linePoints:M,textAlign:I,labelDistance:y,labelAlignTo:_,edgeDistance:b,bleedMargin:w,rect:H})}s.setTextConfig({inside:P})}}),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d=n.r0}},e.type="pie",e}(Jp);function eS(t,e,n){e=et(e)&&{coordDimensions:e}||B({},e);var i=t.getSource(),r=sb(i,e),o=new ob(r,t);return o.initData(i,n),o}var nS=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),iS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.useColorPaletteOnData=!0,e}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new nS(J(this.getData,this),J(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return eS(this,{coordDimensions:["value"],encodeDefaulter:tt(Md,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),function(t){r.push(t)}),i.percent=mr(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){Rr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Hp),rS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){return pb(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},e}(Hp),oS=function(){},aS=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultShape=function(){return new oS},e.prototype.buildPath=function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,o=r.shape,a=t.getContext?t.getContext():t;if(a&&i[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=0;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(t>=u&&e>=c&&t<=u+o&&e<=c+a)return s}return-1},e}(ls),sS=function(){function t(){this.group=new Qi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t,e){this.group.removeAll();var n=new aS({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},t.prototype.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("points");this.group.eachChild(function(t){null!=t.startIndex&&(e=new Float32Array(e.buffer,4*t.startIndex*2,2*(t.endIndex-t.startIndex))),t.setShape("points",e)})}},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Zu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new aS,this._incremental.addDisplayable(i,!0)):((i=new aS({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},t.prototype._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=Vm(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;if(l&&t.setColor(l),!n){var u=Ls(t);u.seriesIndex=r.seriesIndex,t.on("mousemove",function(e){u.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(u.dataIndex=n+(t.startIndex||0))})}},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),lS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=wk("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new sS:new Zx,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Jp),uS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(dd),cS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Xr).models[0]},e.type="cartesian2dAxis",e}(dd);W(cS,kw);var hS={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},dS=V({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},hS),fS=V({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},hS),pS={category:dS,value:fS,time:V({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},fS),log:H({scale:!0,logBase:10},fS)},gS={value:1,category:1,time:1,log:1};function mS(t,e,n,i){q(gS,function(r,o){var a=V(V({},pS[o],!0),i,!0),s=function(t){function n(){for(var n=[],i=0;ie[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(zw);function kS(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[d[l]]:h[0],"x"===u?p[d[l]]:h[3]],o.rotation=Math.PI/2*("x"===u?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?p[d[s]]-p[d.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),pt(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function SS(t){return"cartesian2d"===t.get("coordinateSystem")}function CS(t){var e={xAxisModel:null,yAxisModel:null};return q(e,function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Xr).models[0];e[i]=o}),e}function AS(t,e){return t.getCoordSysModel()===e}function MS(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)IS(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&IS(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(t){return t.dim+"_"+t.index}}function IS(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}(t)}var TS=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_S,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),q(n.x,function(t){mw(t.scale,t.model)}),q(n.y,function(t){mw(t.scale,t.model)});var i={};q(n.x,function(t){MS(n,"y",t,i)}),q(n.y,function(t){MS(n,"x",t,i)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=rd(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){q(a,function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)})}s(),r&&(q(a,function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.scale;if(t.model.get(["axisLabel","show"])&&!e.isBlank()){var n,i,r=e.getExtent();i=e instanceof Ab?e.count():(n=e.getTicks()).length;var o,a,s,l,u,c,h,d=t.getLabelModel(),f=yw(t),p=1;i>40&&(p=Math.ceil(i/40));for(var g=0;g0?"top":"bottom",i="center"):_r(o-DS)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),OS={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(Qt(s,s,a),Qt(l,l,a));var u=B({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Du({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});c.anid="line",n.add(c);var h=e.get(["axisLine","symbol"]),d=e.get(["axisLine","symbolSize"]),f=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof f&&(f=[f,f]),null!=h){"string"==typeof h&&(h=[h,h]),"string"!=typeof d&&"number"!=typeof d||(d=[d,d]);var p=d[0],g=d[1];q([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(e,i){if("none"!==h[i]&&null!=h[i]){var r=Vm(h[i],-p/2,-g/2,p,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}})}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");if("auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick")),a&&!r.scale.isBlank()){for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=NS(r.getTicksCoords(),e.transform,l,H(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;ch[1]?-1:1,f=["start"===s?h[0]-d*c:"end"===s?h[1]+d*c:(h[0]+h[1])/2,LS(s)?t.labelOffset+l*c:0],p=e.get("nameRotate");null!=p&&(p=p*DS/180),LS(s)?o=ES.innerTextLayout(t.rotation,null!=p?p:t.rotation,l):(o=function(t,e,n,i){var r,o,a=yr(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;return _r(a-DS/2)?(o=l?"bottom":"top",r="center"):_r(a-1.5*DS)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*DS&&a>DS/2?l?"left":"right":l?"right":"left"),{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,p||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=e.get("nameTruncate",!0)||{},v=m.ellipsis,y=pt(t.nameTruncateMaxWidth,m.maxWidth,a),_=new Rs({x:f[0],y:f[1],rotation:o.rotation,silent:ES.isLabelSilent(e),style:Lc(u,{text:r,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Tc({el:_,componentModel:e,itemName:r}),_.__fullText=r,_.anid="name",e.get("triggerEvent")){var b=ES.makeAxisEventDataBase(e);b.targetType="axisName",b.name=r,Ls(_).eventData=b}i.add(_),_.updateTransform(),n.add(_),_.decomposeTransform()}}};function PS(t){t&&(t.ignore=!0)}function RS(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Pe([]);return Fe(r,r,-t.rotation),n.applyTransform(Le([],r,t.getLocalTransform())),i.applyTransform(Le([],r,e.getLocalTransform())),n.intersect(i)}}function LS(t){return"middle"===t||"center"===t}function NS(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function zS(t){var e=BS(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=HS(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!h.min?h.min=0:null!=h.min&&h.min<0&&!h.max&&(h.max=0);var d=a;null!=h.color&&(d=H({color:h.color},a));var f=V(F(h),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:h.text,nameLocation:"end",nameGap:u,nameTextStyle:d,triggerEvent:c},!1);if(s||(f.name=""),"string"==typeof l){var p=f.name;f.name=l.replace("{value}",null!=p?p:"")}else"function"==typeof l&&(f.name=l(f.name,f));var g=new ih(f,null,this.ecModel);return W(g,kw.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:V({lineStyle:{color:"#bbb"}},uC.axisLine),axisLabel:cC(uC.axisLabel,!1),axisTick:cC(uC.axisTick,!1),splitLine:cC(uC.splitLine,!0),splitArea:cC(uC.splitArea,!0),indicator:[]},e}(dd),dC=["axisLine","axisTickLabel","axisName"],fC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;q(X(e.getIndicatorAxes(),function(t){return new FS(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){q(dC,t.add,t),this.group.add(t.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),c=a.get("color"),h=s.get("color"),d=et(c)?c:[c],f=et(h)?h:[h],p=[],g=[];if("circle"===i)for(var m=n[0].getTicksCoords(),v=e.cx,y=e.cy,_=0;_n[0]&&isFinite(h)&&isFinite(n[0]))}else a.getTicks().length-1>r&&(u=o(u)),h=hr((c=Math.ceil(n[1]/u)*u)-u*r),a.setExtent(h,c),a.setInterval(u)})},t.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,n){var i=[];return e.eachComponent("radar",function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o}),e.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},t.dimensions=[],t}();function mC(t){t.registerCoordinateSystem("radar",gC),t.registerComponentModel(hC),t.registerComponentView(fC),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(t){e.setItemVisual(t,"legendSymbol","roundRect")}),e.setVisual("legendSymbol","roundRect")}})}var vC="\0_ec_interaction_mutex";function yC(t,e){return!!_C(t)[e]}function _C(t){return t[vC]||(t[vC]={})}function bC(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(ye(i.event),wC(t,e,n,i,r))}function wC(t,e,n,i,r){r.isAvailableBehavior=J(xC,null,n,i),t.trigger(e,r)}function xC(t,e,n){var i=n[t];return!t||i&&(!it(i)||e.event[i+"Key"])}f_({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});var kC=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=J(n._mousedownHandler,n),r=J(n._mousemoveHandler,n),o=J(n._mouseupHandler,n),a=J(n._mousewheelHandler,n),s=J(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=H(F(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return m(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(_e(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&xC("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!yC(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ye(t.event),wC(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){_e(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=xC("zoomOnMouseWheel",t,this._opt),n=xC("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;bC(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);bC(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){yC(this._zr,"globalPan")||bC(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(ie);function SC(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function CC(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0;a=Math.max(Math.min(o.max||1/0,a),s)}var l=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(l-1),r.y-=(i-r.y)*(l-1),r.scaleX*=l,r.scaleY*=l,r.dirty()}var AC={axisPointer:1,tooltip:1,brush:1};function MC(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!AC.hasOwnProperty(i.mainType)&&r&&r.model!==n}var IC=["rect","circle","line","ellipse","polygon","polyline","path"],TC=Ct(IC),DC=Ct(IC.concat(["g"])),EC=Ct(IC.concat(["g"])),OC=Ur();function PC(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}function RC(t,e,n,i){var r=i.getModel("itemStyle"),o=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=PC(r),u=PC(o),c=PC(s),h=PC(a),d=t.data;if(d){var f=d.getItemVisual(n,"style"),p=d.getItemVisual(n,"decal");t.isVisualEncodedByVisualMap&&f.fill&&(l.fill=f.fill),p&&(l.decal=sv(p,t.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=h,al(e)}function LC(t,e,n,i,r,o,a){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),o)),c=s&&s.getItemLayout(o);if(l||u||c&&c.showLabel){var h=l?n:o,d=void 0;(!s||o>=0)&&(d=r);var f=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Pc(e,Rc(i),{labelFetcher:d,labelDataIndex:h,defaultText:n},f);var p=e.getTextContent();if(p&&(OC(p).ignore=p.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}!function(t,e,n){Ls(t).dataIndex=e,Ls(t).dataType=null}(e,o),e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function NC(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):Ls(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function FC(t,e,n,i,r){t.data||Tc({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function VC(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return xl(e,a,o.get("blurScope")),t.isGeo&&function(t,e,n){var i=Ls(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}var zC=function(){function t(t){var e=new Qi;this.uid=oh("ec_map_draw"),this._controller=new kC(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new Qi),e.add(this._svgGroup=new Qi)}return t.prototype.draw=function(t,e,n,i,r){var o="geo"===t.mainType,a=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(e){a||e.getHostGeoModel()!==t||(a=e.getData())});var s=t.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),h=c.raw,d=c.roam;!l.childAt(0)||r?(u.x=d.x,u.y=d.y,u.scaleX=d.scaleX,u.scaleY=d.scaleY,u.dirty()):dc(u,d,t);var f=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,p={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:f,isGeo:o,transformInfoRaw:h};"geoJSON"===s.resourceType?this._buildGeoJSON(p):"geoSVG"===s.resourceType&&this._buildSVG(p),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=Ct(),n=this._regionsGroup,i=t.transformInfoRaw,r=t.mapOrGeoModel,o=t.data,a=function(t){return[t[0]*i.scaleX+i.x,t[1]*i.scaleY+i.y]};n.removeAll(),q(t.geo.regions,function(i){var s=i.name,l=r.getRegionModel(s),u=o?o.indexOfName(s):null,c=e.get(s),h=!!c;h||(c=e.set(s,new Qi),n.add(c));var d=new zu({segmentIgnoreThreshold:1,shape:{paths:[]}});c.add(d),h||(NC(t,c,s,l,r,u),FC(t,c,s,l,r),VC(t,c,s,l,r)),q(i.geometries,function(t){if("polygon"===t.type){for(var e=[],n=0;n-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Hp);function jC(t){var e={};t.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),q(e,function(t,e){for(var n,i,r,o=(n=X(t,function(t){return t.getData()}),i=t[0].get("mapValueCalculation"),r={},q(n,function(t){t.each(t.mapDimension("value"),function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)})}),n[0].map(n[0].mapDimension("value"),function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,c=0;c1?(s.width=a,s.height=a/f):(s.height=a,s.width=a*f),s.y=o[1]-s.height/2,s.x=o[0]-s.width/2;else{var g=t.getBoxLayoutParams();g.aspect=f,s=rd(g,{width:h,height:d})}this.setViewRect(s.x,s.y,s.width,s.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}var QC=new(function(){function t(){this.dimensions=KC.prototype.dimensions}return t.prototype.create=function(t,e){var n=[];t.eachComponent("geo",function(t,i){var r=t.get("map"),o=new KC(r+i,r,{nameMap:t.get("nameMap"),nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale")});o.zoomLimit=t.get("scaleLimit"),n.push(o),t.coordinateSystem=o,o.model=t,o.resize=$C,o.resize(t,e)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}});var i={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}}),q(i,function(t,i){var r=X(t,function(t){return t.get("nameMap")}),o=new KC(i,i,{nameMap:z(r),nameProperty:t[0].get("nameProperty"),aspectScale:t[0].get("aspectScale")});o.zoomLimit=pt.apply(null,X(t,function(t){return t.get("scaleLimit")})),n.push(o),o.resize=$C,o.resize(t[0],e),q(t,function(t){t.coordinateSystem=o,function(t,e){q(e.get("geoCoord"),function(e,n){t.addGeoCoord(n,e)})}(o,t)})}),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=Ct(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,i+=o.hierNode.shift+(r+=o.hierNode.change)}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,h=s.hierNode.modifier;s=sA(s),o=lA(o),s&&o;){r=sA(r),a=lA(a),r.hierNode.ancestor=t;var d=s.hierNode.prelim+h-o.hierNode.prelim-u+i(s,o);d>0&&(cA(uA(s,t,n),t,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,c+=a.hierNode.modifier}s&&!sA(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=h-l),o&&!lA(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function rA(t){t.setLayout({x:t.hierNode.prelim+t.parentNode.hierNode.modifier},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function oA(t){return arguments.length?t:hA}function aA(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function sA(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function lA(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function uA(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function cA(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function hA(t,e){return t.parentNode===e.parentNode?1:2}var dA=function(){this.parentPoint=[],this.childPoints=[]},fA=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new dA},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=cr(e.forkPosition,1),h=[];h[l]=r[l],h[u]=r[u]+(a[u]-r[u])*c,t.moveTo(r[0],r[1]),t.lineTo(h[0],h[1]),t.moveTo(o[0],o[1]),h[l]=o[l],t.lineTo(h[0],h[1]),h[l]=a[l],t.lineTo(h[0],h[1]),t.lineTo(a[0],a[1]);for(var d=1;dy.x)||(b-=Math.PI);var k=w?"left":"right",S=s.getModel("label"),C=S.get("rotate"),A=C*(Math.PI/180),M=m.getTextContent();M&&(m.setTextConfig({position:S.get("position")||k,rotation:null==C?-b:A,origin:"center"}),M.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),T="ancestor"===I?a.getAncestorsIndices():"descendant"===I?a.getDescendantIndices():null;T&&(Ls(n).focus=T),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),c=t.get("layout"),h=t.getOrient(),d=t.get(["lineStyle","curveness"]),f=t.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new Lu({shape:vA(c,h,d,r,r)})),dc(g,{shape:vA(c,h,d,o,a)},t));else if("polyline"===u&&"orthogonal"===c&&e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var m=e.children,v=[],y=0;ye&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),TA=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;nr&&(r=t.depth)});var o=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return i.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=o}),i.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return bp("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.type="series.tree",e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Hp);function EA(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function OA(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=oA(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(r=n.width,o=n.height,a=oA());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sc.getLayout().x&&(c=t),t.depth>h.depth&&(h=t)});var d=u===c?1:a(u,c)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===i)p=r/(c.getLayout().x+d+f),g=o/(h.depth-1||1),EA(l,function(t){var e=aA(m=(t.getLayout().x+f)*p,v=(t.depth-1)*g);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(c.getLayout().x+d+f),p=r/(h.depth-1||1),EA(l,function(t){v=(t.getLayout().x+f)*g,t.setLayout({x:m="LR"===y?(t.depth-1)*p:r-(t.depth-1)*p,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=r/(c.getLayout().x+d+f),g=o/(h.depth-1||1),EA(l,function(t){m=(t.getLayout().x+f)*p,t.setLayout({x:m,y:v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g},!0)}))}}}(t,e)})}function PA(t){t.eachSeriesByType("tree",function(t){var e=t.getData();e.tree.eachNode(function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();B(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)})})}function RA(t,e,n){if(t&&G(e,t.type)>=0){var i=n.getData().tree.root,r=t.targetNode;if("string"==typeof r&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function LA(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function NA(t,e){return G(LA(t),e)>=0}function FA(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var VA=function(){},zA=["treemapZoomToNode","treemapRender","treemapMove"];function BA(t){var e=t.getData(),n={};e.tree.eachNode(function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=Vd(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)})}function HA(t){var e=0;q(t.children,function(t){HA(t);var n=t.value;et(n)&&(n=n[0]),e+=n});var n=t.value;et(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),et(t.value)?t.value[0]=n:t.value=n}var jA=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};HA(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new ih({itemStyle:r},this,e),a=X((i=t.levels=function(t,e){var n,i,r=Pr(e.get("color")),o=Pr(e.get(["aria","decal","decals"]));if(r){q(t=t||[],function(t){var e=new ih(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)});var a=t[0]||(t[0]={});return n||(a.color=r.slice()),!i&&o&&(a.decal=o.slice()),t}}(i,e))||[],function(t){return new ih(t,o,e)},this),s=TA.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=s.getNodeByDataIndex(e);return t.parentModel=a[n.depth]||o,t})});return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return bp("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=FA(i,this),n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Ct(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){BA(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Hp);function GA(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function UA(t,e,n){Ls(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&FA(n,e)}}var WA=function(){function t(t){this.group=new Qi,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),od(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Br(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o,a,s,l,u,c,h,d,f,p=0,g=e.emptyItemWidth,m=t.get(["breadcrumb","height"]),v=(u=(a=e.box).height,c=cr((o=e.pos).left,l=a.width),h=cr(o.top,u),d=cr(o.right,l),f=cr(o.bottom,u),(isNaN(c)||isNaN(parseFloat(o.left)))&&(c=0),(isNaN(d)||isNaN(parseFloat(o.right)))&&(d=l),(isNaN(h)||isNaN(parseFloat(o.top)))&&(h=0),(isNaN(f)||isNaN(parseFloat(o.bottom)))&&(f=u),s=Bh(s||0),{width:Math.max(d-c-s[1]-s[3],0),height:Math.max(f-h-s[0]-s[2],0)}),y=e.totalWidth,_=e.renderList,b=_.length-1;b>=0;b--){var w=_[b],x=w.node,k=w.width,S=w.text;y>v.width&&(y-=k-g,k=g,S=null);var C=new ku({shape:{points:GA(p,0,k,m,b===_.length-1,0===b)},style:H(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Rs({style:{text:S,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e5,onclick:tt(r,x)});C.disableLabelAnimation=!0,this.group.add(C),UA(C,t,x),p+=k+8}},t.prototype.remove=function(){this.group.removeAll()},t}(),YA=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new $n(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];Ne(s,s,[-(e-=a.x),-(n-=a.y)]),Ve(s,s,[t.scale,t.scale]),Ne(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Qh(a,s)}}}}},this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new WA(this.group))).render(t,e,n.node,function(e){"animating"!==i._state&&(NA(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}},this),n},e.type="treemap",e}(Jp),eM=q,nM=at,iM=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=F(e);this.type=i,this.mappingMethod=n,this._normalizeData=fM[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(rM(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,q(e,function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)})}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(eM(e,function(t,e){n[t]=e}),!et(i)){var r=[];at(i)?eM(i,function(t,e){var i=n[e];r[null!=i?i:-1]=t}):r[-1]=i,i=dM(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):rM(r,!0):(_t("linear"!==n||r.dataExtent),rM(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return J(this._normalizeData,this)},t.listVisualTypes=function(){return Q(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){at(t)?q(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=et(e)?[]:at(e)?{}:(r=!0,null);return t.eachVisual(e,function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a}),o},t.retrieveVisuals=function(e){var n,i={};return e&&eM(t.visualHandlers,function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)}),n?i:null},t.prepareVisualTypes=function(t){if(et(t))t=t.slice();else{if(!nM(t))return[];var e=[];eM(t,function(t,n){e.push(n)}),t=e}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:a.name,dataExtent:u,visual:a.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new gM(h);return mM(d).drColorMappingBy=c,d}}}(0,r,o,0,u,f);q(f,function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=B({},e);if(r){var s=r.type,l="color"===s&&mM(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,p,i);yM(t,o,n,i)}})}else s=_M(u),c.fill=s}}function _M(t){var e=bM(t,"color");if(e){var n=bM(t,"colorAlpha"),i=bM(t,"colorSaturation");return i&&(e=wn(e,null,null,i)),n&&(e=xn(e,n)),e}}function bM(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function wM(t,e){var n=t.get(e);return et(n)&&n.length?{name:e,range:n}:null}var xM=Math.max,kM=Math.min,SM=pt,CM=q,AM=["itemStyle","borderWidth"],MM=["itemStyle","gapWidth"],IM=["upperLabel","show"],TM=["upperLabel","height"],DM={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=rd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=cr(SM(s.width,l[0]),r),c=cr(SM(s.height,l[1]),o),h=i&&i.type,d=RA(i,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===h||"treemapMove"===h?i.rootRect:null,p=t.getViewRoot(),g=LA(p);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;for(var l=i*r,u=l*t.option.zoomToNodeRatio;o=a.parentNode;){for(var c=0,h=o.children,d=0,f=h.length;dvr&&(u=vr),a=o}ua[1]&&(a[1]=e)})):a=[NaN,NaN],{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?xM(u*i/l,l/(u*r)):1/0}function PM(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=e?t.area/e:0;(r||c>n[l[a]])&&(c=n[l[a]]);for(var h=0,d=t.length;hi&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var b=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var w=-Math.atan2(v[1],v[0]);u[0].8?"left":c[0]<-.8?"right":"center",d=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*p+l[0],i.y=-c[1]*g+l[1],h=c[0]>.8?"right":c[0]<-.8?"left":"center",d=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=p*b+l[0],i.y=l[1]+x,h=v[0]<0?"right":"left",i.originX=-p*b,i.originY=-x;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+x,h="center",i.originY=-x;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-p*b+u[0],i.y=u[1]+x,h=v[0]>=0?"right":"left",i.originX=p*b,i.originY=-x}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||h})}}}function k(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(Qi);function vI(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["emphasis","lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),labelStatesModels:Rc(e)}}function yI(t){return isNaN(t[0])||isNaN(t[1])}function _I(t){return!yI(t[0])&&!yI(t[1])}var bI=function(){function t(t){this.group=new Qi,this._LineCtor=t||mI}return t.prototype.isPersistent=function(){return!0},t.prototype.updateData=function(t){var e=this,n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=vI(t);t.diff(r).add(function(n){e._doAdd(t,n,o)}).update(function(n,i){e._doUpdate(r,t,i,n,o)}).remove(function(t){i.remove(r.getItemGraphicEl(t))}).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,n){e.updateLayout(t,n)},this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=vI(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i=0?i+=u:i-=u:p>=0?i-=u:i+=u}return i}function II(t,e){var n=[],i=oa,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge(function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");l.__original||(l.__original=[Ot(l[0]),Ot(l[1])],l[2]&&l.__original.push(Ot(l[2])));var h=l.__original;if(null!=l[2]){if(Et(r[0],h[0]),Et(r[1],h[2]),Et(r[2],h[1]),u&&"none"!==u){var d=$M(t.node1),f=MI(r,h[0],d*e);i(r[0][0],r[1][0],r[2][0],f,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],f,n),r[0][1]=n[3],r[1][1]=n[4]}c&&"none"!==c&&(d=$M(t.node2),f=MI(r,h[1],d*e),i(r[0][0],r[1][0],r[2][0],f,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],f,n),r[1][1]=n[1],r[2][1]=n[2]),Et(l[0],r[0]),Et(l[1],r[2]),Et(l[2],r[1])}else Et(o[0],h[0]),Et(o[1],h[1]),Nt(a,o[1],o[0]),Wt(a,a),u&&"none"!==u&&(d=$M(t.node1),Lt(o[0],o[0],a,d*e)),c&&"none"!==c&&(d=$M(t.node2),Lt(o[1],o[1],a,-d*e)),Et(l[0],o[0]),Et(l[1],o[1])})}function TI(t){return"view"===t.type}var DI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){var n=new Zx,i=new bI,r=this.group;this._controller=new kC(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(TI(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):dc(s,l,t)}II(t.getGraph(),KM(t));var u=t.getData();o.updateData(u);var c=t.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var h=t.forceLayout,d=t.get(["force","layoutAnimation"]);h&&this._startForceLayoutIteration(h,d),u.graph.eachNode(function(t){var e=t.dataIndex,n=t.getGraphicEl(),r=t.getModel();n.off("drag").off("dragend");var o=r.get("draggable");o&&n.on("drag",function(){h&&(h.warmUp(),!i._layouting&&i._startForceLayoutIteration(h,d),h.setFixed(e),u.setItemLayout(e,[n.x,n.y]))}).on("dragend",function(){h&&h.setUnfixed(e)}),n.setDraggable(o&&!!h),"adjacency"===r.get(["emphasis","focus"])&&(Ls(n).focus=t.getAdjacentDataIndices())}),u.graph.eachEdge(function(t){var e=t.getGraphicEl();"adjacency"===t.getModel().get(["emphasis","focus"])&&(Ls(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})});var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var n=u.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();if(f){var r=u.getItemLayout(e),o=Math.atan2(r[1]-g,r[0]-p);o<0&&(o=2*Math.PI+o);var a=r[0]=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof PI||(e=this._nodesMap[EI(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}),r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}W(PI,LI("hostGraph","data")),W(RI,LI("hostGraph","edgeData"));var NI=OI;function FI(t,e,n,i,r){for(var o=new NI(i),a=0;a "+d)),u++)}var f,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=pb(t,n);else{var g=Xd.get(p),m=g&&g.dimensions||[];G(m,"value")<0&&m.concat(["value"]);var v=sb(t,{coordDimensions:m});(f=new ob(v,n)).initData(t)}var y=new ob(["value"],n);return y.initData(l,s),r&&r(f,y),MA({mainData:f,struct:o,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var VI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new nS(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Rr(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){HM(n=this)&&(n.__curvenessList=[],n.__edgeMap={},jM(n));var a=FI(r,i,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=ih.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=r,t.getModel=i,t})});return q(a.edges,function(t){!function(t,e,n,i){if(HM(n)){var r=GM(t,e,n),o=n.__edgeMap,a=o[UM(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)},this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),bp("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return Dp({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=X(this.option.categories||[],function(t){return null!=t.value?t:B({value:0},t)}),e=new ob(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Hp),zI={type:"graphRoam",event:"graphRoam",update:"none"},BI=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},HI=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return m(e,t),e.prototype.getDefaultShape=function(){return new BI},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(ls);function jI(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var GI=2*Math.PI,UI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:cr(n[0],e.getWidth()),cy:cr(n[1],e.getHeight()),r:cr(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){for(var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),c=u.get("roundCap")?Tk:gu,h=u.get("show"),d=u.getModel("lineStyle"),f=d.get("width"),p=(l-s)%GI||l===s?(l-s)%GI:GI,g=s,m=0;h&&m=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(y.get("show")&&D!==b){O=(O=y.get("distance"))?O+l:l;for(var L=0;L<=w;L++){u=Math.cos(S),c=Math.sin(S);var N=new Du({shape:{x1:u*(p-O)+d,y1:c*(p-O)+f,x2:u*(p-k-O)+d,y2:c*(p-k-O)+f},silent:!0,style:I});"auto"===I.stroke&&N.setStyle({stroke:i((D+L/w)/b)}),h.add(N),S+=A}S-=A}else S+=C}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,c=this._data,h=this._progressEls,d=[],f=t.get(["pointer","show"]),p=t.getModel("progress"),g=p.get("show"),m=t.getData(),v=m.mapDimension("value"),y=+t.get("min"),_=+t.get("max"),b=[y,_],w=[o,a];function x(e,n){var i,o=m.getItemModel(e).getModel("pointer"),a=cr(o.get("width"),r.r),s=cr(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),c=cr(u[0],r.r),h=cr(u[1],r.r),d=o.get("keepAspect");return(i=l?Vm(l,c-a/2,h-s,a,s,null,d):new HI({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:h}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function k(t,e){var n=p.get("roundCap")?Tk:gu,i=p.get("overlap"),a=i?p.get("width"):l/m.count(),u=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:i?r.r-a:r.r-(t+1)*a,r:i?r.r:r.r-t*a}});return i&&(u.z2=_-m.get(v,t)%_),u}(g||f)&&(m.diff(c).add(function(e){if(f){var n=x(e,o);fc(n,{rotation:-(ur(m.get(v,e),b,w,!0)+Math.PI/2)},t),u.add(n),m.setItemGraphicEl(e,n)}if(g){var i=k(e,o),r=p.get("clip");fc(i,{shape:{endAngle:ur(m.get(v,e),b,w,r)}},t),u.add(i),d[e]=i}}).update(function(e,n){if(f){var i=c.getItemGraphicEl(n),r=i?i.rotation:o,a=x(e,r);a.rotation=r,dc(a,{rotation:-(ur(m.get(v,e),b,w,!0)+Math.PI/2)},t),u.add(a),m.setItemGraphicEl(e,a)}if(g){var s=h[n],l=k(e,s?s.shape.endAngle:o),y=p.get("clip");dc(l,{shape:{endAngle:ur(m.get(v,e),b,w,y)}},t),u.add(l),d[e]=l}}).execute(),m.each(function(t){var e=m.getItemModel(t),n=e.getModel("emphasis");if(f){var r=m.getItemGraphicEl(t),o=m.getItemVisual(t,"style"),a=o.fill;if(r instanceof gs){var s=r.style;r.useStyle(B({image:s.image,x:s.x,y:s.y,width:s.width,height:s.height},o))}else r.useStyle(o),"pointer"!==r.type&&r.setColor(a);r.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===r.style.fill&&r.setStyle("fill",i(ur(m.get(v,t),b,[0,1],!0))),r.z2EmphasisLift=0,Al(r,e),xl(r,n.get("focus"),n.get("blurScope"))}if(g){var l=d[t];l.useStyle(m.getItemVisual(t,"style")),l.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),l.z2EmphasisLift=0,Al(l,e),xl(l,n.get("focus"),n.get("blurScope"))}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=Vm(r,e.cx-i/2+cr(o[0],e.r),e.cy-i/2+cr(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),c=new Qi,h=[],d=[],f=t.isAnimationEnabled();a.diff(this._data).add(function(t){h[t]=new Rs({silent:!0}),d[t]=new Rs({silent:!0})}).update(function(t,e){h[t]=o._titleEls[e],d[t]=o._detailEls[e]}).execute(),a.each(function(e){var n=a.getItemModel(e),o=a.get(s,e),p=new Qi,g=i(ur(o,[l,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var v=m.get("offsetCenter"),y=r.cx+cr(v[0],r.r),_=r.cy+cr(v[1],r.r);(M=h[e]).attr({style:Lc(m,{x:y,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:g})}),p.add(M)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),x=r.cx+cr(w[0],r.r),k=r.cy+cr(w[1],r.r),S=cr(b.get("width"),r.r),C=cr(b.get("height"),r.r),A=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:g,M=d[e],I=b.get("formatter");M.attr({style:Lc(b,{x:x,y:k,text:jI(o,I),width:isNaN(S)?null:S,height:isNaN(C)?null:C,align:"center",verticalAlign:"middle"},{inheritColor:A})}),Gc(M,{normal:b},o,function(t){return jI(t,I)}),f&&Uc(M,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return jI(a?a.interpolatedValue:o,I)}}),p.add(M)}c.add(p)}),this.group.add(c),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(Jp),WI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n.useColorPaletteOnData=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){return eS(this,["value"])},e.type="series.gauge",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Hp),YI=["itemStyle","opacity"],qI=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new Au,a=new Rs;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return m(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(YI);l=null==l?1:l,i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,fc(i,{style:{opacity:l}},r,e)):dc(i,{style:{opacity:l},shape:{points:a.points}},r,e),Al(i,o),this._updateLabel(t,e),xl(this,s.get("focus"),s.get("blurScope"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;Pc(r,Rc(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new jn(c[0][0],c[0][1]):null},dc(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),dm(n,fm(a),{stroke:u})},e}(ku),XI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add(function(t){var e=new qI(i,t);i.setItemGraphicEl(t,e),o.add(e)}).update(function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)}).remove(function(e){mc(r.getItemGraphicEl(e),t,e)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Jp),ZI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.useColorPaletteOnData=!0,n}return m(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new nS(J(this.getData,this),J(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return eS(this,{coordDimensions:["value"],encodeDefaulter:tt(Md,this)})},e.prototype._defaultLabelLine=function(t){Rr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Hp);function KI(t,e){t.eachSeriesByType("funnel",function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&uT(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function uT(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var cT=sT,hT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){t&&V(this.option,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){q(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];q(K(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(dd),dT=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return m(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(zw);function fT(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=gT(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=gT(s,[0,a]),r=o=gT(s,[r,o]),i=0}e[0]=gT(e[0],n),e[1]=gT(e[1],n);var l=pT(e,i);e[i]+=t;var u,c=r||0,h=n.slice();return l.sign<0?h[0]+=c:h[1]-=c,e[i]=gT(e[i],h),u=pT(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function pT(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function gT(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var mT=q,vT=Math.min,yT=Math.max,_T=Math.floor,bT=Math.ceil,wT=hr,xT=Math.PI;function kT(t,e){return vT(yT(t,e[0]),e[1])}function ST(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function CT(t,e){var n,i,r=e.axisExpandWidth,o=e.axisCollapseWidth,a=e.winInnerIndices,s=o,l=!1;return t=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(n){if(t.contains(n,e)){var i=n.getData();mT(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),mw(e.scale,e.model)},this)}},this)},t.prototype.resize=function(t,e){this._rect=rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,c=kT(e.get("axisExpandWidth"),l),h=kT(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,f=e.get("axisExpandWindow");f?(t=kT(f[1]-f[0],l),f[1]=f[0]+t):(t=kT(c*(h-1),l),(f=[c*(e.get("axisExpandCenter")||_T(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-h);p<3&&(p=0);var g=[_T(wT(f[0]/c,1))+1,bT(wT(f[1]/c,1))-1];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:p/c*f[0]}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each(function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),mT(n,function(e,n){var o=(i.axisExpandable?CT:ST)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s=[a[r].x+t.x,a[r].y+t.y],l={horizontal:xT/2,vertical:0}[r],u=[1,0,0,1,0,0];Fe(u,u,l),Ne(u,u,s),this._axesLayout[e]={position:s,rotation:l,transform:u,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];q(o,function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)});for(var l=this.hasAxisBrushed(),u=n;ur*(1-c[0])?(l="jump",a=s-r*(1-c[2])):(a=s-r*c[1])>=0&&(a=s-r*(1-c[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?fT(a,i,o,"all"):l="none";else{var d=i[1]-i[0];(i=[yT(0,o[1]*s/d-d/2)])[1]=vT(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:l}},t}(),MT={create:function(t,e){var n=[];return t.eachComponent("parallel",function(i,r){var o=new AT(i,t,e);o.name="parallel_"+r,o.resize(i,e),i.coordinateSystem=o,o.model=i,n.push(o)}),t.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",Xr).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},IT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.activeIntervals=[],n}return m(e,t),e.prototype.getAreaSelectStyle=function(){return co([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=F(t);if(e)for(var n=e.length-1;n>=0;n--)dr(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&qT(t);var l=F(s);l.brushType=cD(l.brushType,a),l.panelId=a===DT?null:a.panelId,o=t._creatingCover=zT(t,l),t._covers.push(o)}if(o){var u=fD[cD(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(aD(t,o,t._track)),i&&(BT(t,o),u.updateCommon(t,o)),HT(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&WT(t,e,n)&&qT(t)&&(r={isEnd:i,removeOnClick:!0});return r}function cD(t,e){return"auto"===t?e.defaultBrushType:t}var hD={mousedown:function(t){if(this._dragging)dD(this,t);else if(!t.target||!t.target.draggable){sD(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=WT(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=WT(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new ih(r[a],this,e));if(i&&n)return FI(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=n.levelModels[i.depth];r&&(t.parentModel=r)}return t}),e.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=n.levelModels[i.depth];r&&(t.parentModel=r)}return t})}).data},e.prototype.setNodePosition=function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return bp("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return bp("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Hp);function TD(t,e){t.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){q(t,function(t){var e=zD(t.outEdges,VD),n=zD(t.inEdges,VD),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)})}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],c=[],h=0,d=0;d=0;v&&m.depth>f&&(f=m.depth),g.setLayout({depth:v?m.depth:h},!0),g.setLayout("vertical"===o?{dy:n}:{dx:n},!0);for(var y=0;yh-1?f:h-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)OD(s,l*=.99,a),ED(s,r,n,i,a),BD(s,l,a),ED(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";q(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]})}),q(t,function(t){var e=0,n=0;q(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),q(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(t,s)}(l,u,n,i,o,a,0!==K(l,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))})}function DD(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function ED(t,e,n,i,r){var o="vertical"===r?"x":"y";q(t,function(t){var a,s,l;t.sort(function(t,e){return t.getLayout()[o]-e.getLayout()[o]});for(var u=0,c=t.length,h="vertical"===r?"dx":"dy",d=0;d0&&(a=s.getLayout()[o]+l,s.setLayout("vertical"===r?{x:a}:{y:a},!0)),u=s.getLayout()[o]+s.getLayout()[h]+e;if((l=u-e-("vertical"===r?i:n))>0)for(a=s.getLayout()[o]-l,s.setLayout("vertical"===r?{x:a}:{y:a},!0),u=a,d=c-2;d>=0;--d)(l=(s=t[d]).getLayout()[o]+s.getLayout()[h]+e-u)>0&&(a=s.getLayout()[o]-l,s.setLayout("vertical"===r?{x:a}:{y:a},!0)),u=s.getLayout()[o]})}function OD(t,e,n){q(t.slice().reverse(),function(t){q(t,function(t){if(t.outEdges.length){var i=zD(t.outEdges,PD,n)/zD(t.outEdges,VD);if(isNaN(i)){var r=t.outEdges.length;i=r?zD(t.outEdges,RD,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-FD(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-FD(t,n))*e;t.setLayout({y:a},!0)}}})})}function PD(t,e){return FD(t.node2,e)*t.getValue()}function RD(t,e){return FD(t.node2,e)}function LD(t,e){return FD(t.node1,e)*t.getValue()}function ND(t,e){return FD(t.node1,e)}function FD(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function VD(t){return t.getValue()}function zD(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)}),q(e,function(e){var r=new gM({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))})}})}var jD=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[r,o],f=d[u].get("type"),p=d[1-u].get("type"),g=t.data;if(g&&i){var m=[];q(g,function(t,e){var n;et(t)?(n=t.slice(),t.unshift(e)):et(t.value)?(n=t.value.slice(),t.value.unshift(e)):n=t,m.push(n)}),t.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:P_(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:P_(p),dimsDef:v.slice()}];return eS(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:tt(Ad,y,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),GD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return m(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Hp);W(GD,jD,!0);var UD=GD,WD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add(function(t){if(i.hasValue(t)){var e=XD(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}}).update(function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?ZD(s,n,i,t):n=XD(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},e.type="boxplot",e}(Jp),YD=function(){},qD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return m(e,t),e.prototype.getDefaultShape=function(){return new YD},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig)&&i.push([v,_])}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}},nE=["color","borderColor"],iE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add(function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&sE(s,a))return;var l=aE(a,0,!0);fc(l,{shape:{points:a.ends}},t,n),lE(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}}).update(function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var c=e.getItemLayout(a);o&&sE(s,c)?i.remove(u):(u?dc(u,{shape:{points:c.ends}},t,a):u=aE(c),lE(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),dE(t,this.group);var e=t.get("clip",!0)?hk(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=aE(i.getItemLayout(n));lE(o,i,n,r),o.incremental=!0,this.group.add(o)}},e.prototype._incrementalRenderLarge=function(t,e){dE(e,this.group,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Jp),rE=function(){},oE=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return m(e,t),e.prototype.getDefaultShape=function(){return new rE},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(ls);function aE(t,e,n){var i=t.ends;return new oE({shape:{points:n?uE(i,t):i},z2:100})}function sE(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(nE);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var pE=iE,gE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return m(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Hp);W(gE,jD,!0);var mE=gE;function vE(t){t&&et(t.series)&&q(t.series,function(t){at(t)&&"k"===t.type&&(t.type="candlestick")})}var yE=["itemStyle","borderColor"],_E=["itemStyle","borderColor0"],bE=["itemStyle","color"],wE=["itemStyle","color0"],xE={seriesType:"candlestick",plan:Up(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?bE:wE)}function i(t,e){return e.get(t>0?yE:_E)}if(t.getData(),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,B(e.ensureUniqueItemVisual(r,"style"),s)}}}}},kE="undefined"!=typeof Float32Array?Float32Array:Array;function SE(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}var CE={seriesType:"candlestick",plan:Up(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=cr(gt(t.get("barMaxWidth"),r),r),a=cr(gt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?cr(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.mapDimension(r[0]),a=n.mapDimensionsAll(r[1]),s=a[0],l=a[1],u=a[2],c=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==o||a.length<4))return{progress:t.pipelineContext.large?function(t,n){for(var i,r,a=new kE(4*t.count),h=0,d=[],f=[];null!=(r=t.next());){var p=n.get(o,r),g=n.get(s,r),m=n.get(l,r),v=n.get(u,r),y=n.get(c,r);isNaN(p)||isNaN(v)||isNaN(y)?(a[h++]=NaN,h+=3):(a[h++]=SE(n,r,g,m,l),d[0]=p,d[1]=v,i=e.dataToPoint(d,null,f),a[h++]=i?i[0]:NaN,a[h++]=i?i[1]:NaN,d[1]=y,i=e.dataToPoint(d,null,f),a[h++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){for(var r;null!=(r=t.next());){var a=n.get(o,r),h=n.get(s,r),d=n.get(l,r),f=n.get(u,r),p=n.get(c,r),g=Math.min(h,d),m=Math.max(h,d),v=x(g,a),y=x(m,a),_=x(f,a),b=x(p,a),w=[];k(w,y,0),k(w,v,1),w.push(C(b),C(y),C(_),C(v)),n.setItemLayout(r,{sign:SE(n,r,h,d,l),initBaseline:h>d?y[1]:v[1],ends:w,brushRect:S(f,p,a)})}function x(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function k(t,e,n){var r=e.slice(),o=e.slice();r[0]=cc(r[0]+i/2,1,!1),o[0]=cc(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function S(t,e,n){var r=x(t,n),o=x(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function C(t){return t[0]=cc(t[0],1),t}}}}};function AE(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}var ME=function(t){function e(e,n){var i=t.call(this)||this,r=new Wx(e,n),o=new Qi;return i.add(r),i.add(o),i.updateData(e,n),i}return m(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),r=0;r<3;r++){var o=Vm(e,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var a=-r/3*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(a).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(o)}AE(i,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],r=0;r0&&(a=this._getLineLength(i)/l*1e3),(a!==this._period||s!==this._loop)&&(i.stopAnimation(),a>0)){var c=void 0;c="function"==typeof u?u(n):u,i.__t>0&&(c=-a*i.__t),i.__t=0;var h=i.animate("",s).when(a,{__t:1}).delay(c).during(function(){r._updateSymbolPosition(i)});s||h.done(function(){r.remove(i)}),h.start()}this._period=a,this._loop=s}},e.prototype._getLineLength=function(t){return qt(t.__p1,t.__cp1)+qt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=na,l=ia;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=l(e[0],i[0],n[0],r),c=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1],t.rotation=-Math.atan2(u[1]-l[1],u[0]-l[0])-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(DE),PE=function(){this.polyline=!1,this.curveness=0,this.segs=[]},RE=function(t){function e(e){return t.call(this,e)||this}return m(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new PE},e.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(n[r++],n[r++]);for(var a=1;a0?t.quadraticCurveTo((s+u)/2-(l-c)*i,(l+c)/2-(u-s)*i,u,c):t.lineTo(u,c)}},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],c=i[s++],h=1;h0){if(Wa(u,c,(u+d)/2-(c-f)*r,(c+f)/2-(d-u)*r,d,f,o,t,e))return a}else if(Ga(u,c,d,f,o,t,e))return a;a++}return-1},e}(ls),LE=function(){function t(){this.group=new Qi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t){this.group.removeAll();var e=new RE({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Zu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e){var n=new RE;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("style");if(r&&r.stroke&&t.setStyle("stroke",r.stroke),t.setStyle("fill",null),!n){var o=Ls(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",function(e){o.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(o.dataIndex=n+t.__startIndex)})}},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),NE={seriesType:"lines",plan:Up(),reset:function(t){var e=t.coordinateSystem,n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,c=r.start;c ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Hp);function jE(t){return t instanceof Array||(t=[t,t]),t}var GE={seriesType:"lines",reset:function(t){var e=jE(t.get("symbol")),n=jE(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=jE(n.getShallow("symbol",!0)),r=jE(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}},UE=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=j();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=t.length;c.width=e,c.height=n;for(var f=0;f0){var C=o(v)?s:l;v>0&&(v=v*k+x),_[b++]=C[S],_[b++]=C[S+1],_[b++]=C[S+2],_[b++]=C[S+3]*v*256}else b+=4}return h.putImageData(y,0,0),c},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=j()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function WE(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var YE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(n){n===t&&(i=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):WE(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(WE(r)?this.render(e,n,i):this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0))},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem;if(dk(u,"cartesian2d")){var c=u.getAxis("x"),h=u.getAxis("y");o=c.getBandWidth(),a=h.getBandWidth(),s=c.scale.getExtent(),l=h.scale.getExtent()}for(var d=this.group,f=t.getData(),p=t.getModel(["emphasis","itemStyle"]).getItemStyle(),g=t.getModel(["blur","itemStyle"]).getItemStyle(),m=t.getModel(["select","itemStyle"]).getItemStyle(),v=Rc(t),y=t.get(["emphasis","focus"]),_=t.get(["emphasis","blurScope"]),b=dk(u,"cartesian2d")?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],w=n;ws[1]||Cl[1])continue;var A=u.dataToPoint([S,C]);x=new ks({shape:{x:Math.floor(Math.round(A[0])-o/2),y:Math.floor(Math.round(A[1])-a/2),width:Math.ceil(o),height:Math.ceil(a)},style:k})}else{if(isNaN(f.get(b[1],w)))continue;x=new ks({z2:1,shape:u.dataToRect([f.get(b[0],w)]).contentShape,style:k})}var M=f.getItemModel(w);if(f.hasItemOption){var I=M.getModel("emphasis");p=I.getModel("itemStyle").getItemStyle(),g=M.getModel(["blur","itemStyle"]).getItemStyle(),m=M.getModel(["select","itemStyle"]).getItemStyle(),y=I.get("focus"),_=I.get("blurScope"),v=Rc(M)}var T=t.getRawValue(w),D="-";T&&null!=T[2]&&(D=T[2]+""),Pc(x,v,{labelFetcher:t,labelDataIndex:w,defaultOpacity:k.opacity,defaultText:D}),x.ensureState("emphasis").style=p,x.ensureState("blur").style=g,x.ensureState("select").style=m,xl(x,y,_),x.incremental=r,r&&(x.states.emphasis.hoverLayer=!0),d.add(x),f.setItemGraphicEl(w,x)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new UE;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-c,g=f-h,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=c,r[1]-=h,r.push(i),r}),y=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(y,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=X(e,function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}})).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:o<0?-1:0}(n,o,r,i,h),function(t,e,n,i,r,o,a,s,l,u){var c,h=l.valueDim,d=l.categoryDim,f=Math.abs(n[d.wh]),p=t.getItemVisual(e,"symbolSize");(c=et(p)?p.slice():null==p?["100%","100%"]:[p,p])[d.index]=cr(c[d.index],f),c[h.index]=cr(c[h.index],i?f:Math.abs(o)),u.symbolSize=c,(u.symbolScale=[c[0]/s,c[1]/s])[h.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,h.boundingLength,h.pxSign,u,i,h),function(t,e,n,i,r){var o=t.get(XE)||0;o&&(KE.attr({scaleX:e[0],scaleY:e[1],rotation:n}),KE.updateTransform(),o/=KE.getLineScale(),o*=e[i.valueDim.index]),r.valueLineWidth=o}(n,h.symbolScale,l,i,h);var d=h.symbolSize,f=n.get("symbolOffset");return et(f)&&(f=[cr(f[0],d[0]),cr(f[1],d[1])]),function(t,e,n,i,r,o,a,s,l,u,c,h){var d=c.categoryDim,f=c.valueDim,p=h.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(i){var v=Math.abs(l),y=pt(t.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var b=cr(y,e[f.index]),w=Math.max(g+2*b,0),x=_?0:2*b,k=Ir(i),S=k?i:fO((v+x)/w);w=g+2*(b=(v-S*g)/2/(_?S:S-1)),x=_?0:2*b,k||"fixed"===i||(S=u?fO((Math.abs(u)+x)/w):0),m=S*w-x,h.repeatTimes=S,h.symbolMargin=b}var C=p*(m/2),A=h.pathPosition=[];A[d.index]=n[d.wh]/2,A[f.index]="start"===a?C:"end"===a?l-C:l/2,o&&(A[0]+=o[0],A[1]+=o[1]);var M=h.bundlePosition=[];M[d.index]=n[d.xy],M[f.index]=n[f.xy];var I=h.barRectShape=B({},n);I[f.wh]=p*Math.max(Math.abs(n[f.wh]),Math.abs(A[f.index]+C)),I[d.wh]=n[d.wh];var T=h.clipShape={};T[d.xy]=-n[d.xy],T[d.wh]=c.ecSize[d.wh],T[f.xy]=0,T[f.wh]=n[f.wh]}(n,d,r,o,0,f,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function QE(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function JE(t){var e=t.symbolPatternSize,n=Vm(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function tO(t,e,n,i){var r=t.__pictorialBundle,o=n.pathPosition,a=e.valueDim,s=n.repeatTimes||0,l=0,u=n.symbolSize[e.valueDim.index]+n.valueLineWidth+2*n.symbolMargin;for(cO(t,function(t){t.__pictorialAnimationIndex=l,t.__pictorialRepeatTimes=s,l0:i<0)&&(r=s-1-t),e[a.index]=u*(r-s/2+.5)+o[a.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function eO(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?hO(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=JE(n),r.add(o),hO(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function nO(t,e,n){var i=B({},e.barRectShape),r=t.__pictorialBarRect;r?hO(r,null,{shape:i},e,n):(r=t.__pictorialBarRect=new ks({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(r))}function iO(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=B({},n.clipShape),a=e.valueDim,s=n.animationModel,u=n.dataIndex;if(r)dc(r,{shape:o},s,u);else{o[a.wh]=0,r=new ks({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var c={};c[a.wh]=n.clipShape[a.wh],l[i?"updateProps":"initProps"](r,{shape:c},s,u)}}}function rO(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=oO,n.isAnimationEnabled=aO,n}function oO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function aO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sO(t,e,n,i){var r=new Qi,o=new Qi;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?tO(r,e,n):eO(r,0,n),nO(r,n,i),iO(r,e,n,i),r.__pictorialShapeStr=uO(t,n),r.__pictorialSymbolMeta=n,r}function lO(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];cO(i,function(t){o.push(t)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),q(o,function(t){pc(t,{scaleX:0,scaleY:0},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function uO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function cO(t,e,n){q(t.__pictorialBundle.children(),function(i){i!==t.__pictorialBarRect&&e.call(n,i)})}function hO(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&l[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function dO(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=o.get("focus"),h=o.get("blurScope"),d=o.get("scale");cO(t,function(t){if(t instanceof gs){var e=t.style;t.useStyle(B({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,d&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2});var f=e.valueDim.posDesc[+(n.boundingLength>0)];Pc(t.__pictorialBarRect,Rc(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:jx(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:f}),xl(t,c,h)}function fO(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var pO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=this.group,r=t.getData(),o=this._data,a=t.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:ZE[+s],categoryDim:ZE[1-+s]};return r.diff(o).add(function(t){if(r.hasValue(t)){var e=rO(r,t),n=$E(r,t,e,u),o=sO(r,u,n);r.setItemGraphicEl(t,o),i.add(o),dO(o,u,n)}}).update(function(t,e){var n=o.getItemGraphicEl(e);if(r.hasValue(t)){var a=rO(r,t),s=$E(r,t,a,u),l=uO(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(t,null),n=null),n?function(t,e,n){dc(t.__pictorialBundle,{x:n.bundlePosition[0],y:n.bundlePosition[1]},n.animationModel,n.dataIndex),n.symbolRepeat?tO(t,e,n,!0):eO(t,0,n,!0),nO(t,n,!0),iO(t,e,n,!0)}(n,u,s):n=sO(r,u,s,!0),r.setItemGraphicEl(t,n),n.__pictorialSymbolMeta=s,i.add(n),dO(n,u,s)}else i.remove(n)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&lO(o,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=r,this.group},e.prototype.remove=function(t,e){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){lO(i,Ls(e).dataIndex,t,e)}):n.removeAll()},e.type="pictorialBar",e}(Jp),gO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return m(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=ah(Ak.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Ak),mO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return m(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(t){return t.name}o.x=0,o.y=l.y+u[0];var h=new E_(this._layersSeries||[],a,c,c),d=[];function f(e,n,s){var l=r._layers;if("remove"!==e){for(var u,c,h=[],f=[],p=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=h)}return{y0:r,max:o}}(l),c=u.y0,h=n/u.max,d=o.length,f=o[0].indices.length,p=0;pMath.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(v=r.r0+w,a>Math.PI/2&&(x="right")):"right"===x&&(v=r.r-w,a>Math.PI/2&&(x="left")):(v=(r.r+r.r0)/2,x="center"),f.style.align=x,f.style.verticalAlign=p(o,"verticalAlign")||"middle",f.x=v*s+r.cx,f.y=v*l+r.cy;var k=p(o,"rotate"),S=0;"radial"===k?(S=-a)<-Math.PI/2&&(S+=Math.PI):"tangential"===k?(S=Math.PI/2-a)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof k&&(S=k*Math.PI/180),f.rotation=S}),c.dirtyStyle()},e}(gu),wO="sunburstRootToNode",xO="sunburstHighlight",kO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),c=[];s.eachNode(function(t){c.push(t)}),function(i,r){function s(t){return t.getId()}function c(s,c){!function(i,r){if(u||!i||i.getValue()||(i=null),i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):(c=r)&&c.piece&&(l.remove(c.piece),c.piece=null);else if(i){var s=new bO(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}var c}(null==s?null:i[s],null==c?null:r[c])}0===i.length&&0===r.length||new E_(r,i,s,s).add(c).update(c).remove(tt(c,null)).execute()}(c,this._oldChildren||[]),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new bO(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",function(t){r._rootToNode(o.parentNode)})):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=c},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(e){var n=!1;t.seriesModel.getViewRoot().eachNode(function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");a&&Qh(a,o.get("target",!0)||"_blank")}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:wO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(Jp);function SO(t){var e=0;q(t.children,function(t){SO(t);var n=t.value;et(n)&&(n=n[0]),e+=n});var n=t.value;et(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),et(t.value)?t.value[0]=n:t.value=n}var CO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return m(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};SO(n);var i=X(t.levels||[],function(t){return new ih(t,this,e)},this),r=TA.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t})});return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=FA(i,this),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){BA(this)},e.type="series.sunburst",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"},e}(Hp),AO=Math.PI/180;function MO(t,e,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");et(i)||(i=[0,i]),et(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=cr(e[0],r),l=cr(e[1],o),u=cr(i[0],a/2),c=cr(i[1],a/2),h=-t.get("startAngle")*AO,d=t.get("minAngle")*AO,f=t.getData().tree.root,p=t.getViewRoot(),g=p.depth,m=t.get("sort");null!=m&&IO(p,m);var v=0;q(p.children,function(t){!isNaN(t.getValue())&&v++});var y=p.getValue(),_=Math.PI/(y||v)*2,b=p.depth>0,w=(c-u)/(p.height-(b?-1:1)||1),x=t.get("clockwise"),k=t.get("stillShowZeroSum"),S=x?1:-1;if(b){var C=2*Math.PI;f.setLayout({angle:C,startAngle:h,endAngle:h+C,clockwise:x,cx:s,cy:l,r0:u,r:u+w})}!function t(e,n){if(e){var i=n;if(e!==f){var r=e.getValue(),o=0===y&&k?_:r*_;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&"string"==typeof o&&(o=gn(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),B(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)})})}function DO(t,e){return e=e||[0,0],X(["x","y"],function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))},this)}function EO(t,e){return e=e||[0,0],X([0,1],function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])},this)}function OO(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function PO(t,e){return e=e||[0,0],X(["Radius","Angle"],function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function RO(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||It(t,"text")))}function LO(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},It(a,"text")&&(o.text=a.text),It(a,"rich")&&(o.rich=a.rich),It(a,"textFill")&&(o.fill=a.textFill),It(a,"textStroke")&&(o.stroke=a.textStroke),r={type:"text",style:o,silent:!0},i={};var s=It(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),It(a,"textPosition")&&(i.position=a.textPosition),It(a,"textOffset")&&(i.offset=a.textOffset),It(a,"textRotation")&&(i.rotation=a.textRotation),It(a,"textDistance")&&(i.distance=a.textDistance)}return NO(o,t),q(o.rich,function(t){NO(t,t)}),{textConfig:i,textContent:r}}function NO(t,e){e&&(e.font=e.textFont||e.font,It(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),It(e,"textAlign")&&(t.align=e.textAlign),It(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),It(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),It(e,"textWidth")&&(t.width=e.textWidth),It(e,"textHeight")&&(t.height=e.textHeight),It(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),It(e,"textPadding")&&(t.padding=e.textPadding),It(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),It(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),It(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),It(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),It(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),It(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),It(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function FO(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";VO(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,q(e.rich,function(t){VO(t,t)}),i}function VO(t,e){e&&(It(e,"fill")&&(t.textFill=e.fill),It(e,"stroke")&&(t.textStroke=e.fill),It(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),It(e,"font")&&(t.font=e.font),It(e,"fontStyle")&&(t.fontStyle=e.fontStyle),It(e,"fontWeight")&&(t.fontWeight=e.fontWeight),It(e,"fontSize")&&(t.fontSize=e.fontSize),It(e,"fontFamily")&&(t.fontFamily=e.fontFamily),It(e,"align")&&(t.textAlign=e.align),It(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),It(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),It(e,"width")&&(t.textWidth=e.width),It(e,"height")&&(t.textHeight=e.height),It(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),It(e,"padding")&&(t.textPadding=e.padding),It(e,"borderColor")&&(t.textBorderColor=e.borderColor),It(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),It(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),It(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),It(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),It(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),It(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),It(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),It(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),It(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),It(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var zO=ja.CMD,BO=2*Math.PI,HO=["x","y"],jO=["width","height"],GO=[];function UO(t,e){return Math.abs(t-e)<1e-5}function WO(t){var e,n,i,r,o,a=t.data,s=t.len(),l=[],u=0,c=0,h=0,d=0;function f(t,n){e&&e.length>2&&l.push(e),e=[t,n]}function p(t,n,i,r){UO(t,i)&&UO(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nS:M2&&l.push(e),l}function YO(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var r=nh.width?1:0,r=jO[i],o=HO[i],a=h[r]/e,s=h[o],l=0;li[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:J(PO,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}},SP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return pb(this.getSource(),this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=cP(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},e}(Hp),CP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n,i){var r=this._data,o=t.getData(),a=this.group,s=WP(t,o,e,n),l=t.__transientTransitionOpt;if(!l||null!=l.from&&null!=l.to){var u=new aR(t,l),c=l?"multiple":"oneToOne";new E_(r?r.getIndices():[],o.getIndices(),AP(r,c,l&&l.from),AP(o,c,l&&l.to),null,c).add(function(e){qP(n,null,e,s(e,i),t,a,o,null)}).remove(function(e){nR(r.getItemGraphicEl(e),t,a)}).update(function(e,l){u.reset("oneToOne");var c=r.getItemGraphicEl(l);u.findAndAddFrom(c),u.hasFrom()&&(oR(c,a),c=null),qP(n,c,e,s(e,i),t,a,o,u),u.applyMorphing()}).updateManyToOne(function(e,l){u.reset("manyToOne");for(var c=0;c=0){!s&&(s=r[t]={});var f=Q(l);for(h=0;h=0){var d=t.getAnimationStyleProps(),f=d?d.style:null;if(f){!a&&(a=r.style={});var p=Q(i);for(c=0;c=d;f--)nR(e.childAt(f),r,e)}}(t,e,n,i,r,s),l>=0?o.replaceAt(e,l):o.add(e),e}function ZP(t,e){var n,i=cP(t),r=e.type,o=e.shape,a=e.style;return null!=r&&r!==i.customGraphicType||"path"===r&&(n=o)&&(It(n,"pathData")||It(n,"d"))&&iR(o)!==i.customPathData||"image"===r&&It(a,"image")&&a.image!==i.customImagePath}function KP(t,e,n){var i=e?$P(t,e):t,r=e?QP(t,i,fP):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?$P(s,e):s:null;if(r&&(n.isLegacy||RO(r,o,!!a,!!l))){n.isLegacy=!0;var u=LO(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}!e&&l&&!l.type&&(l.type="text");var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function $P(t,e){return e?t?t[e]:null:t}function QP(t,e,n){var i=e&&e.style;return null==i&&n===fP&&t&&(i=t.styleEmphasis),i}function JP(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function tR(t,e){var n=this.context;XP(n.api,null!=e?n.oldChildren[e]:null,n.dataIndex,null!=t?n.newChildren[t]:null,n.seriesModel,n.group,0,n.morphPreparation)}function eR(t){var e=this.context;nR(e.oldChildren[t],e.seriesModel,e.group)}function nR(t,e,n){if(t){var i=cP(t).leaveToProps;i?dc(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t)}}function iR(t){return t&&(t.pathData||t.d)}function rR(t){return t&&t instanceof ls}function oR(t,e){t&&e.remove(t)}var aR=function(){function t(t,e){this._fromList=[],this._toList=[],this._toElOptionList=[],this._allPropsFinalList=[],this._toDataIndices=[],this._morphConfigList=[],this._seriesModel=t,this._transOpt=e}return t.prototype.hasFrom=function(){return!!this._fromList.length},t.prototype.findAndAddFrom=function(t){if(t&&(cP(t).canMorph&&this._fromList.push(t),t.isGroup))for(var e=t.childrenRef(),n=0;n=n?null:o,i+1>=e?n-o:r);else if("oneToMany"===t)for(var a=Math.max(1,Math.floor(e/n)),s=0,l=0;s=e?e-s:a,l>=n?null:l)},t.prototype._oneToOneForSingleTo=function(t,e){var n,i=this._toList[t],r=this._toElOptionList[t],o=this._toDataIndices[t],a=this._allPropsFinalList[t],s=this._fromList[e],l=this._getOrCreateMorphConfig(o),u=l.duration;if(s&&eP(s)){if(TP(i,a,r.style),u){var c=nP([s],i,l,sR);this._processResultIndividuals(c,t,null)}}else{var h=u&&s&&(s!==i||tP(n=s)||eP(n))?s:null,d={};EP("shape",i,h,r,d,!1),EP("extra",i,h,r,d,!1),PP(i,h,r,d,!1),RP(i,h,r,r.style,d,!1),TP(i,a,r.style),h&&$O(h,i,l),DP(i,o,r,this._seriesModel,d,!1)}},t.prototype._manyToOneForSingleTo=function(t,e,n){var i=this._toList[t];TP(i,this._allPropsFinalList[t],this._toElOptionList[t].style);var r=this._getOrCreateMorphConfig(this._toDataIndices[t]);if(r.duration&&null!=e){for(var o=[],a=e;aa)return!0;if(o){var s=BS(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=lR(t).pointerEl=new l[r.type](uR(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=lR(t).labelEl=new Rs(uR(e.label));t.add(r),fR(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=lR(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=lR(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),fR(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Cc(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ye(t.event)},onmousedown:cR(this._onHandleDragMove,this,0,0),drift:cR(this._onHandleDragMove,this),ondragend:cR(this._onHandleDragEnd,this)}),i.add(r)),gR(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");et(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,rg(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){hR(this._axisPointerModel,!e&&this._moveAnimation,this._handle,pR(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(pR(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(pR(i)),lR(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function vR(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function yR(t,e,n,i,r){var o=_R(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Bh(a.get("padding")||0),l=a.getFont(),u=ni(o,l),c=r.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(c[0]-=h),"center"===f&&(c[0]-=h/2);var p=r.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(c,h,d,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:c[0],y:c[1],style:Lc(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function _R(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:_w(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};q(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=e&&e.getDataParams(t.dataIndexInside);i&&s.seriesData.push(i)}),it(a)?o=a.replace("{value}",o):nt(a)&&(o=a(s))}return o}function bR(t,e,n){var i=[1,0,0,1,0,0];return Fe(i,i,n.rotation),Ne(i,i,n.position),_c([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function wR(t,e,n,i,r,o){var a=FS.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),yR(e,i,r,o,{position:bR(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function xR(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function kR(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function SR(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var CR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=AR(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var c=vR(i),h=MR[s](o,u,l);h.style=c,t.graphicKey=h.type,t.pointer=h}wR(e,t,kS(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=kS(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=bR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=AR(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];return h[l]=u[l],{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(mR);function AR(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var MR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:xR([e,n[0]],[e,n[1]],IR(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth());return{type:"Rect",shape:kR([e-i/2,n[0]],[i,n[1]-n[0]],IR(t))}}};function IR(t){return"x"===t.dim?0:1}var TR=CR,DR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(dd),ER=Ur(),OR=q;function PR(t,e,n){if(!w.node){var i=e.getZr();ER(i).records||(ER(i).records={}),function(t,e){function n(n,i){t.on(n,function(n){var r=function(t){var e={showTip:[],hideTip:[]};return{dispatchAction:function n(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))},pendings:e}}(e);OR(ER(t).records,function(t){t&&i(t,n,r.dispatchAction)}),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)})}ER(t).initialized||(ER(t).initialized=!0,n("click",tt(LR,"click")),n("mousemove",tt(LR,"mousemove")),n("globalout",RR))}(i,e),(ER(i).records[t]||(ER(i).records[t]={})).handler=n}}function RR(t,e,n){t.handler("leave",null,n)}function LR(t,e,n,i){e.handler(t,n,i)}function NR(t,e){if(!w.node){var n=e.getZr();(ER(n).records||{})[t]&&(ER(n).records[t]=null)}}var FR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";PR("axisPointer",n,function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},e.prototype.remove=function(t,e){NR("axisPointer",e)},e.prototype.dispose=function(t,e){NR("axisPointer",e)},e.type="axisPointer",e}(Gp);function VR(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Gr(o,t);if(null==a||a<0||et(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,h="x"===c||"radius"===c?1:0,d=o.mapDimension(u.dim),f=[];f[h]=o.get(d,a),f[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(X(l.dimensions,function(t){return o.mapDimension(t)}),a))||[];else if(s){var p=s.getBoundingRect().clone();p.applyTransform(s.transform),i=[p.x+p.width/2,p.y+p.height/2]}return{point:i,el:s}}var zR=Ur();function BR(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||J(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){WR(r)&&(r=VR({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=WR(r),u=o.axesInfo,c=s.axesInfo,h="leave"===i||WR(r),d={},f={},p={list:[],map:{}},g={showPointer:tt(jR,f),showTooltip:tt(GR,p)};q(s.coordSysMap,function(t,e){var n=l||t.containPoint(r);q(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!h&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&HR(t,a,g,!1,d)}})});var m={};return q(c,function(t,e){var n=t.linkGroup;n&&!f[e]&&q(n.axesInfo,function(e,i){var r=f[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,UR(e),UR(t)))),m[t.key]=o}})}),q(m,function(t,e){HR(c[e],t,g,!0,d)}),function(t,e,n){var i=n.axesInfo=[];q(e,function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}(f,c,d),function(t,e,n,i){if(!WR(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else i({type:"hideTip"})}(p,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=zR(i)[r]||{},a=zR(i)[r]={};q(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&q(n.seriesDataIndices,function(t){a[t.seriesIndex+" | "+t.dataIndex]=t})});var s=[],l=[];q(o,function(t,e){!a[e]&&l.push(t)}),q(a,function(t,e){!o[e]&&s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),d}}function HR(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return q(e.seriesModels,function(e,l){var u,c,h=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(h,t,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=e.getData().indicesOfNearest(h[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=a&&((p=0&&s<0)&&(a=p,s=f,r=u,o.length=0),q(c,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&B(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function jR(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function GR(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=jS(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function UR(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function WR(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function YR(t){US.registerAxisPointerClass("CartesianAxisPointer",TR),t.registerComponentModel(DR),t.registerComponentView(FR),t.registerPreprocessor(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!et(e)&&(t.axisPointer.link=[e])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=function(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];q(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=jS(n.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(q(n.getAxes(),tt(f,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get(["axisPointer","type"]),d=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||h)&&q(d.baseAxes,tt(f,!h||"cross",c)),h&&q(d.otherAxes,tt(f,"cross",!1))}}function f(i,s,c){var h=c.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||i||HS(h))){null==s&&(s=h.get("triggerTooltip"));var f=(h=i?function(t,e,n,i,r,o){var a=e.getModel("axisPointer"),s={};q(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=F(a.get(t))}),s.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&H(l,c.textStyle)}}return t.model.getModel("axisPointer",new ih(s,n,i))}(c,u,r,e,i,s):h).get("snap"),p=jS(c.model),g=s||f||"category"===c.type,m=t.axesInfo[p]={key:p,axis:c,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:HS(h),seriesModels:[],linkGroup:null};l[p]=m,t.seriesInvolved=t.seriesInvolved||g;var v=function(t,e){for(var n=e.model,i=e.dim,r=0;rm?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(e,n,0,a,i.get(["label","margin"]));yR(t,n,i,r,d)},e}(mR),XR={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:xR(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:SR(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:SR(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},ZR=qR,KR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},e}(dd),$R=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Xr).models[0]},e.type="polarAxis",e}(dd);W($R,kw);var QR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="angleAxis",e}($R),JR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="radiusAxis",e}($R),tL=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return m(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(zw);tL.prototype.dataToRadius=zw.prototype.dataToCoord,tL.prototype.radiusToData=zw.prototype.coordToData;var eL=tL,nL=Ur(),iL=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return m(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=ni(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),h=nL(t.model),d=h.lastAutoInterval,f=h.lastTickCount;return null!=d&&null!=f&&Math.abs(d-c)<=1&&Math.abs(f-r)<=1&&d>c?c=d:(h.lastTickCount=r,h.lastAutoInterval=c),c},e}(zw);iL.prototype.dataToAngle=zw.prototype.dataToCoord,iL.prototype.angleToData=zw.prototype.coordToData;var rL=iL;function oL(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var aL=function(){function t(t){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new eL,this._angleAxis=new rL,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return oL(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return oL(e)===this?this.pointToData(n):null},t}();function sL(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===n){var e=t.getData();q(xw(e,"radius"),function(t){r.scale.unionExtentFromData(e,t)}),q(xw(e,"angle"),function(t){i.scale.unionExtentFromData(e,t)})}}),mw(i.scale,i.model),mw(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function lL(t,e){if(t.type=e.get("type"),t.scale=vw(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var uL={dimensions:aL.prototype.dimensions,create:function(t,e){var n=[];return t.eachComponent("polar",function(t,i){var r=new aL(i+"");r.update=sL;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");lL(o,s),lL(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=cr(i[0],r),t.cy=cr(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:et(l)||(l=[0,l]);var u=[cr(l[0],s),cr(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t}),t.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Xr).models[0];t.coordinateSystem=e.coordinateSystem}}),n}},cL=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function hL(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function dL(t){return t.getRadiusAxis().inverse?0:1}function fL(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var pL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return m(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=X(n.getViewLabels(),function(t){t=F(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t});fL(s),fL(o),q(cL,function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||gL[e](this.group,t,i,o,a,r,s)},this)}},e.type="angleAxis",e}(US),gL={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=dL(n),u=l?0:1;(a=0===o[u]?new $l({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new yu({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[dL(n)],u=X(i,function(t){return new Du({shape:hL(n,[l,l+s],t.coord)})});t.add(ac(u,{style:H(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[dL(n)],c=[],h=0;hp?"left":"right",v=Math.abs(f[1]-g)/d<.3?"middle":f[1]>g?"top":"bottom";if(s&&s[h]){var y=s[h];at(y)&&y.textStyle&&(a=new ih(y.textStyle,l,l.ecModel))}var _=new Rs({silent:FS.isLabelSilent(e),style:Lc(a,{x:f[0],y:f[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(t.add(_),c){var b=FS.makeAxisEventDataBase(e);b.targetType="axisLabel",b.value=i.rawLabel,Ls(_).eventData=b}},this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",A=b;y&&(i[s][S]||(i[s][S]={p:b,n:b}),A=i[s][S][C]);var M=void 0,I=void 0,T=void 0,D=void 0;if("radius"===h.dim){var E=h.dataToCoord(k)-b,O=o.dataToCoord(S);Math.abs(E)=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return FL(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return FL(e)===this?this.pointToData(n):null},t}(),zL={create:function(t,e){var n=[];return t.eachComponent("singleAxis",function(i,r){var o=new VL(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Xr).models[0];t.coordinateSystem=e&&e.coordinateSystem}}),n},dimensions:VL.prototype.dimensions},BL=["x","y"],HL=["width","height"],jL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=WL(a,1-UL(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var c=vR(i),h=GL[u](o,l,s);h.style=c,t.graphicKey=h.type,t.pointer=h}wR(e,t,IL(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=IL(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=bR(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=UL(r),s=WL(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=WL(o,1-a),c=(u[1]+u[0])/2,h=[c,c];return h[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(mR),GL={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:xR([e,n[0]],[e,n[1]],UL(t))}},shadow:function(t,e,n){var i=t.getBandWidth();return{type:"Rect",shape:kR([e-i/2,n[0]],[i,n[1]-n[0]],UL(t))}}};function UL(t){return t.isHorizontal()?0:1}function WL(t,e){var n=t.getRect();return[n[BL[e]],n[BL[e]]+n[HL[e]]]}var YL=jL,qL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="single",e}(Gp);function XL(t,e){var n,i=t.cellSize;1===(n=et(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=X([0,1],function(t){return function(t,e){return null!=t[ed[e][0]]||null!=t[ed[e][1]]&&null!=t[ed[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]});sd(t,e,{type:"box",ignoreSize:r})}var ZL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(e,n,i){var r=ld(e);t.prototype.init.apply(this,arguments),XL(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),XL(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(dd),KL={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\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"]},$L={EN:["S","M","T","W","T","F","S"],CN:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]},QL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,a,i),this._renderWeekText(t,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new ks({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,c=0;u.time<=e.end.time;c++){d(u.formatedDate),0===c&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=o.getDateInfo(h)}function d(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new Au({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?(n=t,q(e,function(t,e){n=n.replace("{"+e+"}",t)}),n):"function"==typeof t?t(e):e.nameMap;var n},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=r.get("formatter"),p=this._formatterLabel(f,{start:e.start.y,end:e.end.y,nameMap:d}),g=new Rs({z2:30,style:Lc(r,{text:p})});g.attr(this._yearTextPositionControl(g,h[a],n,a,o)),i.add(g)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var r=i.get("nameMap"),o=i.get("margin"),a=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];it(r)&&(r=KL[r.toUpperCase()]||[]);var u="start"===a?0:1,c="horizontal"===e?0:1;o="start"===a?-o:o;for(var h="center"===s,d=0;d=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/JL)-Math.floor(n[0].time/JL)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o}),e.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},t.dimensions=["time","value"],t}(),nN=Ur(),iN={path:null,compoundPath:null,group:Qi,image:gs,text:Rs},rN=function(t){var e=t.graphic;et(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])},oN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventAutoZ=!0,n}return m(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=Fr(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];q(a,function(t,e){var n=t.newOption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=B({},n),r=t[e],o=n.$action||"merge";"merge"===o?r?(V(r,i,!0),sd(r,i,{ignoreSize:!0}),ud(n,r)):t[e]=i:"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}(r,e,n),function(t,e){if(t&&(t.hv=e.hv=[uN(e,["left","right"]),uN(e,["top","bottom"])],"group"===t.type)){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[e],n))},this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},e.prototype._flatten=function(t,e,n){q(t,function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(dd),aN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(){this._elMap=Ct()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;q(e,function(e){var r=Br(e.id,null),o=null!=r?n.get(r):null,a=Br(e.parentId,null),s=null!=a?n.get(a):i,l=e.type,u=e.style;"text"===l&&u&&e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=u.verticalAlign=u.align=null);var c=e.textContent,h=e.textConfig;if(u&&RO(u,l,!!h,!!c)){var d=LO(u,l,!0);!h&&d.textConfig&&(h=e.textConfig=d.textConfig),!c&&d.textContent&&(c=d.textContent)}var f=function(t){return t=B({},t),q(["id","parentId","$action","hv","bounding","textContent"].concat(td),function(e){delete t[e]}),t}(e),p=e.$action||"merge";"merge"===p?o?o.attr(f):sN(r,s,f,n):"replace"===p?(lN(o,n),sN(r,s,f,n)):"remove"===p&&lN(o,n);var g=n.get(r);if(g&&c)if("merge"===p){var m=g.getTextContent();m?m.attr(c):g.setTextContent(new Rs(c))}else"replace"===p&&g.setTextContent(new Rs(c));if(g){var v=nN(g);v.__ecGraphicWidthOption=e.width,v.__ecGraphicHeightOption=e.height,function(t,e,n){var i=Ls(t).eventData;t.silent||t.ignore||i||(i=Ls(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=n.info)}(g,t,e),Tc({el:g,componentModel:t,itemName:g.name,itemTooltipOption:e.tooltip})}})}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=0;s=0;s--){var h,d,f,p;(f=null!=(d=Br((h=n[s]).id,null))?r.get(d):null)&&(c=nN(p=f.parent),od(f,h,p===i?{width:o,height:a}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:h.hv,boundingMode:h.bounding}))}},e.prototype._clear=function(){var t=this._elMap;t.each(function(e){lN(e,t)}),this._elMap=Ct()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Gp);function sN(t,e,n,i){var r=n.type,o=new(It(iN,r)?iN[r]:nc(r))(n);e.add(o),i.set(t,o),nN(o).__ecGraphicId=t}function lN(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){lN(t,e)}),e.removeKey(nN(t).__ecGraphicId),n.remove(t))}function uN(t,e){var n;return q(e,function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)}),n}var cN=["x","y","radius","angle","single"],hN=["cartesian2d","polar","singleAxis"];function dN(t){return t+"Axis"}function fN(t){var e=t.ecModel,n={infoList:[],infoMap:Ct()};return t.eachTargetAxis(function(t,i){var r=e.getComponent(dN(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(n.infoList.push(s={model:o,axisModels:[]}),n.infoMap.set(a,s)),s.axisModels.push(r)}}}),n}var pN=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}();function gN(t){var e={};return q(["start","end","startValue","endValue","throttle"],function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}var mN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return m(e,t),e.prototype.init=function(t,e,n){var i=gN(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=gN(t);V(this.option,t,!0),V(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;q([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=Ct();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return q(cN,function(n){var i=this.getReferringComponents(dN(n),Zr);if(i.specified){e=!0;var r=new pN;q(i.models,function(t){r.add(t.componentIndex)}),t.set(n,r)}},this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}function o(e,n){var r=e[0];if(r){var o=new pN;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Xr).models[0];a&&q(e,function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Xr).models[0]&&o.add(t.componentIndex)})}}}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),i&&q(cN,function(e){if(i){var r=n.findComponents({mainType:dN(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new pN;o.add(r[0].componentIndex),t.set(e,o),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(e){!t&&(t=e)},this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");q([["start","startValue"],["end","endValue"]],function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(e,n){null==t&&(t=this.ecModel.getComponent(dN(e),n))},this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each(function(n,i){q(n.indexList,function(n){t.call(e,i,n)})})},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(dN(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;q([["start","startValue"],["end","endValue"]],function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;q(["start","startValue","end","endValue"],function(n){e[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=dN(this._dimName),i=e.getReferringComponents(n,Xr).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return F(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];bN(["start","end"],function(l,u){var c=t[l],h=t[l+"Value"];"percent"===r[u]?(null==c&&(c=o[u]),h=i.parse(ur(c,o,n))):(e=!0,c=ur(h=null==h?n[u]:i.parse(h),n,o)),s[u]=h,a[u]=c}),wN(s),wN(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";fT(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=ur(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];bN(n,function(t){!function(t,e,n){e&&q(xw(e,n),function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])})}(i,t.getData(),e)});var r=t.getAxisModel(),o=fw(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&bN(i,function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf(function(t){for(var n,r,a,s=0;so[1];if(u&&!c&&!h)return!0;u&&(a=!0),c&&(n=!0),h&&(r=!0)}return a&&n&&r}):bN(i,function(n){if("empty"===r)t.setData(e=e.map(n,function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN}));else{var i={};i[n]=o,e.selectRange(i)}}),bN(i,function(t){e.setApproximateExtent(o,t)}))})}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;bN(["min","max"],function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=ur(n[0]+o,n,[0,100],!0):null!=r&&(o=ur(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o},this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=gr(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}(),kN={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=t.getComponent(dN(i),r);e(i,r,o,n)})})}e(function(t,e,n,i){n.__dzAxisProxy=null});var n=[];e(function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new xN(e,i,o,t),n.push(r.__dzAxisProxy))});var i=Ct();return q(n,function(t){q(t.getTargetSeriesModels(),function(t){i.set(t.uid,t)})}),i},overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(e,n){t.getAxisProxy(e,n).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}},SN=!1;function CN(t){SN||(SN=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,kN),function(t){t.registerAction("dataZoom",function(t,e){q(function(t,e){var n,i=Ct(),r=[],o=Ct();t.eachComponent({mainType:"dataZoom",query:e},function(t){o.get(t.uid)||s(t)});do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis(function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)}),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis(function(t,e){(i.get(t)||i.set(t,[]))[e]=!0})}return r}(e,t),function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}(t),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function AN(t){t.registerComponentModel(vN),t.registerComponentView(_N),CN(t)}var MN=function(){},IN={};function TN(t,e){IN[t]=e}function DN(t){return IN[t]}var EN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;q(this.option.feature,function(t,n){var i=DN(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),V(t,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(dd);function ON(t,e){var n=Bh(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),new ks({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var PN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a=t.get("feature")||{},s=this._features||(this._features={}),l=[];q(a,function(t,e){l.push(e)}),new E_(this._featureNames||[],l).add(u).update(u).remove(tt(u,null)).execute(),this._featureNames=l,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=rd(i,o,r);id(e.get("orient"),t,e.get("itemGap"),a.width,a.height),od(t,i,o,r)}(r,t,n),r.add(ON(r.getBoundingRect(),t)),r.eachChild(function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.states.emphasis;if(l&&!nt(l)&&e){var u=l.style||(l.style={}),c=ni(e,Rs.makeFont(u)),h=t.x+r.x,d=!1;t.y+r.y+o+c.height>n.getHeight()&&(a.position="top",d=!0);var f=d?-5-c.height:o+8;h+c.width/2>n.getWidth()?(a.position=["100%",f],u.align="right"):h-c.width/2<0&&(a.position=[0,f],u.align="left")}})}function u(u,c){var h,d=l[u],f=l[c],p=a[d],g=new ih(p,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(p.title=i.newTitle),d&&!f){if(function(t){return 0===t.indexOf("my")}(d))h={onclick:g.option.onclick,featureName:d};else{var m=DN(d);if(!m)return;h=new m}s[d]=h}else if(!(h=s[f]))return;if(h.uid=oh("toolbox-feature"),h.model=g,h.ecModel=e,h.api=n,h instanceof MN){if(!d&&f)return void(h.dispose&&h.dispose(e,n));if(!g.get("show")||h.unusable)return void(h.remove&&h.remove(e,n))}!function(i,a,s){var l,u,c=i.getModel("iconStyle"),h=i.getModel(["emphasis","iconStyle"]),d=a instanceof MN&&a.getIcons?a.getIcons():i.get("icon"),f=i.get("title")||{};"string"==typeof d?(l={})[s]=d:l=d,"string"==typeof f?(u={})[s]=f:u=f;var p=i.iconPaths={};q(l,function(s,l){var d=Cc(s,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(c.getItemStyle()),d.ensureState("emphasis").style=h.getItemStyle();var f=new Rs({style:{text:u[l],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null},ignore:!0});d.setTextContent(f),Tc({el:d,componentModel:t,itemName:l,formatterParamsExtra:{title:u[l]}}),d.__title=u[l],d.on("mouseover",function(){var e=h.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({fill:h.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),d.setTextConfig({position:h.get("textPosition")||n}),f.ignore=!t.get("showTitle"),ul(this)}).on("mouseout",function(){"emphasis"!==i.get(["iconStatus",l])&&cl(this),f.hide()}),("emphasis"===i.get(["iconStatus",l])?ul:cl)(d),r.add(d),d.on("click",J(a.onclick,a,e,n,l)),p[l]=d})}(g,h,d),g.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?ul:cl)(i[t])},h instanceof MN&&h.render&&h.render(g,e,n,i)}},e.prototype.updateView=function(t,e,n,i){q(this._features,function(t){t instanceof MN&&t.updateView&&t.updateView(t.model,e,n,i)})},e.prototype.remove=function(t,e){q(this._features,function(n){n instanceof MN&&n.remove&&n.remove(t,e)}),this.group.removeAll()},e.prototype.dispose=function(t,e){q(this._features,function(n){n instanceof MN&&n.dispose&&n.dispose(t,e)})},e.type="toolbox",e}(Gp),RN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!w.browser.newEdge&&(w.browser.ie||w.browser.edge))if(window.navigator.msSaveOrOpenBlob||r){var s=a.split(","),l=s[0].indexOf("base64")>-1,u=r?decodeURIComponent(s[1]):s[1];l&&(u=atob(u));var c=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var h=u.length,d=new Uint8Array(h);h--;)d[h]=u.charCodeAt(h);var f=new Blob([d]);window.navigator.msSaveOrOpenBlob(f,c)}else{var p=document.createElement("iframe");document.body.appendChild(p);var g=p.contentWindow,m=g.document;m.open("image/svg+xml","replace"),m.write(u),m.close(),g.focus(),m.execCommand("SaveAs",!0,c),document.body.removeChild(p)}}else{var v=n.get("lang"),y='',_=window.open();_.document.write(y),_.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=a;var x=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(x)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(MN);RN.prototype.unusable=!w.canvasSupported;var LN=RN,NN="__ec_magicType_stack__",FN=[["line","bar"],["stack"]],VN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return q(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(zN[n]){var o,a={series:[]};q(FN,function(t){G(t,n)>=0&&q(t,function(t){i.setIconStatus(t,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(t){var e=zN[n](t.subType,t.id,t,i);e&&(H(e,t.option),a.series.push(e));var r=t.coordinateSystem;if(r&&"cartesian2d"===r.type&&("line"===n||"bar"===n)){var o=r.getAxesByScale("ordinal")[0];if(o){var s=o.dim+"Axis",l=t.getReferringComponents(s,Xr).models[0].componentIndex;a[s]=a[s]||[];for(var u=0;u<=l;u++)a[s][l]=a[s][l]||{};a[s][l].boundaryGap="bar"===n}}}),"stack"===n&&(o=V({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title)),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:a,newTitle:o,featureName:"magicType"})}},e}(MN),zN={line:function(t,e,n,i){if("bar"===t)return V({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return V({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===NN;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),V({id:e,stack:r?"":NN},i.get(["option","stack"])||{},!0)}};f_({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var BN=VN,HN=new Array(60).join("-"),jN="\t";function GN(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var UN=new RegExp("[\t]+","g"),WN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var r=document.createElement("div");r.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",r.style.backgroundColor=i.get("backgroundColor")||"#fff";var o=document.createElement("h4"),a=i.get("lang")||[];o.innerHTML=a[0]||i.get("title"),o.style.cssText="margin: 10px 20px;",o.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),c=i.get("contentToOption"),h=function(t){var e,n,i,r=function(t){var e={},n=[],i=[];return t.eachRawSeries(function(t){var r=t.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(t);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;e[a]||(e[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),e[a].series.push(t)}else n.push(t)}}),{seriesGroupByCategoryAxis:e,other:n,meta:i}}(t);return{value:K([(n=r.seriesGroupByCategoryAxis,i=[],q(n,function(t,e){var n=t.categoryAxis,r=t.valueAxis.dim,o=[" "].concat(X(t.series,function(t){return t.name})),a=[n.model.getCategories()];q(t.series,function(t){var e=t.getRawData();a.push(t.getRawData().mapArray(e.mapDimension(r),function(t){return t}))});for(var s=[o.join(jN)],l=0;l=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=X(GN(e.shift()).split(UN),function(t){return{name:t,data:[]}}),r=0;r=0)&&t(r,i._targetInfoList)})}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=sF[t.brushType](0,n,e);t.__rangeOffset={offset:uF[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}}),t},t.prototype.matchOutputRanges=function(t,e,n){q(t,function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&q(i.coordSyses,function(i){var r=sF[t.brushType](1,i,t.range);n(t,r.values,i,e)})},this)},t.prototype.setInputRanges=function(t,e){q(t,function(t){var n,i,r,o,a=this.findTargetInfo(t,e);if(t.range=t.range||[],a&&!0!==a){t.panelId=a.panelId;var s=sF[t.brushType](0,a.coordSys,t.coordRange),l=t.__rangeOffset;t.range=l?uF[t.brushType](s.values,l.offset,(n=l.xyMinMax,i=hF(s.xyMinMax),r=hF(n),o=[i[0]/r[0],i[1]/r[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):s.values}},this)},t.prototype.makePanelOpts=function(t,e){return X(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:mD(i),isTargetByCursor:yD(i,t,n.coordSysModel),getLinearBrushOtherExtent:vD(i)}})},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&G(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=iF(e,t),r=0;rt[1]&&t.reverse(),t}function iF(t,e){return Yr(t,e,{includeMainTypes:tF})}var rF={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=Ct(),a={},s={};(n||i||r)&&(q(n,function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0}),q(i,function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0}),q(r,function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),o.each(function(t){var r=[];q(t.coordinateSystem.getCartesians(),function(t,e){(G(n,t.getAxis("x").model)>=0||G(i,t.getAxis("y").model)>=0)&&r.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:aF.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){q(t.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:aF.geo})})}},oF=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],aF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(yc(t)),e}},sF={lineX:tt(lF,0),lineY:tt(lF,1),rect:function(t,e,n){var i=e[JN[t]]([n[0][0],n[1][0]]),r=e[JN[t]]([n[0][1],n[1][1]]),o=[nF([i[0],r[0]]),nF([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:X(n,function(n){var r=e[JN[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r}),xyMinMax:i}}};function lF(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=nF(X([0,1],function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))})),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var uF={lineX:tt(cF,0),lineY:tt(cF,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return X(t,function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]})}};function cF(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function hF(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var dF,fF=eF,pF=q,gF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new gD(n.getZr()),this._brushController.on("brush",J(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new fF(vF(t),e,{include:["grid"]}).makePanelOpts(r,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return KN(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){mF[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new fF(vF(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}}),function(t,e){var n=KN(t);XN(e,function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}}),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)}),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=fT(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];pF(t,function(t,n){e.push(F(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(MN),mF={zoom:function(){this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!this._isZoomActive})},back:function(){this._dispatchZoomAction(function(t){var e=KN(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return XN(n,function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}}),i}(this.ecModel))}};function vF(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}dF=function(t){var e=t.getComponent("toolbox",0);if(e){var n=e.getModel(["feature","dataZoom"]),i=[],r=Yr(t,vF(n));return pF(r.xAxisModels,function(t){return o(t,"xAxis","xAxisIndex")}),pF(r.yAxisModels,function(t){return o(t,"yAxis","yAxisIndex")}),i}function o(t,e,r){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:"\0_ec_\0toolbox-dataZoom_"+e+o};a[r]=o,i.push(a)}},_t(null==Rd.get("dataZoom")&&dF),Rd.set("dataZoom",dF);var yF=gF,_F=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(dd);function bF(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function wF(t){if(w.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(o+="top:50%",a+="translateY(-50%) rotate("+("left"===r?-225:-45)+"deg)"):(o+="left:50%",a+="translateX(-50%) rotate("+("top"===r?225:45)+"deg)");var s=e+" solid 1px;";return'
'}(n.get("backgroundColor"),i,r)),it(t))o.innerHTML=t;else if(t){o.innerHTML="",et(t)||(t=[t]);for(var a=0;a=0;o--){var a=t[o];a&&(a instanceof ih&&(a=a.get("tooltip",!0)),it(a)&&(a={formatter:a}),a&&(i=new ih(a,i,r)))}return i}function BF(t,e){return t.dispatchAction||J(e.dispatchAction,e)}function HF(t){return"center"===t||"middle"===t}var jF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){if(!w.node){var n,i=t.getComponent("tooltip"),r=i.get("renderMode");this._renderMode="auto"===(n=r)?w.domSupported?"html":"richText":n||"html",this._tooltipContent="richText"===this._renderMode?new RF(e):new DF(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)})}},e.prototype.render=function(t,e,n){if(!w.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent");var i=this._tooltipContent;i.update(t),i.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");PR("itemTooltip",this._api,LF(function(e,n,i){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(n,i):"leave"===e&&this._hide(i))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!w.node){var r=BF(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(t,e,n){var i=qr(t).queryOptionMap,r=i.keys()[0];if(r&&"series"!==r){var o,a=Kr(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a)return n.getViewOfComponentModel(a).group.traverse(function(e){var n=Ls(e).tooltipConfig;if(n&&n.name===t.name)return o=e,!0}),o?{componentMainType:r,componentIndex:a.componentIndex,el:o}:void 0}}(i,e,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=VF;l.x=i.x,l.y=i.y,l.update(),Ls(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var u=VR(i,e),c=u.point[0],h=u.point[1];null!=c&&null!=h&&this._tryShow({offsetX:c,offsetY:h,target:u.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){!this._alwaysShowContent&&this._tooltipModel&&this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(BF(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s&&"axis"===zF([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;this._lastDataByCoordSys=null,Mm(n,function(t){return null!=Ls(t).dataIndex?(r=t,!0):null!=Ls(t).tooltipConfig?(o=t,!0):void 0},!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=J(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=[e.offsetX,e.offsetY],r=zF([e.tooltipOption],this._tooltipModel),o=this._renderMode,a=[],s=bp("section",{blocks:[],noHeader:!0}),l=[],u=new Tp;NF(t,function(t){NF(t.dataByAxis,function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var r=_R(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=bp("section",{header:r,noHeader:!bt(r),sortBlocks:!0,blocks:[]});s.blocks.push(c),q(t.seriesDataIndices,function(s){var h=n.getSeriesByIndex(s.seriesIndex),d=s.dataIndexInside,f=h.getDataParams(d);f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=_w(e.axis,{value:i}),f.axisValueLabel=r,f.marker=u.makeTooltipMarker("item",$h(f.color),o);var p=Yf(h.formatTooltip(d,!0,null));p.markupFragment&&c.blocks.push(p.markupFragment),p.markupText&&l.push(p.markupText),a.push(f)})}})}),s.blocks.reverse(),l.reverse();var c=e.position,h=r.get("order"),d=kp(s,u,o,h,n.get("useUTC"),r.get("textStyle"));d&&l.unshift(d);var f=l.join("richText"===o?"\n\n":"
");this._showOrMove(r,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(r,c,i[0],i[1],this._tooltipContent,a):this._showTooltipContent(r,f,a,Math.random()+"",i[0],i[1],c,null,u)})},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=Ls(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,c=s.getData(u),h=this._renderMode,d=t.positionDefault,f=zF([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=f.get("trigger");if(null==p||"item"===p){var g=s.getDataParams(l,u),m=new Tp;g.marker=m.makeTooltipMarker("item",$h(g.color),h);var v=Yf(s.formatTooltip(l,!1,u)),y=f.get("order"),_=v.markupFragment?kp(v.markupFragment,m,h,y,i.get("useUTC"),f.get("textStyle")):v.markupText,b="item_"+s.name+"_"+l;this._showOrMove(f,function(){this._showTooltipContent(f,_,g,b,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=Ls(e),r=i.tooltipConfig.option;it(r)&&(r={content:r,formatter:r});var o=[r],a=this._ecModel.getComponent(i.componentMainType,i.componentIndex);a&&o.push(a);var s=t.positionDefault,l=zF(o,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",h=new Tp;this._showOrMove(l,function(){var n=F(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,t.offsetX,t.offsetY,t.position,e,h)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,c=t.get("formatter");a=a||t.get("position");var h=e,d=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(c&&it(c)){var f=t.ecModel.get("useUTC"),p=et(n)?n[0]:n;h=c,p&&p.axisType&&p.axisType.indexOf("time")>=0&&(h=wh(p.axisValue,h,f)),h=qh(h,n,!0)}else if(nt(c)){var g=LF(function(e,i){e===this._ticket&&(u.setContent(i,l,t,d,a),this._updatePosition(t,a,r,o,u,n,s))},this);this._ticket=i,h=c(n,i,g)}u.setContent(h,l,t,d,a),u.show(t,d),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||et(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:et(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),c=t.get("align"),h=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),nt(e)&&(e=e([n,i],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),et(e))n=FF(e[0],s),i=FF(e[1],l);else if(at(e)){var f=e;f.width=u[0],f.height=u[1];var p=rd(f,{width:s,height:l});n=p.x,i=p.y,c=null,h=null}else if(it(e)&&a){var g=function(t,e,n){var i=n[0],r=n[1],o=0,a=0,s=e.width,l=e.height;switch(t){case"inside":o=e.x+s/2-i/2,a=e.y+l/2-r/2;break;case"top":o=e.x+s/2-i/2,a=e.y-r-10;break;case"bottom":o=e.x+s/2-i/2,a=e.y+l+10;break;case"left":o=e.x-i-10-5,a=e.y+l/2-r/2;break;case"right":o=e.x+s+10+5,a=e.y+l/2-r/2}return[o,a]}(e,d,u);n=g[0],i=g[1]}else g=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o+2>i?t-=l+o:t+=o),null!=a&&(e+u+a>r?e-=u+a:e+=a),[t,e]}(n,i,r,s,l,c?null:20,h?null:20),n=g[0],i=g[1];c&&(n-=HF(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=HF(h)?u[1]/2:"bottom"===h?u[1]:0),bF(t)&&(g=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,[t=Math.max(t,0),e=Math.max(e,0)]}(n,i,r,s,l),n=g[0],i=g[1]),r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&NF(e,function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&NF(r,function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&NF(r,function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){w.node||(this._tooltipContent.dispose(),NR("itemTooltip",e))},e.type="tooltip",e}(Gp),GF=["rect","polygon","keep","clear"];function UF(t,e){var n=Pr(t?t.brush:[]);if(n.length){var i=[];q(n,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))});var r=t&&t.toolbox;et(r)&&(r=r[0]),r||(t.toolbox=[r={feature:{}}]);var o,a,s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),u=l.type||(l.type=[]);u.push.apply(u,i),a={},q(o=u,function(t){a[t]=1}),o.length=0,q(a,function(t,e){o.push(e)}),e&&!u.length&&u.push.apply(u,GF)}}var WF=q;function YF(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function qF(t,e,n){var i={};return WF(e,function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);WF(t[e],function(t,i){if(gM.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new gM(r),"opacity"===i&&((r=F(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new gM(r))}})}),i}function XF(t,e,n){var i;q(n,function(t){e.hasOwnProperty(t)&&YF(e[t])&&(i=!0)}),i&&q(n,function(n){e.hasOwnProperty(n)&&YF(e[n])?t[n]=F(e[n]):delete t[n]})}var ZF={lineX:KF(0),lineY:KF(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Ov(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(Ov(i,r,o)||Ov(i,r+a,o)||Ov(i,r,o+s)||Ov(i,r+a,o+s)||$n.create(t).contain(l[0],l[1])||Ac(r,o,r+a,o,i)||Ac(r,o,r,o+s,i)||Ac(r+a,o,r+a,o+s,i)||Ac(r,o+s,r+a,o+s,i))||void 0}}};function KF(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e)return $F(e[t],i.range)},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&oV(e)}};function oV(t){return new $n(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var aV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,(this._brushController=new gD(e.getZr())).on("brush",J(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){tV(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:F(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:F(n),$from:e})},e.type="brush",e}(Gp);function sV(t,e){return V({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ih(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var lV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return m(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&XF(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=X(t,function(t){return sV(this.option,t)},this))},e.prototype.setBrushOption=function(t){this.brushOption=sV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(dd),uV=["rect","polygon","lineX","lineY","keep","clear"],cV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return m(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length}),this._brushType=i,this._brushMode=r,q(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return q(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:uV.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocale(["toolbox","brush","title"])}},e}(MN),hV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return m(e,t),e.type="title",e.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(dd),dV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=gt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Rs({style:Lc(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=t.get("subtext"),h=new Rs({style:Lc(o,{text:c,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,h.silent=!f&&!p,d&&l.on("click",function(){Qh(d,"_"+t.get("target"))}),f&&h.on("click",function(){Qh(f,"_"+t.get("subtarget"))}),Ls(l).eventData=Ls(h).eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=rd(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),h.setStyle(y),g=i.getBoundingRect();var _=v.margin,b=t.getItemStyle(["color","opacity"]);b.fill=t.get("backgroundColor");var w=new ks({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(w)}},e.type="title",e}(Gp),fV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return m(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],q(n,function(e,n){var i,o=Br(Nr(e),"");at(e)?(i=F(e)).value=n:i=n,t.push(i),r.push(o)})):t=n,(this._data=new ob([{name:"value",type:{category:"ordinal",time:"time",value:"number"}[i]||"number"}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(dd),pV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="timeline.slider",e.defaultOption=ah(fV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(fV);W(pV,Wf.prototype);var gV=pV,mV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="timeline",e}(Gp),vV=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return m(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(zw),yV=Math.PI,_V=Ur();function bV(t,e,n,i,r,o){var a=e.get("color");r?(r.setColor(a),n.add(r),o&&o.onUpdate(r)):((r=Vm(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(r),o&&o.onCreate(r));var s=e.getItemStyle(["color"]);r.setStyle(s),i=V({rectHover:!0,z2:100},i,!0);var l=t.get("symbolSize");l=l instanceof Array?l.slice():[+l,+l],i.scaleX=l[0]/2,i.scaleY=l[1]/2;var u=t.get("symbolOffset");u&&(i.x=i.x||0,i.y=i.y||0,i.x+=cr(u[0],l[0]),i.y+=cr(u[1],l[1]));var c=t.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,r.attr(i),r.updateTransform(),r}function wV(t,e,n,i,r,o){if(!t.dragging){var a=r.getModel("checkpointStyle"),s=i.dataToCoord(r.getData().get("value",n));if(o||!a.get("animation",!0))t.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};t.stopAnimation(null,!0),t.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}var xV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return bp("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},q(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](i,r,a,t)},this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:yV/2},d="vertical"===s?l.height:l.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=t.get(["label","rotate"])||0;y=y*yV/180;var _=f.get("position",!0),b=p&&f.get("showPlayBtn",!0),w=p&&f.get("showPrevBtn",!0),x=p&&f.get("showNextBtn",!0),k=0,S=d;"left"===_||"bottom"===_?(b&&(i=[0,0],k+=v),w&&(r=[k,0],k+=v),x&&(o=[S-g,0],S-=v)):(b&&(i=[S-g,0],S-=v),w&&(r=[0,0],k+=v),x&&(o=[S-g,0],S-=v));var C=[k,S];return t.get("inverse")&&C.reverse(),{viewRect:l,mainLength:d,orient:s,rotation:h[s],labelRotation:y,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||c[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:C,controlSize:g,controlGap:m}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;Ne(o,o,[-a,-s]),Fe(o,o,-yV/2),Ne(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=m(r),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=[n.x,n.y],d=[i.x,i.y];d[0]=h[0]=l[0][0];var f,p=t.labelPosOpt;function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}null==p||it(p)?(v(h,u,l,1,f="+"===p?0:1),v(d,c,l,1,1-f)):(v(h,u,l,1,f=p>=0?0:1),d[1]=h[1]+p),n.setPosition(h),i.setPosition(d),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Ab({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new $b({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Tb}}(e,i);r.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var a=new vV("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new Qi;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new Du({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:B({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new Du({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:H({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],q(a,function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),h={x:a,y:0,onclick:J(r._changeTimeline,r,t.value)},d=bV(s,l,e,h);d.ensureState("emphasis").style=u.getItemStyle(),d.ensureState("progress").style=c.getItemStyle(),xl(d);var f=Ls(d);s.get("tooltip")?(f.dataIndex=t.value,f.dataModel=i):f.dataIndex=f.dataModel=null,r._tickSymbols.push(d)})},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],q(a,function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),h=n.dataToCoord(i.tickValue),d=new Rs({x:h,y:0,rotation:t.labelRotation-t.rotation,onclick:J(r._changeTimeline,r,a),silent:!1,style:Lc(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});d.ensureState("emphasis").style=Lc(u),d.ensureState("progress").style=Lc(c),e.add(d),xl(d),_V(d).dataIndex=a,r._tickLabels.push(d)})}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(t,n,l,u){if(t){var c=ai(gt(i.get(["controlStyle",n+"BtnSize"]),r),r),h=function(t,e,n,i){var r=i.style,o=Cc(t.get(["controlStyle",e]),i||{},new $n(n[0],n[1],n[2],n[3]));return r&&o.setStyle(r),o}(i,n+"Icon",[0,-c/2,c,c],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});h.ensureState("emphasis").style=s,e.add(h),xl(h)}}c(t.nextBtnPosition,"next",J(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"prev",J(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,l?"stop":"play",J(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this;this._currentPointer=bV(a,a,this._mainGroup,{},this._currentPointer,{onCreate:function(t){t.draggable=!0,t.drift=J(s._handlePointerDrag,s),t.ondragend=J(s._handlePointerDragend,s),wV(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){wV(t,s._progressLine,o,n,i)}})},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=dr(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(h)),[a,c]}var PV={min:tt(OV,"min"),max:tt(OV,"max"),average:tt(OV,"average"),median:tt(OV,"median")};function RV(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!et(e.coord)&&i){var r=i.dimensions,o=LV(e,n,i,t);if((e=F(e)).type&&PV[e.type]&&o.baseAxis&&o.valueAxis){var a=G(r,o.baseAxis.dim),s=G(r,o.valueAxis.dim),l=PV[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;c<2;c++)PV[u[c]]&&(u[c]=VV(n,n.mapDimension(r[c]),u[c]));e.coord=u}}return e}function LV(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0&&"number"==typeof l&&(l=+l.toFixed(Math.min(p,20))),d.coord[c]=f.coord[c]=l,r=[d,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[RV(t,r[0]),RV(t,r[1]),B({},r[2])];return g[2].type=g[2].type||null,V(g[2],g[0]),V(g[2],g[1]),g};function YV(t){return!isNaN(t)&&!isFinite(t)}function qV(t,e,n,i){var r=1-t,o=i.dimensions[t];return YV(e[r])&&YV(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function XV(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(qV(1,n,i,t)||qV(0,n,i,t)))return!0}return NV(t,e[0])&&NV(t,e[1])}function ZV(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=cr(s.get("x"),r.getWidth()),u=cr(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var c=t.get((d=a.dimensions)[0],e),h=t.get(d[1],e);o=a.dataToPoint([c,h])}if(dk(a,"cartesian2d")){var d,f=a.getAxis("x"),p=a.getAxis("y");YV(t.get((d=a.dimensions)[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):YV(t.get(d[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var KV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=DV.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=UV(e).from,o=UV(e).to;r.each(function(e){ZV(r,e,!0,t,n),ZV(o,e,!1,t,n)}),i.each(function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new bI);this.group.add(l.group);var u=function(t,e,n){var i;i=t?X(t&&t.dimensions,function(t){return H({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var r=new ob(i,n),o=new ob(i,n),a=new ob([],n),s=X(n.get("data"),tt(WV,e,t,n));t&&(s=K(s,tt(XV,t)));var l=t?FV:function(t){return t.value};return r.initData(X(s,function(t){return t[0]}),null,l),o.initData(X(s,function(t){return t[1]}),null,l),a.initData(X(s,function(t){return t[2]})),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),c=u.from,h=u.to,d=u.line;UV(e).from=c,UV(e).to=h,e.setData(d);var f=e.get("symbol"),p=e.get("symbolSize"),g=e.get("symbolRotate"),m=e.get("symbolOffset");function v(e,n,r){var o=e.getItemModel(n);ZV(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=jg(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:gt(o.get("symbolOffset"),m[r?0:1]),symbolRotate:gt(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:gt(o.get("symbolSize"),p[r?0:1]),symbol:gt(o.get("symbol",!0),f[r?0:1]),style:s})}et(f)||(f=[f,f]),et(p)||(p=[p,p]),et(g)||(g=[g,g]),et(m)||(m=[m,m]),u.from.each(function(t){v(c,t,!0),v(h,t,!1)}),d.each(function(t){var e=d.getItemModel(t).getModel("lineStyle").getLineStyle();d.setItemLayout(t,[c.getItemLayout(t),h.getItemLayout(t)]),null==e.stroke&&(e.stroke=c.getItemVisual(t,"style").fill),d.setItemVisual(t,{fromSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(t,"symbolOffset"),fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(t,"symbolOffset"),toSymbolRotate:h.getItemVisual(t,"symbolRotate"),toSymbolSize:h.getItemVisual(t,"symbolSize"),toSymbol:h.getItemVisual(t,"symbol"),style:e})}),l.updateData(d),u.line.eachItemGraphicEl(function(t,n){t.traverse(function(t){Ls(t).dataModel=e})}),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(BV),$V=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(DV),QV=Ur(),JV=function(t,e,n,i){var r=RV(t,i[0]),o=RV(t,i[1]),a=r.coord,s=o.coord;a[0]=pt(a[0],-1/0),a[1]=pt(a[1],-1/0),s[0]=pt(s[0],1/0),s[1]=pt(s[1],1/0);var l=z([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function tz(t){return!isNaN(t)&&!isFinite(t)}function ez(t,e,n,i){var r=1-t;return tz(e[r])&&tz(n[r])}function nz(t,e){var n=e.coord[0],i=e.coord[1];return!!(dk(t,"cartesian2d")&&n&&i&&(ez(1,n,i)||ez(0,n,i)))||NV(t,{coord:n,x:e.x0,y:e.y0})||NV(t,{coord:i,x:e.x1,y:e.y1})}function iz(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=cr(s.get(n[0]),r.getWidth()),u=cr(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var c=[f=t.get(n[0],e),p=t.get(n[1],e)];a.clampData&&a.clampData(c,c),o=a.dataToPoint(c,!0)}if(dk(a,"cartesian2d")){var h=a.getAxis("x"),d=a.getAxis("y"),f=t.get(n[0],e),p=t.get(n[1],e);tz(f)?o[0]=h.toGlobalCoord(h.getExtent()["x0"===n[0]?0:1]):tz(p)&&(o[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var rz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],oz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=DV.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each(function(e){var r=X(rz,function(r){return iz(i,e,r,t,n)});i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)})}},this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Qi});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r;t?(i=X(t&&t.dimensions,function(t){var n=e.getData();return H({name:t},n.getDimensionInfo(n.mapDimension(t))||{})}),r=new ob(X(["x0","y0","x1","y1"],function(t,e){return{name:t,type:i[e%2].type}}),n)):r=new ob(i=[{name:"value",type:"float"}],n);var o=X(n.get("data"),tt(JV,e,t,n));return t&&(o=K(o,tt(nz,t))),r.initData(o,null,t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value}),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each(function(e){var n=X(rz,function(n){return iz(u,e,n,t,i)}),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),h=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],d=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];dr(h),dr(d),u.setItemLayout(e,{points:n,allClipped:!!(l[0]>h[1]||l[1]d[1]||c[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolSize:"auto",inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",decal:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit",shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(dd),sz=tt,lz=q,uz=Qi;function cz(t,e,n,i){fz(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),dz(t,e,n,i)}function hz(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;i0?2:0:u[h]=g}var d=e.getModel("lineStyle"),f=Kc.concat([["inactiveColor"],["inactiveWidth"]]),p={};for(c=0;c0?2:0:p[h]=g}if("auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!a){var m=e.get("inactiveBorderWidth"),v=u[t.indexOf("empty")>-1?"fill":"stroke"];u.lineWidth="auto"===m?r.lineWidth>0&&v?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),p.stroke=n.get("inactiveColor"),p.lineWidth=n.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=y||l||"roundRect",i,r.getModel("lineStyle"),a,s,f,m),b=new uz,w=i.getModel("textStyle");b.add("function"!=typeof t.getLegendIcon||y?((d=Vm(h=(c={itemWidth:p,itemHeight:g,symbolType:l,symbolKeepAspect:v,itemStyle:_.itemStyle,lineStyle:_.lineStyle}).symbolType||"roundRect",0,0,c.itemWidth,c.itemHeight,c.itemStyle.fill,c.symbolKeepAspect)).setStyle(c.itemStyle),h.indexOf("empty")>-1&&(d.style.stroke=d.style.fill,d.style.fill="#fff",d.style.lineWidth=2),d):t.getLegendIcon({itemWidth:p,itemHeight:g,symbolType:l,symbolKeepAspect:v,itemStyle:_.itemStyle,lineStyle:_.lineStyle}));var x="left"===o?p+5:-5,k=o,S=r.get("formatter"),C=e;"string"==typeof S&&S?C=S.replace("{name}",null!=e?e:""):"function"==typeof S&&(C=S(e));var A=i.get("inactiveColor");b.add(new Rs({style:Lc(w,{text:C,x:x,y:g/2,fill:m?w.getTextColor():A,align:k,verticalAlign:"middle"})}));var M=new ks({shape:b.getBoundingRect(),invisible:!0}),I=i.getModel("tooltip");return I.get("show")&&Tc({el:M,componentModel:r,itemName:e,itemTooltipOption:I.option}),b.add(M),b.eachChild(function(t){t.silent=!0}),M.silent=!u,this.getContentGroup().add(b),xl(b),b.__legendDataIndex=n,b},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();id(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){id("horizontal",s,t.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?h[f]+=l[p]+d:u[f]+=c[p]+d,h[1-f]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[p]=l[p]+d+c[p],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-f]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Gp);function gz(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var n=0;nn[r],p=[-h.x,-h.y];e||(p[i]=l[s]);var g=[0,0],m=[-d.x,-d.y],v=gt(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?m[i]+=n[r]-d[r]:g[i]+=d[r]+v),m[1-i]+=h[o]/2-d[o]/2,l.setPosition(p),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[r]=f?n[r]:h[r],y[o]=Math.max(h[o],d[o]),y[a]=Math.min(0,d[a]+m[1-i]),u.__rectSize=n[r],f){var _={x:0,y:0};_[r]=Math.max(n[r]-d[r]-v,0),_[o]=y[o],u.setClipPath(new ks({shape:_})),u.__rectSize=_[r]}else c.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(t);return null!=b.pageIndex&&dc(l,{x:b.contentPosition[0],y:b.contentPosition[1]},f?t:null),this._updatePageInfoView(t,b),y},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;q(["pagePrev","pageNext"],function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",t.get(r?"pageIconColor":"pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",it(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=wz[r],a=xz[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=c;++p)(!(v=y(l[p]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;p>=-1;--p)(v=y(l[p]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild(function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)}),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(pz);function Sz(t){I_(vz),t.registerComponentModel(_z),t.registerComponentView(kz),function(t){t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})}(t)}var Cz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="dataZoom.inside",e.defaultOption=ah(mN.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(mN),Az=Ur();function Mz(t,e,n){Az(t).coordSysRecordMap.each(function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)})}function Iz(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function Tz(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function Dz(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}var Ez=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return m(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Mz(i,e,{pan:J(Oz.pan,this),zoom:J(Oz.zoom,this),scrollMove:J(Oz.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=Az(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return fT(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:Pz(function(t,e,n,i,r,o){var a=Rz[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength}),scrollMove:Pz(function(t,e,n,i,r,o){return Rz[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta})};function Pz(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return fT(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var Rz={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}},Lz=Ez;function Nz(t){CN(t),t.registerComponentModel(Cz),t.registerComponentView(Lz),function(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=Az(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=Ct());i.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(t){q(fN(t).infoList,function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:tt(Dz,e),dispatchAction:tt(Tz,t),dataZoomInfoMap:null,controller:null},i=n.controller=new kC(t.getZr());return q(["pan","zoom","scrollMove"],function(t){i.on(t,function(e){var i=[];n.dataZoomInfoMap.each(function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}}),i.length&&n.dispatchAction(i)})}),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=Ct())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})})}),i.each(function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each(function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),rg(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else Iz(i,t)})})}(t)}var Fz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=ah(mN.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(mN),Vz=ks,zz="horizontal",Bz="vertical",Hz=["line","bar","candlestick","scatter"],jz={easing:"cubicOut",duration:100};function Gz(t){return"vertical"===t?"ns-resize":"ew-resize"}var Uz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return m(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=J(this._onBrush,this),this._onBrushEnd=J(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),rg(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){var t;(t=this._dispatchZoomAction)&&t[tg]&&(this._dispatchZoomAction=t[tg]);var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new Qi;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===zz?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=ld(t.option);q(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var s=rd(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===Bz&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==zz||r?n===zz&&r?{scaleY:a?1:-1,scaleX:-1}:n!==Bz||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new Vz({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new Vz({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:J(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[[e[0],0],[0,0]],c=[],h=e[0]/(i.count()-1),d=0,f=Math.round(i.count()/e[0]);i.each([r],function(t,e){if(f>0&&e%f)d+=h;else{var n=null==t||isNaN(t)||""===t,i=n?0:ur(t,o,l,!0);n&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!n&&s&&(u.push([d,0]),c.push([d,0])),u.push([d,i]),c.push([d,i]),d+=h,s=n}});for(var p=this.dataZoomModel,g=0;g<3;g++){var m=v(1===g);this._displayables.sliderGroup.add(m),this._displayables.dataShadowSegs.push(m)}}}function v(t){var e=p.getModel(t?"selectedDataBackground":"dataBackground"),n=new Qi,i=new ku({shape:{points:u},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Au({shape:{points:c},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis(function(r,o){q(t.getAxisProxy(r,o).getTargetSeriesModels(),function(t){if(!(n||!0!==e&&G(Hz,t.get("type"))<0)){var a,s=i.getComponent(dN(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=e.filler=new Vz({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new Vz({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),q([0,1],function(e){var o=a.get("handleIcon");!Lm[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Vm(o,-1,0,2,2,null,!0);s.attr({cursor:Gz(this._orient),draggable:!0,drift:J(this._onDragMove,this,e),ondragend:J(this._onDragEnd,this),onmouseover:J(this._showDataInfo,this,!0),onmouseout:J(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=cr(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),xl(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[e]=s);var h=a.getModel("textStyle");t.add(i[e]=new Rs({silent:!0,invisible:!0,style:Lc(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))},this);var h=c;if(u){var d=cr(a.get("moveHandleSize"),o[1]),f=e.moveHandle=new ks({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),p=.8*d,g=e.moveHandleIcon=Vm(a.get("moveHandleIcon"),-p/2,-p/2,p,p,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(d,10));(h=e.moveZone=new ks({invisible:!0,shape:{y:o[1]-m,height:d+m}})).on("mouseover",function(){s.enterEmphasis(f)}).on("mouseout",function(){s.leaveEmphasis(f)}),r.add(f),r.add(g),r.add(h)}h.attr({draggable:!0,cursor:Gz(this._orient),drift:J(this._onDragMove,this,"all"),ondragstart:J(this._showDataInfo,this,!0),ondragend:J(this._onDragEnd,this),onmouseover:J(this._showDataInfo,this,!0),onmouseout:J(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[ur(t[0],[0,100],e,!0),ur(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];fT(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?ur(o.minSpan,a,r,!0):null,null!=o.maxSpan?ur(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=dr([ur(i[0],r,a,!0),ur(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=dr(n.slice()),r=this._size;q([0,1],function(t){var i=this._handleHeight;e.handles[t].attr({scaleX:i/2,scaleY:i/2,x:n[t]+(t?-1:1),y:r[1]/2-i/2})},this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=this._updateInterval("all",n[0]-(i[0]+i[1])/2);this._updateView(),r&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){this._brushStart=new jn(t.offsetX,t.offsetY),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=dr([ur(n.x,i,r,!0),ur(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ye(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=n.brushRect;i||(i=n.brushRect=new Vz({silent:!0,style:this.dataZoomModel.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var r=this._brushStart,o=this._displayables.sliderGroup,a=o.transformCoordToLocal(t,e),s=o.transformCoordToLocal(r.x,r.y),l=this._size;a[0]=Math.max(Math.min(l[0],a[0]),0),i.setShape({x:s[0],y:0,width:a[0]-s[0],height:l[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?jz:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=fN(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(yN);function Wz(t){t.registerComponentModel(Fz),t.registerComponentView(Uz),CN(t)}var Yz={get:function(t,e,n){var i=F((qz[t]||{})[e]);return n&&et(i)?i[i.length-1]:i}},qz={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Xz=Yz,Zz=gM.mapVisual,Kz=gM.eachVisual,$z=et,Qz=q,Jz=dr,tB=ur,eB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return m(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;w.canvasSupported||(n.realtime=!1),!e&&XF(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=J(t,this),this.controllerVisuals=qF(this.option.controller,e,t),this.targetVisuals=qF(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,n){e.push(n)}):e=Pr(t),e},e.prototype.eachTargetSeries=function(t,e){q(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)},this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries(function(n){n===t&&(e=!0)}),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],et(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return it(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):nt(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=Jz([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimension=function(t){var e=this.option.dimension;if(null!=e||t.dimensions.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i];if(!t.getDimensionInfo(r).isCalculationCoord)return r}}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});V(i,n),V(r,n);var o=this.isCategory();function a(n){$z(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),(function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},Qz(i,function(t,e){if(gM.isValidType(e)){var n=Xz.get(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}).call(this,i,"inRange","outOfRange"),(function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";Qz(this.stateList,function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&F(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&F(n)||(o?s[0]:[s[0],s[0]])),l.symbol=Zz(l.symbol,function(t){return"none"===t?r:t});var u=l.symbolSize;if(null!=u){var c=-1/0;Kz(u,function(t){t>c&&(c=t)}),l.symbolSize=Zz(u,function(t){return tB(t,[0,c],[0,s[0]],!0)})}},this)}).call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(dd),nB=[20,140];function iB(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,r=n[0],o=[],a=0;a<=200&&re[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),q(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=dr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries(function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)},this),e.push({seriesId:n.id,dataIndex:i})},this),e},e.prototype.getVisualMeta=function(t){var e=iB(0,0,this.getExtent()),n=iB(0,0,this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Qi("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();cB([0,1],function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var c=uB(t[l],[0,a[1]],s,!0),h=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=h/a[0],u.x=a[0]-h/2;var d=_c(n.handleLabelPoints[l],yc(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),h=this.getControllerVisual(t,"symbolSize"),d=uB(t,o,s,!0),f=a[0]-h/2,p={x:u.x,y:u.y};u.y=d,u.x=f;var g=_c(l.indicatorLabelPoint,yc(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:y?v:"middle",align:y?"center":v});var _={x:f,y:d,style:{fill:c}},b={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=p.x,u.y=p.y,u.animateTo(_,w),m.animateTo(b,w)}else u.attr(_),m.attr(b);this._firstShowIndicator=!1;var x=this._shapes.handleLabels;if(x)for(var k=0;ki[1]&&(l[1]=1/0),e&&(l[0]===-1/0?this._showIndicator(s,l[1],"< ",o):l[1]===1/0?this._showIndicator(s,l[0],"> ",o):this._showIndicator(s,s,"\u2248 ",o));var u=this._hoverLinkDataIndices,c=[];(e||pB(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var h=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),t.registerAction(vB,yB),q(_B,function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)}),t.registerPreprocessor(xB))}function AB(t){t.registerComponentModel(rB),t.registerComponentView(mB),CB(t)}var MB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return m(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],IB[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=F(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=X(this._pieceList,function(t){return t=F(t),"inRange"!==e&&(t.visual=null),t}))})},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=gM.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}q(e.pieces,function(t){q(i,function(e){t.hasOwnProperty(e)&&(n[e]=1)})}),q(n,function(t,n){var i=!1;q(this.stateList,function(t){i=i||o(e,t,n)||o(e.target,t,n)},this),!i&&q(this.stateList,function(t){(e[t]||(e[t]={}))[n]=Xz.get(n,"inRange"===t?"active":"inactive",r)})},this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,q(i,function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)},this),"single"===n.selectedMode){var o=!1;q(i,function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=F(t)},e.prototype.getValueState=function(t){var e=gM.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries(function(i){var r=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){gM.findPieceIndex(e,n)===t&&r.push(i)},this),e.push({seriesId:i.id,dataIndex:r})},this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return q(r,function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])},this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=ah(eB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(eB),IB={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","\u2265"][e[0]]])},this)}};function TB(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var DB=MB,EB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return m(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,c=pt(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,c,a),q(l.viewPieceList,function(i){var l=i.piece,u=new Qi;u.onclick=J(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=e.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new Rs({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===d?.5:1}}))}t.add(u)},this),u&&this._renderEndsText(t,u[1],s,c,a),id(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:lB(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return sB(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new Qi,a=this.visualMapModel.textStyleModel;o.add(new Rs({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=X(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(Vm(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=F(n.selected),r=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[r]=!0,q(i,function(t,e){i[e]=e===r})):i[r]=!i[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},e.type="visualMap.piecewise",e}(oB);function OB(t){t.registerComponentModel(DB),t.registerComponentView(EB),CB(t)}var PB={label:{enabled:!0},decal:{show:!1}},RB=Ur(),LB={};function NB(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=F(PB);V(i.label,t.getLocaleModel().get("aria"),!1),V(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=Ct();t.eachSeries(function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||e.set(t.type,n={}),RB(t).scope=n}}),t.eachRawSeries(function(e){if(!t.isSeriesFiltered(e))if("function"!=typeof e.enableAriaDecal){var n=e.getData();if(e.useColorPaletteOnData){var i=e.getRawData(),r={},o=RB(e).scope;n.each(function(t){var e=n.getRawIndex(t);r[e]=t});var a=i.count();i.each(function(t){var s=r[t],l=i.getName(t)||t+"",c=Vd(e.ecModel,l,o,a),h=n.getItemVisual(s,"decal");n.setItemVisual(s,"decal",u(h,c))})}else{var s=Vd(e.ecModel,e.name,LB,t.getSeriesCount()),l=n.getVisual("decal");n.setVisual("decal",u(l,s))}}else e.enableAriaDecal();function u(t,e){var n=t?B(B({},e),t):e;return n.dirty=!0,n}})}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=H(o.option,i),o.get("enabled")){var a=e.getZr().dom;if(o.get("description"))a.setAttribute("aria-label",o.get("description"));else{var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,c=o.get(["series","maxCount"])||10,h=Math.min(l,c);if(!(l<1)){var d=function(){var e=t.get("title");return e&&e.length&&(e=e[0]),e&&e.text}();s=d?r(o.get(["general","withTitle"]),{title:d}):o.get(["general","withoutTitle"]);var f=[];s+=r(o.get(l>1?["series","multiple","prefix"]:["series","single","prefix"]),{seriesCount:l}),t.eachSeries(function(e,n){if(n1?["series","multiple",a]:["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"\u81ea\u5b9a\u4e49\u56fe")});var s=e.getData();s.count()>u?i+=r(o.get(["data","partialData"]),{displayCnt:u}):i+=o.get(["data","allData"]);for(var c=[],d=0;d":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},zB=function(){function t(t){null==(this._condVal=it(t)?new RegExp(t):dt(t)?t:null)&&Kf("")}return t.prototype.evaluate=function(t){var e=typeof t;return"string"===e?this._condVal.test(t):"number"===e&&this._condVal.test(t+"")},t}(),BB=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),HB=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e=200&&e.status<=299}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var s=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype?function(t,e,n){var s=i.URL||i.webkitURL,l=document.createElement("a");l.download=e=e||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin!==location.origin?o(l.href)?r(t,e,n):a(l,l.target="_blank"):a(l)):(l.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){a(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(o(t))r(t,e,n);else{var i=document.createElement("a");i.href=t,i.target="_blank",setTimeout(function(){a(i)})}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var a="application/octet-stream"===t.type,s=/constructor/i.test(i.HTMLElement)||i.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&s)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},u.readAsDataURL(t)}else{var c=i.URL||i.webkitURL,h=c.createObjectURL(t);o?o.location=h:location.href=h,o=null,setTimeout(function(){c.revokeObjectURL(h)},4e4)}});i.saveAs=s.saveAs=s,t.exports=s},ls82:function(t,e,n){var i=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(E){l=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=Object.create((e&&e.prototype instanceof m?e:m).prototype),o=new I(i||[]);return r._invoke=function(t,e,n){var i=h;return function(r,o){if(i===f)throw new Error("Generator is already running");if(i===p){if("throw"===r)throw o;return D()}for(n.method=r,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=f;var l=c(t,e,n);if("normal"===l.type){if(i=n.done?p:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=p,n.method="throw",n.arg=l.arg)}}}(t,n,o),r}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(E){return{type:"throw",arg:E}}}t.wrap=u;var h="suspendedStart",d="suspendedYield",f="executing",p="completed",g={};function m(){}function v(){}function y(){}var _={};_[o]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==n&&i.call(w,o)&&(_=w);var x=y.prototype=m.prototype=Object.create(_);function k(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function S(t,e){function n(r,o,a,s){var l=c(t[r],t,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==typeof h&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,a,s)},function(t){n("throw",t,a,s)}):e.resolve(h).then(function(t){u.value=t,a(u)},function(t){return n("throw",t,a,s)})}s(l.arg)}var r;this._invoke=function(t,i){function o(){return new e(function(e,r){n(t,i,e,r)})}return r=r?r.then(o,o):o()}}function C(t,n){var i=t.iterator[n.method];if(i===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=c(i,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,g;var o=r.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;M(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:T(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=i}catch(r){Function("r","regeneratorRuntime = r")(i)}},o0o1:function(t,e,n){t.exports=n("ls82")},zUnb:function(t,e,n){"use strict";function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e,n){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(l){r=!0,o=l}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}}(t,e)||m(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e,n){return(w=c()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&l(r,n.prototype),r}).apply(null,arguments)}function x(t){var e="function"==typeof Map?new Map:void 0;return(x=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return w(t,arguments,i(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,t)})(t)}n.r(e);var k=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}();function S(t){return null!==t&&"object"==typeof t}function C(t){return"function"==typeof t}var A=function(){function t(t){return Error.call(this),this.message=t?"".concat(t.length," errors occurred during unsubscription:\n").concat(t.map(function(t,e){return"".concat(e+1,") ").concat(t.toString())}).join("\n ")):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),M=function(){var t=function(){function t(e){o(this,t),this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return s(t,[{key:"unsubscribe",value:function(){var e;if(!this.closed){var n=this._parentOrParents,i=this._ctorUnsubscribe,r=this._unsubscribe,o=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof e?function(i){return i.pipe(st(function(n,i){return it(t(n,i)).pipe(q(function(t,r){return e(n,t,i,r)}))},n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new lt(t,n))})}var lt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;o(this,t),this.project=e,this.concurrent=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new ut(t,this.project,this.concurrent))}}]),t}(),ut=function(t){u(n,t);var e=p(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return o(this,n),(r=e.call(this,t)).project=i,r.concurrent=a,r.hasCompleted=!1,r.buffer=[],r.active=0,r.index=0,r}return s(n,[{key:"_next",value:function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(ot);function ct(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return st(F,t)}function ht(t,e){return e?nt(t,e):new z(K(t))}function dt(){for(var t=Number.POSITIVE_INFINITY,e=null,n=arguments.length,i=new Array(n),r=0;r1&&"number"==typeof i[i.length-1]&&(t=i.pop())):"number"==typeof o&&(t=i.pop()),null===e&&1===i.length&&i[0]instanceof z?i[0]:ct(t)(ht(i,e))}function ft(){return function(t){return t.lift(new pt(t))}}var pt=function(){function t(e){o(this,t),this.connectable=e}return s(t,[{key:"call",value:function(t,e){var n=this.connectable;n._refCount++;var i=new gt(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}]),t}(),gt=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).connectable=i,r}return s(n,[{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}else this.connection=null}}]),n}(R),mt=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).source=t,r.subjectFactory=i,r._refCount=0,r._isComplete=!1,r}return s(n,[{key:"_subscribe",value:function(t){return this.getSubject().subscribe(t)}},{key:"getSubject",value:function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}},{key:"connect",value:function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new M).add(this.source.subscribe(new yt(this.getSubject(),this))),t.closed&&(this._connection=null,t=M.EMPTY)),t}},{key:"refCount",value:function(){return ft()(this)}}]),n}(z),vt=function(){var t=mt.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),yt=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).connectable=i,r}return s(n,[{key:"_error",value:function(t){this._unsubscribe(),r(i(n.prototype),"_error",this).call(this,t)}},{key:"_complete",value:function(){this.connectable._isComplete=!0,this._unsubscribe(),r(i(n.prototype),"_complete",this).call(this)}},{key:"_unsubscribe",value:function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}]),n}(G);function _t(){return new U}function bt(t){for(var e in t)if(t[e]===bt)return e;throw Error("Could not find renamed property on target object.")}function wt(t,e){for(var n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function xt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(xt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return"".concat(t.overriddenName);if(t.name)return"".concat(t.name);var e=t.toString();if(null==e)return""+e;var n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function kt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}var St=bt({__forward_ref__:bt});function Ct(t){return t.__forward_ref__=Ct,t.toString=function(){return xt(this())},t}function At(t){return Mt(t)?t():t}function Mt(t){return"function"==typeof t&&t.hasOwnProperty(St)&&t.__forward_ref__===Ct}var It=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,function(t,e){var n=t?"NG0".concat(t,": "):"";return"".concat(n).concat(e)}(t,i))).code=t,r}return n}(x(Error));function Tt(t){return"string"==typeof t?t:null==t?"":String(t)}function Dt(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Tt(t)}function Et(t,e){var n=e?" in ".concat(e):"";throw new It("201","No provider for ".concat(Dt(t)," found").concat(n))}function Ot(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Pt(t){return{providers:t.providers||[],imports:t.imports||[]}}function Rt(t){return Lt(t,Vt)||Lt(t,Bt)}function Lt(t,e){return t.hasOwnProperty(e)?t[e]:null}function Nt(t){return t&&(t.hasOwnProperty(zt)||t.hasOwnProperty(Ht))?t[zt]:null}var Ft,Vt=bt({"\u0275prov":bt}),zt=bt({"\u0275inj":bt}),Bt=bt({ngInjectableDef:bt}),Ht=bt({ngInjectorDef:bt}),jt=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function Gt(){return Ft}function Ut(t){var e=Ft;return Ft=t,e}function Wt(t,e,n){var i=Rt(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:n&jt.Optional?null:void 0!==e?e:void Et(xt(t),"Injector")}function Yt(t){return{toString:t}.toString()}var qt=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),Xt=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({}),Zt="undefined"!=typeof globalThis&&globalThis,Kt="undefined"!=typeof window&&window,$t="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Qt="undefined"!=typeof global&&global,Jt=Zt||Qt||Kt||$t,te={},ee=[],ne=[],ie=bt({"\u0275cmp":bt}),re=bt({"\u0275dir":bt}),oe=bt({"\u0275pipe":bt}),ae=bt({"\u0275mod":bt}),se=bt({"\u0275loc":bt}),le=bt({"\u0275fac":bt}),ue=bt({__NG_ELEMENT_ID__:bt}),ce=0;function he(t){return Yt(function(){var e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===qt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||ne,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||Xt.Emulated,id:"c",styles:t.styles||ne,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,o=t.pipes;return n.id+=ce++,n.inputs=me(t.inputs,e),n.outputs=me(t.outputs),r&&r.forEach(function(t){return t(n)}),n.directiveDefs=i?function(){return("function"==typeof i?i():i).map(de)}:null,n.pipeDefs=o?function(){return("function"==typeof o?o():o).map(fe)}:null,n})}function de(t){return _e(t)||function(t){return t[re]||null}(t)}function fe(t){return function(t){return t[oe]||null}(t)}var pe={};function ge(t){var e={type:t.type,bootstrap:t.bootstrap||ne,declarations:t.declarations||ne,imports:t.imports||ne,exports:t.exports||ne,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&Yt(function(){pe[t.id]=t.type}),e}function me(t,e){if(null==t)return te;var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),n[r]=i,e&&(e[r]=o)}return n}var ve=he;function ye(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function _e(t){return t[ie]||null}function be(t,e){var n=t[ae]||null;if(!n&&!0===e)throw new Error("Type ".concat(xt(t)," does not have '\u0275mod' property."));return n}var we=20,xe=10;function ke(t){return Array.isArray(t)&&"object"==typeof t[1]}function Se(t){return Array.isArray(t)&&!0===t[1]}function Ce(t){return 0!=(8&t.flags)}function Ae(t){return 2==(2&t.flags)}function Me(t){return 1==(1&t.flags)}function Ie(t){return null!==t.template}function Te(t,e){return t.hasOwnProperty(le)?t[le]:null}var De=function(){function t(e,n,i){o(this,t),this.previousValue=e,this.currentValue=n,this.firstChange=i}return s(t,[{key:"isFirstChange",value:function(){return this.firstChange}}]),t}();function Ee(){return Oe}function Oe(t){return t.type.prototype.ngOnChanges&&(t.setInput=Re),Pe}function Pe(){var t=Le(this),e=null==t?void 0:t.current;if(e){var n=t.previous;if(n===te)t.previous=e;else for(var i in e)n[i]=e[i];t.current=null,this.ngOnChanges(e)}}function Re(t,e,n,i){var r=Le(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:te,current:null}),o=r.current||(r.current={}),a=r.previous,s=this.declaredInputs[n],l=a[s];o[s]=new De(l&&l.currentValue,e,a===te),t[i]=e}function Le(t){return t.__ngSimpleChanges__||null}Ee.ngInherit=!0;var Ne="http://www.w3.org/2000/svg",Fe=void 0;function Ve(){return void 0!==Fe?Fe:"undefined"!=typeof document?document:void 0}function ze(t){return!!t.listen}var Be={createRenderer:function(t,e){return Ve()}};function He(t){for(;Array.isArray(t);)t=t[0];return t}function je(t,e){return He(e[t])}function Ge(t,e){return He(e[t.index])}function Ue(t,e){return t.data[e]}function We(t,e){return t[e]}function Ye(t,e){var n=e[t];return ke(n)?n:n[0]}function qe(t){var e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function Xe(t){return 4==(4&t[2])}function Ze(t){return 128==(128&t[2])}function Ke(t,e){return null==e?null:t[e]}function $e(t){t[18]=0}function Qe(t,e){t[5]+=e;for(var n=t,i=t[3];null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}var Je={lFrame:Sn(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function tn(){return Je.bindingsEnabled}function en(){return Je.lFrame.lView}function nn(){return Je.lFrame.tView}function rn(t){Je.lFrame.contextLView=t}function on(){for(var t=an();null!==t&&64===t.type;)t=t.parent;return t}function an(){return Je.lFrame.currentTNode}function sn(t,e){var n=Je.lFrame;n.currentTNode=t,n.isParent=e}function ln(){return Je.lFrame.isParent}function un(){Je.lFrame.isParent=!1}function cn(){return Je.isInCheckNoChangesMode}function hn(t){Je.isInCheckNoChangesMode=t}function dn(){var t=Je.lFrame,e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function fn(){return Je.lFrame.bindingIndex}function pn(){return Je.lFrame.bindingIndex++}function gn(t){var e=Je.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function mn(t){Je.lFrame.currentDirectiveIndex=t}function vn(t){var e=Je.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function yn(){return Je.lFrame.currentQueryIndex}function _n(t){Je.lFrame.currentQueryIndex=t}function bn(t){var e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function wn(t,e,n){if(n&jt.SkipSelf){for(var i=e,r=t;!(null!==(i=i.parent)||n&jt.Host||null===(i=bn(r))||(r=r[15],10&i.type)););if(null===i)return!1;e=i,t=r}var o=Je.lFrame=kn();return o.currentTNode=e,o.lView=t,!0}function xn(t){var e=kn(),n=t[1];Je.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function kn(){var t=Je.lFrame,e=null===t?null:t.child;return null===e?Sn(t):e}function Sn(t){var e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Cn(){var t=Je.lFrame;return Je.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var An=Cn;function Mn(){var t=Cn();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function In(t){return(Je.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,Je.lFrame.contextLView))[8]}function Tn(){return Je.lFrame.selectedIndex}function Dn(t){Je.lFrame.selectedIndex=t}function En(){var t=Je.lFrame;return Ue(t.tView,t.selectedIndex)}function On(){Je.lFrame.currentNamespace=Ne}function Pn(){Je.lFrame.currentNamespace=null}function Rn(t,e){for(var n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[s]<0&&(t[18]+=65536),(a>11>16&&(3&t[2])===e){t[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}var Bn=-1,Hn=function t(e,n,i){o(this,t),this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=i};function jn(t,e,n){for(var i=ze(t),r=0;re){a=o-1;break}}}for(;o>16,i=e;n>0;)i=i[15],n--;return i}var Kn=!0;function $n(t){var e=Kn;return Kn=t,e}var Qn=0;function Jn(t,e){var n=ei(t,e);if(-1!==n)return n;var i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,ti(i.data,t),ti(e,null),ti(i.blueprint,null));var r=ni(t,e),o=t.injectorIndex;if(qn(r))for(var a=Xn(r),s=Zn(r,e),l=s[1].data,u=0;u<8;u++)e[o+u]=s[a+u]|l[a+u];return e[o+8]=r,o}function ti(t,e){t.push(0,0,0,0,0,0,0,0,e)}function ei(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function ni(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;for(var n=0,i=null,r=e;null!==r;){var o=r[1],a=o.type;if(null===(i=2===a?o.declTNode:1===a?r[6]:null))return Bn;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return Bn}function ii(t,e,n){!function(t,e,n){var i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(ue)&&(i=n[ue]),null==i&&(i=n[ue]=Qn++);var r=255&i;e.data[t+(r>>5)]|=1<3&&void 0!==arguments[3]?arguments[3]:jt.Default,r=arguments.length>4?arguments[4]:void 0;if(null!==t){var o=di(n);if("function"==typeof o){if(!wn(e,t,i))return i&jt.Host?ri(r,n,i):oi(e,n,i,r);try{var a=o();if(null!=a||i&jt.Optional)return a;Et(n)}finally{An()}}else if("number"==typeof o){var s=null,l=ei(t,e),u=Bn,c=i&jt.Host?e[16][6]:null;for((-1===l||i&jt.SkipSelf)&&((u=-1===l?ni(t,e):e[l+8])!==Bn&&pi(i,!1)?(s=e[1],l=Xn(u),e=Zn(u,e)):l=-1);-1!==l;){var h=e[1];if(fi(o,l,h.data)){var d=ui(l,e,n,s,i,c);if(d!==si)return d}(u=e[l+8])!==Bn&&pi(i,e[1].data[l+8]===c)&&fi(o,l,e)?(s=h,l=Xn(u),e=Zn(u,e)):l=-1}}}return oi(e,n,i,r)}var si={};function li(){return new gi(on(),en())}function ui(t,e,n,i,r,o){var a=e[1],s=a.data[t+8],l=ci(s,a,n,null==i?Ae(s)&&Kn:i!=a&&0!=(3&s.type),r&jt.Host&&o===s);return null!==l?hi(e,a,l,s):si}function ci(t,e,n,i,r){for(var o=t.providerIndexes,a=e.data,s=1048575&o,l=t.directiveStart,u=o>>20,c=r?s+u:t.directiveEnd,h=i?s:s+u;h=l&&d.type===n)return h}if(r){var f=a[l];if(f&&Ie(f)&&f.type===n)return l}return null}function hi(t,e,n,i){var r=t[n],o=e.data;if(r instanceof Hn){var a=r;a.resolving&&function(t,e){throw new It("200","Circular dependency in DI detected for ".concat(t).concat(""))}(Dt(o[n]));var s=$n(a.canSeeViewProviders);a.resolving=!0;var l=a.injectImpl?Ut(a.injectImpl):null;wn(t,i,jt.Default);try{r=t[n]=a.factory(void 0,o,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){var i=e.type.prototype,r=i.ngOnInit,o=i.ngDoCheck;if(i.ngOnChanges){var a=Oe(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,a),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,a)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,r),o&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,o),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,o))}(n,o[n],e)}finally{null!==l&&Ut(l),$n(s),a.resolving=!1,An()}}return r}function di(t){if("string"==typeof t)return t.charCodeAt(0)||0;var e=t.hasOwnProperty(ue)?t[ue]:void 0;return"number"==typeof e?e>=0?255&e:li:e}function fi(t,e,n){return!!(n[e+(t>>5)]&1<=t.length?t.push(n):t.splice(e,0,n)}function Mi(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Ii(t,e){for(var n=[],i=0;i=0?t[1|i]=n:function(t,e,n,i){var r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i=~i,e,n),i}function Di(t,e){var n=Ei(t,e);if(n>=0)return t[1|n]}function Ei(t,e){return function(t,e,n){for(var i=0,r=t.length>>1;r!==i;){var o=i+(r-i>>1),a=t[o<<1];if(e===a)return o<<1;a>e?r=o:i=o+1}return~(r<<1)}(t,e)}var Oi={},Pi=/\n/gm,Ri="__source",Li=bt({provide:String,useValue:bt}),Ni=void 0;function Fi(t){var e=Ni;return Ni=t,e}function Vi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jt.Default;if(void 0===Ni)throw new Error("inject() must be called from an injection context");return null===Ni?Wt(t,void 0,e):Ni.get(t,e&jt.Optional?null:void 0,e)}function zi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jt.Default;return(Gt()||Vi)(At(t),e)}var Bi=zi;function Hi(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:null;t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;var r=xt(e);if(Array.isArray(e))r=e.map(xt).join(" -> ");else if("object"==typeof e){var o=[];for(var a in e)if(e.hasOwnProperty(a)){var s=e[a];o.push(a+":"+("string"==typeof s?JSON.stringify(s):xt(s)))}r="{".concat(o.join(", "),"}")}return"".concat(n).concat(i?"("+i+")":"","[").concat(r,"]: ").concat(t.replace(Pi,"\n "))}("\n"+t.message,r,n,i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}var Ui,Wi,Yi=ji(bi("Inject",function(t){return{token:t}}),-1),qi=ji(bi("Optional"),8),Xi=ji(bi("SkipSelf"),4);function Zi(t){var e;return(null===(e=function(){if(void 0===Ui&&(Ui=null,Jt.trustedTypes))try{Ui=Jt.trustedTypes.createPolicy("angular",{createHTML:function(t){return t},createScript:function(t){return t},createScriptURL:function(t){return t}})}catch(e){}return Ui}())||void 0===e?void 0:e.createHTML(t))||t}function Ki(t){var e;return(null===(e=function(){if(void 0===Wi&&(Wi=null,Jt.trustedTypes))try{Wi=Jt.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:function(t){return t},createScript:function(t){return t},createScriptURL:function(t){return t}})}catch(e){}return Wi}())||void 0===e?void 0:e.createHTML(t))||t}var $i=function(){function t(e){o(this,t),this.changingThisBreaksApplicationSecurity=e}return s(t,[{key:"toString",value:function(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see https://g.co/ng/security#xss)"}}]),t}(),Qi=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"HTML"}}]),n}($i),Ji=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"Style"}}]),n}($i),tr=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"Script"}}]),n}($i),er=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"URL"}}]),n}($i),nr=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"getTypeName",value:function(){return"ResourceURL"}}]),n}($i);function ir(t){return t instanceof $i?t.changingThisBreaksApplicationSecurity:t}function rr(t,e){var n=or(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error("Required a safe ".concat(e,", got a ").concat(n," (see https://g.co/ng/security#xss)"))}return n===e}function or(t){return t instanceof $i&&t.getTypeName()||null}var ar=function(){function t(e){o(this,t),this.inertDocumentHelper=e}return s(t,[{key:"getInertBodyElement",value:function(t){t=""+t;try{var e=(new window.DOMParser).parseFromString(Zi(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch(n){return null}}}]),t}(),sr=function(){function t(e){if(o(this,t),this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){var n=this.inertDocument.createElement("html");this.inertDocument.appendChild(n);var i=this.inertDocument.createElement("body");n.appendChild(i)}}return s(t,[{key:"getInertBodyElement",value:function(t){var e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Zi(t),e;var n=this.inertDocument.createElement("body");return n.innerHTML=Zi(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}},{key:"stripCustomNsAttrs",value:function(t){for(var e=t.attributes,n=e.length-1;0"),!0}},{key:"endElement",value:function(t){var e=t.nodeName.toLowerCase();yr.hasOwnProperty(e)&&!pr.hasOwnProperty(e)&&(this.buf.push(""))}},{key:"chars",value:function(t){this.buf.push(Ar(t))}},{key:"checkClobberedElement",value:function(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(t.outerHTML));return e}}]),t}(),Sr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Cr=/([^\#-~ |!])/g;function Ar(t){return t.replace(/&/g,"&").replace(Sr,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Cr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}function Mr(t,e){var n=null;try{fr=fr||function(t){var e=new sr(t);return function(){try{return!!(new window.DOMParser).parseFromString(Zi(""),"text/html")}catch(t){return!1}}()?new ar(e):e}(t);var i=e?String(e):"";n=fr.getInertBodyElement(i);var r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=n.innerHTML,n=fr.getInertBodyElement(i)}while(i!==o);return Zi((new kr).sanitizeChildren(Ir(n)||n))}finally{if(n)for(var a=Ir(n)||n;a.firstChild;)a.removeChild(a.firstChild)}}function Ir(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var Tr=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Dr(t){var e=Or();return e?Ki(e.sanitize(Tr.HTML,t)||""):rr(t,"HTML")?Ki(ir(t)):Mr(Ve(),Tt(t))}function Er(t){var e=Or();return e?e.sanitize(Tr.URL,t)||"":rr(t,"URL")?ir(t):cr(Tt(t))}function Or(){var t=en();return t&&t[12]}function Pr(t){return t.ngDebugContext}function Rr(t){return t.ngOriginalError}function Lr(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&(t[i-1][4]=r[4]);var a=Mi(t,xe+e);po(r[1],n=r,n[11],2,null,null),n[0]=null,n[6]=null;var s=a[19];null!==s&&s.detachView(a[1]),r[3]=null,r[4]=null,r[2]&=-129}return r}}function Jr(t,e){if(!(256&e[2])){var n=e[11];ze(n)&&n.destroyNode&&po(t,e,n,3,null,null),function(t){var e=t[13];if(!e)return to(t[1],t);for(;e;){var n=null;if(ke(e))n=e[13];else{var i=e[10];i&&(n=i)}if(!n){for(;e&&!e[4]&&e!==t;)ke(e)&&to(e[1],e),e=e[3];null===e&&(e=t),ke(e)&&to(e[1],e),n=e&&e[4]}e=n}}(e)}}function to(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){var n;if(null!=t&&null!=(n=t.destroyHooks))for(var i=0;i=0?i[r=u]():i[r=-u].unsubscribe(),o+=2}else{var c=i[r=n[o+1]];n[o].call(c)}if(null!==i){for(var h=r+1;ho?"":r[c+1].toLowerCase();var d=8&i?h:null;if(d&&-1!==_o(d,u,0)||2&i&&u!==h){if(Co(i))return!1;a=!0}}}}else{if(!a&&!Co(i)&&!Co(l))return!1;if(a&&Co(l))continue;a=!1,i=l|1&i}}return Co(i)||a}function Co(t){return 0==(1&t)}function Ao(t,e,n,i){if(null===e)return-1;var r=0;if(i||!n){for(var o=!1;r-1)for(n++;n2&&void 0!==arguments[2]&&arguments[2],i=0;i0?'="'+s+'"':"")+"]"}else 8&i?r+="."+a:4&i&&(r+=" "+a);else""===r||Co(a)||(e+=To(o,r),r=""),i=a,o=o||!Co(i);n++}return""!==r&&(e+=To(o,r)),e}var Eo={};function Oo(t){Po(nn(),en(),Tn()+t,cn())}function Po(t,e,n,i){if(!i)if(3==(3&e[2])){var r=t.preOrderCheckHooks;null!==r&&Ln(e,r,n)}else{var o=t.preOrderHooks;null!==o&&Nn(e,o,0,n)}Dn(n)}function Ro(t,e){return t<<17|e<<2}function Lo(t){return t>>17&32767}function No(t){return 2|t}function Fo(t){return(131068&t)>>2}function Vo(t,e){return-131069&t|e<<2}function zo(t){return 1|t}function Bo(t,e){var n=t.contentQueries;if(null!==n)for(var i=0;iwe&&Po(t,e,we,cn()),n(i,r)}finally{Dn(o)}}function Xo(t,e,n){if(Ce(e))for(var i=e.directiveEnd,r=e.directiveStart;r2&&void 0!==arguments[2]?arguments[2]:Ge,i=e.localNames;if(null!==i)for(var r=e.index+1,o=0;o0;){var n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(s)!=l&&s.push(l),s.push(i,r,a)}}function ra(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function oa(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function aa(t,e,n){if(n){if(e.exportAs)for(var i=0;i0&&pa(n)}}function pa(t){for(var e=Wr(t);null!==e;e=Yr(e))for(var n=xe;n0&&pa(i)}var o=t[1].components;if(null!==o)for(var a=0;a0&&pa(s)}}function ga(t,e){var n=Ye(e,t),i=n[1];!function(t,e){for(var n=e.length;n1&&void 0!==arguments[1]?arguments[1]:Oi;if(e===Oi){var n=new Error("NullInjectorError: No provider for ".concat(xt(t),"!"));throw n.name="NullInjectorError",n}return e}}]),t}(),Ea=new wi("Set Injector scope."),Oa={},Pa={},Ra=[],La=void 0;function Na(){return void 0===La&&(La=new Da),La}function Fa(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;return new Va(t,n,e||Na(),i)}var Va=function(){function t(e,n,i){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;o(this,t),this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;var s=[];n&&Ci(n,function(t){return r.processProvider(t,e,n)}),Ci([e],function(t){return r.processInjectorType(t,[],s)}),this.records.set(Ta,Ha(void 0,this));var l=this.records.get(Ea);this.scope=null!=l?l.value:null,this.source=a||("object"==typeof e?null:xt(e))}return s(t,[{key:"destroy",value:function(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(function(t){return t.ngOnDestroy()})}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oi,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:jt.Default;this.assertNotDestroyed();var i=Fi(this);try{if(!(n&jt.SkipSelf)){var r=this.records.get(t);if(void 0===r){var o=Ua(t)&&Rt(t);r=o&&this.injectableDefInScope(o)?Ha(za(t),Oa):null,this.records.set(t,r)}if(null!=r)return this.hydrate(t,r)}var a=n&jt.Self?Na():this.parent;return a.get(t,e=n&jt.Optional&&e===Oi?null:e)}catch(l){if("NullInjectorError"===l.name){var s=l.ngTempTokenPath=l.ngTempTokenPath||[];if(s.unshift(xt(t)),i)throw l;return Gi(l,t,"R3InjectorError",this.source)}throw l}finally{Fi(i)}}},{key:"_resolveInjectorDefTypes",value:function(){var t=this;this.injectorDefTypes.forEach(function(e){return t.get(e)})}},{key:"toString",value:function(){var t=[];return this.records.forEach(function(e,n){return t.push(xt(n))}),"R3Injector[".concat(t.join(", "),"]")}},{key:"assertNotDestroyed",value:function(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}},{key:"processInjectorType",value:function(t,e,n){var i=this;if(!(t=At(t)))return!1;var r=Nt(t),o=null==r&&t.ngModule||void 0,a=void 0===o?t:o,s=-1!==n.indexOf(a);if(void 0!==o&&(r=Nt(o)),null==r)return!1;if(null!=r.imports&&!s){var l;n.push(a);try{Ci(r.imports,function(t){i.processInjectorType(t,e,n)&&(void 0===l&&(l=[]),l.push(t))})}finally{}if(void 0!==l)for(var u=function(t){var e=l[t],n=e.ngModule,r=e.providers;Ci(r,function(t){return i.processProvider(t,n,r||Ra)})},c=0;c0){var n=Ii(e,"?");throw new Error("Can't resolve all parameters for ".concat(xt(t),": (").concat(n.join(", "),")."))}var i=function(t){var e=t&&(t[Vt]||t[Bt]);if(e){var n=function(t){if(t.hasOwnProperty("name"))return t.name;var e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn('DEPRECATED: DI is instantiating a token "'.concat(n,'" that inherits its @Injectable decorator but does not provide one itself.\n')+'This will become an error in a future version of Angular. Please add @Injectable() to the "'.concat(n,'" class.')),e}return null}(t);return null!==i?function(){return i.factory(t)}:function(){return new t}}(t);throw new Error("unreachable")}function Ba(t,e,n){var i,r=void 0;if(Ga(t)){var o=At(t);return Te(o)||za(o)}if(ja(t))r=function(){return At(t.useValue)};else if((i=t)&&i.useFactory)r=function(){return t.useFactory.apply(t,b(Hi(t.deps||[])))};else if(function(t){return!(!t||!t.useExisting)}(t))r=function(){return zi(At(t.useExisting))};else{var a=At(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return Te(a)||za(a);r=function(){return w(a,b(Hi(t.deps)))}}return r}function Ha(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{factory:t,value:e,multi:n?[]:void 0}}function ja(t){return null!==t&&"object"==typeof t&&Li in t}function Ga(t){return"function"==typeof t}function Ua(t){return"function"==typeof t||"object"==typeof t&&t instanceof wi}var Wa=function(t,e,n){return function(t){var e=Fa(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0);return e._resolveInjectorDefTypes(),e}({name:n},e,t,n)},Ya=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"create",value:function(t,e){return Array.isArray(t)?Wa(t,e,""):Wa(t.providers,t.parent,t.name||"")}}]),t}();return t.THROW_IF_NOT_FOUND=Oi,t.NULL=new Da,t.\u0275prov=Ot({token:t,providedIn:"any",factory:function(){return zi(Ta)}}),t.__NG_ELEMENT_ID__=-1,t}();function qa(t,e){Rn(qe(t)[1],on())}function Xa(t){for(var e=Object.getPrototypeOf(t.type.prototype).constructor,n=!0,i=[t];e;){var r=void 0;if(Ie(t))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");r=e.\u0275dir}if(r){if(n){i.push(r);var o=t;o.inputs=Za(t.inputs),o.declaredInputs=Za(t.declaredInputs),o.outputs=Za(t.outputs);var a=r.hostBindings;a&&Qa(t,a);var s=r.viewQuery,l=r.contentQueries;if(s&&Ka(t,s),l&&$a(t,l),wt(t.inputs,r.inputs),wt(t.declaredInputs,r.declaredInputs),wt(t.outputs,r.outputs),Ie(r)&&r.data.animation){var u=t.data;u.animation=(u.animation||[]).concat(r.data.animation)}}var c=r.features;if(c)for(var h=0;h=0;i--){var r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=Wn(r.hostAttrs,n=Wn(n,r.hostAttrs))}}(i)}function Za(t){return t===te?{}:t===ne?[]:t}function Ka(t,e){var n=t.viewQuery;t.viewQuery=n?function(t,i){e(t,i),n(t,i)}:e}function $a(t,e){var n=t.contentQueries;t.contentQueries=n?function(t,i,r){e(t,i,r),n(t,i,r)}:e}function Qa(t,e){var n=t.hostBindings;t.hostBindings=n?function(t,i){e(t,i),n(t,i)}:e}var Ja=null;function ts(){if(!Ja){var t=Jt.Symbol;if(t&&t.iterator)Ja=t.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),n=0;n1&&void 0!==arguments[1]?arguments[1]:jt.Default,n=en();if(null===n)return zi(t,e);var i=on();return ai(i,n,At(t),e)}function ds(t,e,n){var i=en();return os(i,pn(),e)&&ea(nn(),En(),i,t,e,i[11],n,!1),ds}function fs(t,e,n,i,r){var o=r?"class":"style";Aa(t,n,e.inputs[o],o,i)}function ps(t,e,n,i){var r=en(),o=nn(),a=we+t,s=r[11],l=r[a]=Kr(s,e,Je.lFrame.currentNamespace),u=o.firstCreatePass?function(t,e,n,i,r,o,a){var s=e.consts,l=jo(e,t,2,r,Ke(s,o));return na(e,n,l,Ke(s,a)),null!==l.attrs&&Ia(l,l.attrs,!1),null!==l.mergedAttrs&&Ia(l,l.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,l),l}(a,o,r,0,e,n,i):o.data[a];sn(u,!0);var c=u.mergedAttrs;null!==c&&jn(s,l,c);var h=u.classes;null!==h&&yo(s,l,h);var d=u.styles;null!==d&&vo(s,l,d),64!=(64&u.flags)&&lo(o,r,l,u),0===Je.lFrame.elementDepthCount&&Fr(l,r),Je.lFrame.elementDepthCount++,Me(u)&&(Zo(o,r,u),Xo(o,u,r)),null!==i&&Ko(r,u)}function gs(){var t=on();ln()?un():sn(t=t.parent,!1);var e=t;Je.lFrame.elementDepthCount--;var n=nn();n.firstCreatePass&&(Rn(n,t),Ce(t)&&n.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&fs(n,e,en(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&fs(n,e,en(),e.stylesWithoutHost,!1)}function ms(t,e,n,i){ps(t,e,n,i),gs()}function vs(t,e,n){var i=en(),r=nn(),o=t+we,a=r.firstCreatePass?function(t,e,n,i,r){var o=e.consts,a=Ke(o,i),s=jo(e,t,8,"ng-container",a);return null!==a&&Ia(s,a,!0),na(e,n,s,Ke(o,r)),null!==e.queries&&e.queries.elementStart(e,s),s}(o,r,i,e,n):r.data[o];sn(a,!0);var s=i[o]=i[11].createComment("");lo(r,i,s,a),Fr(s,i),Me(a)&&(Zo(r,i,a),Xo(r,a,i)),null!=n&&Ko(i,a)}function ys(){var t=on(),e=nn();ln()?un():sn(t=t.parent,!1),e.firstCreatePass&&(Rn(e,t),Ce(t)&&e.queries.elementEnd(t))}function _s(t,e,n){vs(t,e,n),ys()}function bs(){return en()}function ws(t){return!!t&&"function"==typeof t.then}function xs(t){return!!t&&"function"==typeof t.subscribe}var ks=xs;function Ss(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=en(),o=nn(),a=on();return Ms(o,r,r[11],a,t,e,n,i),Ss}function Cs(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,r=on(),o=en(),a=nn(),s=vn(a.data),l=Sa(s,r,o);return Ms(a,o,l,r,t,e,n,i),Cs}function As(t,e,n,i){var r=t.cleanup;if(null!=r)for(var o=0;ol?s[l]:null}"string"==typeof a&&(o+=2)}return null}function Ms(t,e,n,i,r,o){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7?arguments[7]:void 0,l=Me(i),u=t.firstCreatePass,c=u&&ka(t),h=xa(e),d=!0;if(3&i.type){var f=Ge(i,e),p=s?s(f):te,g=p.target||f,m=h.length,v=s?function(t){return s(He(t[i.index])).target}:i.index;if(ze(n)){var y=null;if(!s&&l&&(y=As(t,e,r,i.index)),null!==y){var _=y.__ngLastListenerFn__||y;_.__ngNextListenerFn__=o,y.__ngLastListenerFn__=o,d=!1}else{o=Ts(i,e,0,o,!1);var b=n.listen(p.name||g,r,o);h.push(o,b),c&&c.push(r,v,m,m+1)}}else o=Ts(i,e,0,o,!0),g.addEventListener(r,o,a),h.push(o),c&&c.push(r,v,m,a)}else o=Ts(i,e,0,o,!1);var w,x=i.outputs;if(d&&null!==x&&(w=x[r])){var k=w.length;if(k)for(var S=0;S0&&void 0!==arguments[0]?arguments[0]:1;return In(t)}function Es(t,e){for(var n=null,i=function(t){var e=t.attrs;if(null!=e){var n=e.indexOf(5);if(0==(1&n))return e[n+1]}return null}(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,i=en(),r=nn(),o=jo(r,we+t,16,null,n||null);null===o.projection&&(o.projection=e),un(),64!=(64&o.flags)&&go(r,i,o)}function Rs(t,e,n){return Ls(t,"",e,"",n),Rs}function Ls(t,e,n,i,r){var o=en(),a=ls(o,e,n,i);return a!==Eo&&ea(nn(),En(),o,t,a,o[11],r,!1),Ls}function Ns(t,e,n,i,r){for(var o=t[n+1],a=null===e,s=i?Lo(o):Fo(o),l=!1;0!==s&&(!1===l||a);){var u=t[s+1];Fs(t[s],e)&&(l=!0,t[s+1]=i?zo(u):No(u)),s=i?Lo(u):Fo(u)}l&&(t[n+1]=i?No(o):zo(o))}function Fs(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Ei(t,e)>=0}var Vs={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function zs(t){return t.substring(Vs.key,Vs.keyEnd)}function Bs(t,e){var n=Vs.textEnd;return n===e?-1:(e=Vs.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,Vs.key=e,n),Hs(t,e,n))}function Hs(t,e,n){for(;e=0;n=Bs(e,n))Ti(t,zs(e),!0)}function Ws(t,e,n,i){var r=en(),o=nn(),a=gn(2);o.firstUpdatePass&&qs(o,t,a,i),e!==Eo&&os(r,a,e)&&Ks(o,o.data[Tn()],r,r[11],t,r[a+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=xt(ir(t)))),t}(e,n),i,a)}function Ys(t,e){return e>=t.expandoStartIndex}function qs(t,e,n,i){var r=t.data;if(null===r[n+1]){var o=r[Tn()],a=Ys(t,n);Js(o,i)&&null===e&&!a&&(e=!1),e=function(t,e,n,i){var r=vn(t),o=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=Zs(n=Xs(null,t,e,n,i),e.attrs,i),o=null);else{var a=e.directiveStylingLast;if(-1===a||t[a]!==r)if(n=Xs(r,t,e,n,i),null===o){var s=function(t,e,n){var i=n?e.classBindings:e.styleBindings;if(0!==Fo(i))return t[Lo(i)]}(t,e,i);void 0!==s&&Array.isArray(s)&&function(t,e,n,i){t[Lo(n?e.classBindings:e.styleBindings)]=i}(t,e,i,s=Zs(s=Xs(null,t,e,s[1],i),e.attrs,i))}else o=function(t,e,n){for(var i=void 0,r=e.directiveEnd,o=1+e.directiveStylingLast;o0)&&(c=!0):u=n,r)if(0!==l){var h=Lo(t[s+1]);t[i+1]=Ro(h,s),0!==h&&(t[h+1]=Vo(t[h+1],i)),t[s+1]=131071&t[s+1]|i<<17}else t[i+1]=Ro(s,0),0!==s&&(t[s+1]=Vo(t[s+1],i)),s=i;else t[i+1]=Ro(l,0),0===s?s=i:t[l+1]=Vo(t[l+1],i),l=i;c&&(t[i+1]=No(t[i+1])),Ns(t,u,i,!0),Ns(t,u,i,!1),function(t,e,n,i,r){var o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof e&&Ei(o,e)>=0&&(n[i+1]=zo(n[i+1]))}(e,u,t,i,o),a=Ro(s,l),o?e.classBindings=a:e.styleBindings=a}(r,o,e,n,a,i)}}function Xs(t,e,n,i,r){var o=null,a=n.directiveEnd,s=n.directiveStylingLast;for(-1===s?s=n.directiveStart:s++;s0;){var l=t[r],u=Array.isArray(l),c=u?l[1]:l,h=null===c,d=n[r+1];d===Eo&&(d=h?ee:void 0);var f=h?Di(d,i):c===i?d:void 0;if(u&&!Qs(f)&&(f=Di(l,i)),Qs(f)&&(s=f,a))return s;var p=t[r+1];r=a?Lo(p):Fo(p)}if(null!==e){var g=o?e.residualClasses:e.residualStyles;null!=g&&(s=Di(g,i))}return s}function Qs(t){return void 0!==t}function Js(t,e){return 0!=(t.flags&(e?16:32))}function tl(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=en(),i=nn(),r=t+we,o=i.firstCreatePass?jo(i,r,1,e,null):i.data[r],a=n[r]=Zr(n[11],e);lo(i,n,a,o),sn(o,!1)}function el(t){return nl("",t,""),el}function nl(t,e,n){var i=en(),r=ls(i,t,e,n);return r!==Eo&&Ma(i,Tn(),r),nl}function il(t,e,n,i,r){var o=en(),a=function(t,e,n,i,r,o){var a=as(t,fn(),n,r);return gn(2),a?e+Tt(n)+i+Tt(r)+o:Eo}(o,t,e,n,i,r);return a!==Eo&&Ma(o,Tn(),a),il}function rl(t,e,n){var i=en();return os(i,pn(),e)&&ea(nn(),En(),i,t,e,i[11],n,!0),rl}function ol(t,e,n){var i=en();if(os(i,pn(),e)){var r=nn(),o=En();ea(r,o,i,t,e,Sa(vn(r.data),o,i),n,!0)}return ol}var al=void 0,sl=["en",[["a","p"],["AM","PM"],al],[["AM","PM"],al,al],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],al,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],al,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",al,"{1} 'at' {0}",al],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){var e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}],ll={};function ul(t){return t in ll||(ll[t]=Jt.ng&&Jt.ng.common&&Jt.ng.common.locales&&Jt.ng.common.locales[t]),ll[t]}var cl=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({}),hl="en-US";function dl(t){var e,n;n="Expected localeId to be defined",null==(e=t)&&function(t,e,n,i){throw new Error("ASSERTION ERROR: ".concat(t)+" [Expected=> ".concat(null," ").concat("!="," ").concat(e," <=Actual]"))}(n,e),"string"==typeof t&&t.toLowerCase().replace(/_/g,"-")}function fl(t,e,n){var i=nn();if(i.firstCreatePass){var r=Ie(t);pl(n,i.data,i.blueprint,r,!0),pl(e,i.data,i.blueprint,r,!1)}}function pl(t,e,n,i,r){if(t=At(t),Array.isArray(t))for(var o=0;o>20;if(Ga(t)||!t.multi){var p=new Hn(u,r,hs),g=vl(l,e,r?h:h+f,d);-1===g?(ii(Jn(c,s),a,l),gl(a,t,e.length),e.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(p),s.push(p)):(n[g]=p,s[g]=p)}else{var m=vl(l,e,h+f,d),v=vl(l,e,h,h+f),y=v>=0&&n[v];if(r&&!y||!r&&!(m>=0&&n[m])){ii(Jn(c,s),a,l);var _=function(t,e,n,i,r){var o=new Hn(t,n,hs);return o.multi=[],o.index=e,o.componentProviders=0,ml(o,r,i&&!n),o}(r?_l:yl,n.length,r,i,u);!r&&y&&(n[v].providerFactory=_),gl(a,t,e.length,0),e.push(l),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(_),s.push(_)}else gl(a,t,m>-1?m:v,ml(n[r?v:m],u,!r&&i));!r&&i&&y&&n[v].componentProviders++}}}function gl(t,e,n,i){var r=Ga(e);if(r||e.useClass){var o=(e.useClass||e).prototype.ngOnDestroy;if(o){var a=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){var s=a.indexOf(n);-1===s?a.push(n,[i,o]):a[s+1].push(i,o)}else a.push(n,o)}}}function ml(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function vl(t,e,n,i){for(var r=n;r1&&void 0!==arguments[1]?arguments[1]:[];return function(n){n.providersResolver=function(n,i){return fl(n,i?i(t):t,e)}}}var xl=function t(){o(this,t)},kl=function t(){o(this,t)},Sl=function(){function t(){o(this,t)}return s(t,[{key:"resolveComponentFactory",value:function(t){throw function(t){var e=Error("No component factory found for ".concat(xt(t),". Did you add it to @NgModule.entryComponents?"));return e.ngComponent=t,e}(t)}}]),t}(),Cl=function(){var t=function t(){o(this,t)};return t.NULL=new Sl,t}();function Al(){}function Ml(t,e){return new Tl(Ge(t,e))}var Il=function(){return Ml(on(),en())},Tl=function(){var t=function t(e){o(this,t),this.nativeElement=e};return t.__NG_ELEMENT_ID__=Il,t}();function Dl(t){return t instanceof Tl?t.nativeElement:t}var El=function t(){o(this,t)},Ol=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=function(){return Pl()},t}(),Pl=function(){var t=en(),e=Ye(on().index,t);return function(t){return t[11]}(ke(e)?e:t)},Rl=function(){var t=function t(){o(this,t)};return t.\u0275prov=Ot({token:t,providedIn:"root",factory:function(){return null}}),t}(),Ll=function t(e){o(this,t),this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")},Nl=new Ll("11.2.13"),Fl=function(){function t(){o(this,t)}return s(t,[{key:"supports",value:function(t){return ns(t)}},{key:"create",value:function(t){return new zl(t)}}]),t}(),Vl=function(t,e){return e},zl=function(){function t(e){o(this,t),this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Vl}return s(t,[{key:"forEachItem",value:function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)}},{key:"forEachOperation",value:function(t){for(var e=this._itHead,n=this._removalsHead,i=0,r=null;e||n;){var o=!n||e&&e.currentIndex4&&void 0!==arguments[4]&&arguments[4];null!==n;){var o=e[n.index];if(null!==o&&i.push(He(o)),Se(o))for(var a=xe;a-1&&(Qr(t,n),Mi(e,n))}this._attachedToViewContainer=!1}Jr(this._lView[1],this._lView)}},{key:"onDestroy",value:function(t){Jo(this._lView[1],this._lView,null,t)}},{key:"markForCheck",value:function(){va(this._cdRefInjectingView||this._lView)}},{key:"detach",value:function(){this._lView[2]&=-129}},{key:"reattach",value:function(){this._lView[2]|=128}},{key:"detectChanges",value:function(){ya(this._lView[1],this._lView,this.context)}},{key:"checkNoChanges",value:function(){!function(t,e,n){hn(!0);try{ya(t,e,n)}finally{hn(!1)}}(this._lView[1],this._lView,this.context)}},{key:"attachToViewContainerRef",value:function(){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._attachedToViewContainer=!0}},{key:"detachFromAppRef",value:function(){var t;this._appRef=null,po(this._lView[1],t=this._lView,t[11],2,null,null)}},{key:"attachToAppRef",value:function(t){if(this._attachedToViewContainer)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}},{key:"rootNodes",get:function(){var t=this._lView,e=t[1];return $l(e,t,e.firstChild,[])}},{key:"context",get:function(){return this._lView[8]}},{key:"destroyed",get:function(){return 256==(256&this._lView[2])}}]),t}(),Jl=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t))._view=t,i}return s(n,[{key:"detectChanges",value:function(){_a(this._view)}},{key:"checkNoChanges",value:function(){!function(t){hn(!0);try{_a(t)}finally{hn(!1)}}(this._view)}},{key:"context",get:function(){return null}}]),n}(Ql),tu=nu,eu=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=tu,t.__ChangeDetectorRef__=!0,t}();function nu(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return iu(on(),en(),t)}function iu(t,e,n){if(!n&&Ae(t)){var i=Ye(t.index,e);return new Ql(i,i)}return 47&t.type?new Ql(e[16],e):null}var ru=[new Ul],ou=new Xl([new Fl]),au=new Kl(ru),su=function(){return cu(on(),en())},lu=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=su,t}(),uu=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this))._declarationLView=t,a._declarationTContainer=i,a.elementRef=r,a}return s(n,[{key:"createEmbeddedView",value:function(t){var e=this._declarationTContainer.tViews,n=Ho(this._declarationLView,e,t,16,null,e.declTNode,null,null,null,null);n[17]=this._declarationLView[this._declarationTContainer.index];var i=this._declarationLView[19];return null!==i&&(n[19]=i.createEmbeddedView(e)),Uo(e,n,t),new Ql(n)}}]),n}(lu);function cu(t,e){return 4&t.type?new uu(e,t,Ml(t,e)):null}var hu=function t(){o(this,t)},du=function t(){o(this,t)},fu=function(){return yu(on(),en())},pu=function(){var t=function t(){o(this,t)};return t.__NG_ELEMENT_ID__=fu,t}(),gu=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this))._lContainer=t,a._hostTNode=i,a._hostLView=r,a}return s(n,[{key:"clear",value:function(){for(;this.length>0;)this.remove(this.length-1)}},{key:"get",value:function(t){var e=mu(this._lContainer);return null!==e&&e[t]||null}},{key:"createEmbeddedView",value:function(t,e,n){var i=t.createEmbeddedView(e||{});return this.insert(i,n),i}},{key:"createComponent",value:function(t,e,n,i,r){var o=n||this.parentInjector;if(!r&&null==t.ngModule&&o){var a=o.get(hu,null);a&&(r=a)}var s=t.create(o,i,void 0,r);return this.insert(s.hostView,e),s}},{key:"insert",value:function(t,e){var n=t._lView,i=n[1];if(Se(n[3])){var r=this.indexOf(t);if(-1!==r)this.detach(r);else{var o=n[3],a=new gu(o,o[6],o[3]);a.detach(a.indexOf(t))}}var s=this._adjustIndex(e),l=this._lContainer;!function(t,e,n,i){var r=xe+i,o=n.length;i>0&&(n[r-1][4]=e),i1&&void 0!==arguments[1]?arguments[1]:0;return null==t?this.length+e:t}},{key:"element",get:function(){return Ml(this._hostTNode,this._hostLView)}},{key:"injector",get:function(){return new gi(this._hostTNode,this._hostLView)}},{key:"parentInjector",get:function(){var t=ni(this._hostTNode,this._hostLView);if(qn(t)){var e=Zn(t,this._hostLView),n=Xn(t);return new gi(e[1].data[n+8],e)}return new gi(null,this._hostLView)}},{key:"length",get:function(){return this._lContainer.length-xe}}]),n}(pu);function mu(t){return t[8]}function vu(t){return t[8]||(t[8]=[])}function yu(t,e){var n,i=e[t.index];if(Se(i))n=i;else{var r;if(8&t.type)r=He(i);else{var o=e[11];r=o.createComment("");var a=Ge(t,e);no(o,oo(o,a),r,function(t,e){return ze(t)?t.nextSibling(e):e.nextSibling}(o,a),!1)}e[t.index]=n=da(i,e,r,t),ma(e,n)}return new gu(n,t,e)}var _u={},bu=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).ngModule=t,i}return s(n,[{key:"resolveComponentFactory",value:function(t){var e=_e(t);return new ku(e,this.ngModule)}}]),n}(Cl);function wu(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}var xu=new wi("SCHEDULER_TOKEN",{providedIn:"root",factory:function(){return Vr}}),ku=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).componentDef=t,r.ngModule=i,r.componentType=t.type,r.selector=t.selectors.map(Do).join(","),r.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],r.isBoundToModule=!!i,r}return s(n,[{key:"create",value:function(t,e,n,i){var r,o,a=(i=i||this.ngModule)?function(t,e){return{get:function(n,i,r){var o=t.get(n,_u,r);return o!==_u||i===_u?o:e.get(n,i,r)}}}(t,i.injector):t,s=a.get(El,Be),l=a.get(Rl,null),u=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",h=n?function(t,e,n){if(ze(t))return t.selectRootElement(e,n===Xt.ShadowDom);var i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(u,n,this.componentDef.encapsulation):Kr(s.createRenderer(null,this.componentDef),c,function(t){var e=t.toLowerCase();return"svg"===e?Ne:"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,f={components:[],scheduler:Vr,clean:wa,playerHandler:null,flags:0},p=Qo(0,null,null,1,0,null,null,null,null,null),g=Ho(null,p,f,d,null,null,s,u,l,a);xn(g);try{var m=function(t,e,n,i,r,o){var a=n[1];n[20]=t;var s=jo(a,20,2,"#host",null),l=s.mergedAttrs=e.hostAttrs;null!==l&&(Ia(s,l,!0),null!==t&&(jn(r,t,l),null!==s.classes&&yo(r,t,s.classes),null!==s.styles&&vo(r,t,s.styles)));var u=i.createRenderer(t,e),c=Ho(n,$o(e),null,e.onPush?64:16,n[20],s,i,u,null,null);return a.firstCreatePass&&(ii(Jn(s,n),a,e.type),oa(a,s),sa(s,n.length,1)),ma(n,c),n[20]=c}(h,this.componentDef,g,s,u);if(h)if(n)jn(u,h,["ng-version",Nl.full]);else{var v=function(t){for(var e=[],n=[],i=1,r=2;i0&&yo(u,h,_.join(" "))}if(o=Ue(p,we),void 0!==e)for(var b=o.projection=[],w=0;w1&&void 0!==arguments[1]?arguments[1]:Ya.THROW_IF_NOT_FOUND,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:jt.Default;return t===Ya||t===hu||t===Ta?this:this._r3Injector.get(t,e,n)}},{key:"destroy",value:function(){var t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(function(t){return t()}),this.destroyCbs=null}},{key:"onDestroy",value:function(t){this.destroyCbs.push(t)}}]),n}(hu),Mu=function(t){u(n,t);var e=p(n);function n(t){var i,r,a;return o(this,n),(i=e.call(this)).moduleType=t,null!==be(t)&&(r=t,a=new Set,function t(e){var n=be(e,!0),i=n.id;null!==i&&(function(t,e,n){if(e&&e!==n)throw new Error("Duplicate module registered for ".concat(t," - ").concat(xt(e)," vs ").concat(xt(e.name)))}(i,Cu.get(i),e),Cu.set(i,e));var r,o=v(Hr(n.imports));try{for(o.s();!(r=o.n()).done;){var s=r.value;a.has(s)||(a.add(s),t(s))}}catch(l){o.e(l)}finally{o.f()}}(r)),i}return s(n,[{key:"create",value:function(t){return new Au(this.moduleType,t)}}]),n}(du);function Iu(t,e,n){var i=dn()+t,r=en();return r[i]===Eo?rs(r,i,n?e.call(n):e()):function(t,e){return t[e]}(r,i)}function Tu(t,e,n,i){return Ou(en(),dn(),t,e,n,i)}function Du(t,e,n,i,r){return Pu(en(),dn(),t,e,n,i,r)}function Eu(t,e){var n=t[e];return n===Eo?void 0:n}function Ou(t,e,n,i,r,o){var a=e+n;return os(t,a,r)?rs(t,a+1,o?i.call(o,r):i(r)):Eu(t,a+1)}function Pu(t,e,n,i,r,o,a){var s=e+n;return as(t,s,r,o)?rs(t,s+2,a?i.call(a,r,o):i(r,o)):Eu(t,s+2)}function Ru(t,e){var n,i=nn(),r=t+we;i.firstCreatePass?(n=function(t,e){if(e)for(var n=e.length-1;n>=0;n--){var i=e[n];if(t===i.name)return i}throw new It("302","The pipe '".concat(t,"' could not be found!"))}(e,i.pipeRegistry),i.data[r]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(r,n.onDestroy)):n=i.data[r];var o=n.factory||(n.factory=Te(n.type)),a=Ut(hs);try{var s=$n(!1),l=o();return $n(s),function(t,e,n,i){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=i}(i,en(),r,l),l}finally{Ut(a)}}function Lu(t,e,n){var i=t+we,r=en(),o=We(r,i);return Vu(r,Fu(r,i)?Ou(r,dn(),e,o.transform,n,o):o.transform(n))}function Nu(t,e,n,i){var r=t+we,o=en(),a=We(o,r);return Vu(o,Fu(o,r)?Pu(o,dn(),e,a.transform,n,i,a):a.transform(n,i))}function Fu(t,e){return t[1].data[e].pure}function Vu(t,e){return es.isWrapped(e)&&(e=es.unwrap(e),t[fn()]=Eo),e}function zu(t){return function(e){setTimeout(t,void 0,e)}}var Bu=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return o(this,n),(t=e.call(this)).__isAsync=i,t}return s(n,[{key:"emit",value:function(t){r(i(n.prototype),"next",this).call(this,t)}},{key:"subscribe",value:function(t,e,o){var a,s,l,u=t,c=e||function(){return null},h=o;if(t&&"object"==typeof t){var d=t;u=null===(a=d.next)||void 0===a?void 0:a.bind(d),c=null===(s=d.error)||void 0===s?void 0:s.bind(d),h=null===(l=d.complete)||void 0===l?void 0:l.bind(d)}this.__isAsync&&(c=zu(c),u&&(u=zu(u)),h&&(h=zu(h)));var f=r(i(n.prototype),"subscribe",this).call(this,{next:u,error:c,complete:h});return t instanceof M&&t.add(f),f}}]),n}(U);function Hu(){return this._results[ts()]()}var ju=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o(this,t),this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;var n=ts(),i=t.prototype;i[n]||(i[n]=Hu)}return s(t,[{key:"get",value:function(t){return this._results[t]}},{key:"map",value:function(t){return this._results.map(t)}},{key:"filter",value:function(t){return this._results.filter(t)}},{key:"find",value:function(t){return this._results.find(t)}},{key:"reduce",value:function(t,e){return this._results.reduce(t,e)}},{key:"forEach",value:function(t){this._results.forEach(t)}},{key:"some",value:function(t){return this._results.some(t)}},{key:"toArray",value:function(){return this._results.slice()}},{key:"toString",value:function(){return this._results.toString()}},{key:"reset",value:function(t,e){var n=this;n.dirty=!1;var i=Si(t);(this._changesDetected=!function(t,e,n){if(t.length!==e.length)return!1;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];o(this,t),this.queries=e}return s(t,[{key:"createEmbeddedView",value:function(e){var n=e.queries;if(null!==n){for(var i=null!==e.contentQueries?e.contentQueries[0]:n.length,r=[],o=0;o2&&void 0!==arguments[2]?arguments[2]:null;o(this,t),this.predicate=e,this.flags=n,this.read=i},Yu=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o(this,t),this.queries=e}return s(t,[{key:"elementStart",value:function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:-1;o(this,t),this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}return s(t,[{key:"elementStart",value:function(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}},{key:"elementEnd",value:function(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}},{key:"template",value:function(t,e){this.elementStart(t,e)}},{key:"embeddedTView",value:function(e,n){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,n),new t(this.metadata)):null}},{key:"isApplyingToNode",value:function(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){for(var e=this._declarationNodeIndex,n=t.parent;null!==n&&8&n.type&&n.index!==e;)n=n.parent;return e===(null!==n?n.index:-1)}return this._appliesToNextNode}},{key:"matchTNode",value:function(t,e){var n=this.metadata.predicate;if(Array.isArray(n))for(var i=0;i0)i.push(a[s/2]);else{for(var u=o[s+1],c=e[-l],h=xe;h0&&(r=setTimeout(function(){i._callbacks=i._callbacks.filter(function(t){return t.timeoutId!==r}),t(i._didWork,i.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:r,updateCb:n})}},{key:"whenStable",value:function(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}},{key:"getPendingRequestCount",value:function(){return this._pendingCount}},{key:"findProviders",value:function(t,e,n){return[]}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Nc=function(){var t=function(){function t(){o(this,t),this._applications=new Map,Fc.addToWindow(this)}return s(t,[{key:"registerApplication",value:function(t,e){this._applications.set(t,e)}},{key:"unregisterApplication",value:function(t){this._applications.delete(t)}},{key:"unregisterAllApplications",value:function(){this._applications.clear()}},{key:"getTestability",value:function(t){return this._applications.get(t)||null}},{key:"getAllTestabilities",value:function(){return Array.from(this._applications.values())}},{key:"getAllRootElements",value:function(){return Array.from(this._applications.keys())}},{key:"findTestabilityInTree",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Fc.findTestabilityInTree(this,t,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Fc=new(function(){function t(){o(this,t)}return s(t,[{key:"addToWindow",value:function(t){}},{key:"findTestabilityInTree",value:function(t,e,n){return null}}]),t}()),Vc=!0,zc=!1;function Bc(){return zc=!0,Vc}var Hc=function(t,e,n){var i=new Mu(n);return Promise.resolve(i)},jc=new wi("AllowMultipleToken"),Gc=function t(e,n){o(this,t),this.name=e,this.token=n};function Uc(t){if(Pc&&!Pc.destroyed&&!Pc.injector.get(jc,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Pc=t.get(Xc);var e=t.get(hc,null);return e&&e.forEach(function(t){return t()}),Pc}function Wc(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i="Platform: ".concat(e),r=new wi(i);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=qc();if(!o||o.injector.get(jc,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{var a=n.concat(e).concat({provide:r,useValue:!0},{provide:Ea,useValue:"platform"});Uc(Ya.create({providers:a,name:i}))}return Yc(r)}}function Yc(t){var e=qc();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}function qc(){return Pc&&!Pc.destroyed?Pc:null}var Xc=function(){var t=function(){function t(e){o(this,t),this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return s(t,[{key:"bootstrapModuleFactory",value:function(t,e){var n,i,r=this,o=(i={ngZoneEventCoalescing:e&&e.ngZoneEventCoalescing||!1,ngZoneRunCoalescing:e&&e.ngZoneRunCoalescing||!1},"noop"===(n=e?e.ngZone:void 0)?new Rc:("zone.js"===n?void 0:n)||new Mc({enableLongStackTrace:Bc(),shouldCoalesceEventChangeDetection:!!(null==i?void 0:i.ngZoneEventCoalescing),shouldCoalesceRunChangeDetection:!!(null==i?void 0:i.ngZoneRunCoalescing)})),a=[{provide:Mc,useValue:o}];return o.run(function(){var e=Ya.create({providers:a,parent:r.injector,name:t.moduleType.name}),n=t.create(e),i=n.injector.get(Nr,null);if(!i)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return o.runOutsideAngular(function(){var t=o.onError.subscribe({next:function(t){i.handleError(t)}});n.onDestroy(function(){$c(r._modules,n),t.unsubscribe()})}),function(t,e,i){try{var o=((a=n.injector.get(sc)).runInitializers(),a.donePromise.then(function(){return dl(n.injector.get(gc,hl)||hl),r._moduleDoBootstrap(n),n}));return ws(o)?o.catch(function(n){throw e.runOutsideAngular(function(){return t.handleError(n)}),n}):o}catch(s){throw e.runOutsideAngular(function(){return t.handleError(s)}),s}var a}(i,o)})}},{key:"bootstrapModule",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=Zc({},n);return Hc(0,0,t).then(function(t){return e.bootstrapModuleFactory(t,i)})}},{key:"_moduleDoBootstrap",value:function(t){var e=t.injector.get(Kc);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module ".concat(xt(t.instance.constructor),' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. ')+"Please define one of these.");t.instance.ngDoBootstrap(e)}this._modules.push(t)}},{key:"onDestroy",value:function(t){this._destroyListeners.push(t)}},{key:"destroy",value:function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(t){return t.destroy()}),this._destroyListeners.forEach(function(t){return t()}),this._destroyed=!0}},{key:"injector",get:function(){return this._injector}},{key:"destroyed",get:function(){return this._destroyed}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Ya))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function Zc(t,e){return Array.isArray(e)?e.reduce(Zc,t):Object.assign(Object.assign({},t),e)}var Kc=function(){var t=function(){function t(e,n,i,r,a){var s=this;o(this,t),this._zone=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=a,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var l=new z(function(t){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){t.next(s._stable),t.complete()})}),u=new z(function(t){var e;s._zone.runOutsideAngular(function(){e=s._zone.onStable.subscribe(function(){Mc.assertNotInAngularZone(),Ac(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,t.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Mc.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});this.isStable=dt(l,u.pipe(function(t){return ft()((e=_t,function(t){var n;n="function"==typeof e?e:function(){return e};var i=Object.create(t,vt);return i.source=t,i.subjectFactory=n,i})(t));var e}))}return s(t,[{key:"bootstrap",value:function(t,e){var n,i=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=t instanceof kl?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);var r=n.isBoundToModule?void 0:this._injector.get(hu),o=n.create(Ya.NULL,[],e||n.selector,r),a=o.location.nativeElement,s=o.injector.get(Lc,null),l=s&&o.injector.get(Nc);return s&&l&&l.registerApplication(a,s),o.onDestroy(function(){i.detachView(o.hostView),$c(i.components,o),l&&l.unregisterApplication(a)}),this._loadComponent(o),o}},{key:"tick",value:function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;var e,n=v(this._views);try{for(n.s();!(e=n.n()).done;)e.value.detectChanges()}catch(i){n.e(i)}finally{n.f()}}catch(r){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(r)})}finally{this._runningTick=!1}}},{key:"attachView",value:function(t){var e=t;this._views.push(e),e.attachToAppRef(this)}},{key:"detachView",value:function(t){var e=t;$c(this._views,e),e.detachFromAppRef()}},{key:"_loadComponent",value:function(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(fc,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})}},{key:"ngOnDestroy",value:function(){this._views.slice().forEach(function(t){return t.destroy()}),this._onMicrotaskEmptySubscription.unsubscribe()}},{key:"viewCount",get:function(){return this._views.length}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc),zi(Ya),zi(Nr),zi(Cl),zi(sc))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function $c(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Qc=function t(){o(this,t)},Jc=function t(){o(this,t)},th={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},eh=function(){var t=function(){function t(e,n){o(this,t),this._compiler=e,this._config=n||th}return s(t,[{key:"load",value:function(t){return this.loadAndCompile(t)}},{key:"loadAndCompile",value:function(t){var e=this,i=y(t.split("#"),2),r=i[0],o=i[1];return void 0===o&&(o="default"),n("zn8P")(r).then(function(t){return t[o]}).then(function(t){return nh(t,r,o)}).then(function(t){return e._compiler.compileModuleAsync(t)})}},{key:"loadFactory",value:function(t){var e=y(t.split("#"),2),i=e[0],r=e[1],o="NgFactory";return void 0===r&&(r="default",o=""),n("zn8P")(this._config.factoryPathPrefix+i+this._config.factoryPathSuffix).then(function(t){return t[r+o]}).then(function(t){return nh(t,i,r)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Sc),zi(Jc,8))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function nh(t,e,n){if(!t)throw new Error("Cannot find '".concat(n,"' in '").concat(e,"'"));return t}var ih=Wc(null,"core",[{provide:dc,useValue:"unknown"},{provide:Xc,deps:[Ya]},{provide:Nc,deps:[]},{provide:pc,deps:[]}]),rh=[{provide:Kc,useClass:Kc,deps:[Mc,Ya,Nr,Cl,sc]},{provide:xu,deps:[Mc],useFactory:function(t){var e=[];return t.onStable.subscribe(function(){for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:sc,useClass:sc,deps:[[new qi,ac]]},{provide:Sc,useClass:Sc,deps:[]},uc,{provide:Xl,useFactory:function(){return ou},deps:[]},{provide:Kl,useFactory:function(){return au},deps:[]},{provide:gc,useFactory:function(t){return dl(t=t||"undefined"!=typeof $localize&&$localize.locale||hl),t},deps:[[new Yi(gc),new qi,new Xi]]},{provide:mc,useValue:"USD"}],oh=function(){var t=function t(e){o(this,t)};return t.\u0275fac=function(e){return new(e||t)(zi(Kc))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:rh}),t}(),ah=null;function sh(){return ah}var lh=function t(){o(this,t)},uh=new wi("DocumentToken"),ch=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:hh,token:t,providedIn:"platform"}),t}();function hh(){return zi(fh)}var dh=new wi("Location Initialized"),fh=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this))._doc=t,i._init(),i}return s(n,[{key:"_init",value:function(){this.location=sh().getLocation(),this._history=sh().getHistory()}},{key:"getBaseHrefFromDOM",value:function(){return sh().getBaseHref(this._doc)}},{key:"onPopState",value:function(t){sh().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}},{key:"onHashChange",value:function(t){sh().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}},{key:"pushState",value:function(t,e,n){ph()?this._history.pushState(t,e,n):this.location.hash=n}},{key:"replaceState",value:function(t,e,n){ph()?this._history.replaceState(t,e,n):this.location.hash=n}},{key:"forward",value:function(){this._history.forward()}},{key:"back",value:function(){this._history.back()}},{key:"getState",value:function(){return this._history.state}},{key:"href",get:function(){return this.location.href}},{key:"protocol",get:function(){return this.location.protocol}},{key:"hostname",get:function(){return this.location.hostname}},{key:"port",get:function(){return this.location.port}},{key:"pathname",get:function(){return this.location.pathname},set:function(t){this.location.pathname=t}},{key:"search",get:function(){return this.location.search}},{key:"hash",get:function(){return this.location.hash}}]),n}(ch);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:gh,token:t,providedIn:"platform"}),t}();function ph(){return!!window.history.pushState}function gh(){return new fh(zi(uh))}function mh(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function vh(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function yh(t){return t&&"?"!==t[0]?"?"+t:t}var _h=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:bh,token:t,providedIn:"root"}),t}();function bh(t){var e=zi(uh).location;return new xh(zi(ch),e&&e.origin||"")}var wh=new wi("appBaseHref"),xh=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;if(o(this,n),(r=e.call(this))._platformLocation=t,null==i&&(i=r._platformLocation.getBaseHrefFromDOM()),null==i)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=i,r}return s(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"prepareExternalUrl",value:function(t){return mh(this._baseHref,t)}},{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._platformLocation.pathname+yh(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?"".concat(e).concat(n):e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(_h);return t.\u0275fac=function(e){return new(e||t)(zi(ch),zi(wh,8))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),kh=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._platformLocation=t,r._baseHref="",null!=i&&(r._baseHref=i),r}return s(n,[{key:"onPopState",value:function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}},{key:"getBaseHref",value:function(){return this._baseHref}},{key:"path",value:function(){var t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}},{key:"prepareExternalUrl",value:function(t){var e=mh(this._baseHref,t);return e.length>0?"#"+e:e}},{key:"pushState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}},{key:"replaceState",value:function(t,e,n,i){var r=this.prepareExternalUrl(n+yh(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}},{key:"forward",value:function(){this._platformLocation.forward()}},{key:"back",value:function(){this._platformLocation.back()}}]),n}(_h);return t.\u0275fac=function(e){return new(e||t)(zi(ch),zi(wh,8))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Sh=function(){var t=function(){function t(e,n){var i=this;o(this,t),this._subject=new Bu,this._urlChangeListeners=[],this._platformStrategy=e;var r=this._platformStrategy.getBaseHref();this._platformLocation=n,this._baseHref=vh(Ah(r)),this._platformStrategy.onPopState(function(t){i._subject.emit({url:i.path(!0),pop:!0,state:t.state,type:t.type})})}return s(t,[{key:"path",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.normalize(this._platformStrategy.path(t))}},{key:"getState",value:function(){return this._platformLocation.getState()}},{key:"isCurrentPathEqualTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this.path()==this.normalize(t+yh(e))}},{key:"normalize",value:function(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Ah(e)))}},{key:"prepareExternalUrl",value:function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}},{key:"go",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+yh(e)),n)}},{key:"replaceState",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+yh(e)),n)}},{key:"forward",value:function(){this._platformStrategy.forward()}},{key:"back",value:function(){this._platformStrategy.back()}},{key:"onUrlChange",value:function(t){var e=this;this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(function(t){e._notifyUrlChangeListeners(t.url,t.state)}))}},{key:"_notifyUrlChangeListeners",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;this._urlChangeListeners.forEach(function(n){return n(t,e)})}},{key:"subscribe",value:function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(_h),zi(ch))},t.normalizeQueryParams=yh,t.joinWithSlash=mh,t.stripTrailingSlash=vh,t.\u0275prov=Ot({factory:Ch,token:t,providedIn:"root"}),t}();function Ch(){return new Sh(zi(_h),zi(ch))}function Ah(t){return t.replace(/\/index.html$/,"")}var Mh=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),Ih=function t(){o(this,t)},Th=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).locale=t,i}return s(n,[{key:"getPluralCategory",value:function(t,e){switch(function(t){return function(t){var e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t),n=ul(e);if(n)return n;var i=e.split("-")[0];if(n=ul(i))return n;if("en"===i)return sl;throw new Error('Missing locale data for the locale "'.concat(t,'".'))}(t)[cl.PluralCase]}(e||this.locale)(t)){case Mh.Zero:return"zero";case Mh.One:return"one";case Mh.Two:return"two";case Mh.Few:return"few";case Mh.Many:return"many";default:return"other"}}}]),n}(Ih);return t.\u0275fac=function(e){return new(e||t)(zi(gc))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function Dh(t,e){e=encodeURIComponent(e);var n,i=v(t.split(";"));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=r.indexOf("="),a=y(-1==o?[r,""]:[r.slice(0,o),r.slice(o+1)],2),s=a[1];if(a[0].trim()===e)return decodeURIComponent(s)}}catch(l){i.e(l)}finally{i.f()}return null}var Eh=function(){var t=function(){function t(e,n,i,r){o(this,t),this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=i,this._renderer=r,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}return s(t,[{key:"ngDoCheck",value:function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}},{key:"_applyKeyValueChanges",value:function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})}},{key:"_applyIterableChanges",value:function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got ".concat(xt(t.item)));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})}},{key:"_applyClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!0)}):Object.keys(t).forEach(function(n){return e._toggleClass(n,!!t[n])}))}},{key:"_removeClasses",value:function(t){var e=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return e._toggleClass(t,!1)}):Object.keys(t).forEach(function(t){return e._toggleClass(t,!1)}))}},{key:"_toggleClass",value:function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){e?n._renderer.addClass(n._ngEl.nativeElement,t):n._renderer.removeClass(n._ngEl.nativeElement,t)})}},{key:"klass",set:function(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}},{key:"ngClass",set:function(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(ns(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Xl),hs(Kl),hs(Tl),hs(Ol))},t.\u0275dir=ve({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t}(),Oh=function(){function t(e,n,i,r){o(this,t),this.$implicit=e,this.ngForOf=n,this.index=i,this.count=r}return s(t,[{key:"first",get:function(){return 0===this.index}},{key:"last",get:function(){return this.index===this.count-1}},{key:"even",get:function(){return this.index%2==0}},{key:"odd",get:function(){return!this.even}}]),t}(),Ph=function(){var t=function(){function t(e,n,i){o(this,t),this._viewContainer=e,this._template=n,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}return s(t,[{key:"ngDoCheck",value:function(){if(this._ngForOfDirty){this._ngForOfDirty=!1;var t=this._ngForOf;if(!this._differ&&t)try{this._differ=this._differs.find(t).create(this.ngForTrackBy)}catch(i){throw new Error("Cannot find a differ supporting object '".concat(t,"' of type '").concat((e=t).name||typeof e,"'. NgFor only supports binding to Iterables such as Arrays."))}}var e;if(this._differ){var n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}},{key:"_applyChanges",value:function(t){var e=this,n=[];t.forEachOperation(function(t,i,r){if(null==t.previousIndex){var o=e._viewContainer.createEmbeddedView(e._template,new Oh(null,e._ngForOf,-1,-1),null===r?void 0:r),a=new Rh(t,o);n.push(a)}else if(null==r)e._viewContainer.remove(null===i?void 0:i);else if(null!==i){var s=e._viewContainer.get(i);e._viewContainer.move(s,r);var l=new Rh(t,s);n.push(l)}});for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:jt.Default,e=nu(!0);if(null!=e||t&jt.Optional)return e;Et("ChangeDetectorRef")}())},t.\u0275pipe=ye({name:"async",type:t,pure:!1}),t}();function qh(t,e){return{key:t,value:e}}var Xh=function(){var t=function(){function t(e){o(this,t),this.differs=e,this.keyValues=[]}return s(t,[{key:"transform",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zh;if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());var i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem(function(t){e.keyValues.push(qh(t.key,t.currentValue))}),this.keyValues.sort(n)),this.keyValues}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Kl))},t.\u0275pipe=ye({name:"keyvalue",type:t,pure:!1}),t}();function Zh(t,e){var n=t.key,i=e.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n1&&void 0!==arguments[1])||arguments[1],i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Jt.getAllAngularTestabilities=function(){return t.getAllTestabilities()},Jt.getAllAngularRootElements=function(){return t.getAllRootElements()},Jt.frameworkStabilizers||(Jt.frameworkStabilizers=[]),Jt.frameworkStabilizers.push(function(t){var e=Jt.getAllAngularTestabilities(),n=e.length,i=!1,r=function(e){i=i||e,0==--n&&t(i)};e.forEach(function(t){t.whenStable(r)})})}},{key:"findTestabilityInTree",value:function(t,e,n){if(null==e)return null;var i=t.getTestability(e);return null!=i?i:n?sh().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}],[{key:"init",value:function(){var e;e=new t,Fc=e}}]),t}(),ad=new wi("EventManagerPlugins"),sd=function(){var t=function(){function t(e,n){var i=this;o(this,t),this._zone=n,this._eventNameToPlugin=new Map,e.forEach(function(t){return t.manager=i}),this._plugins=e.slice().reverse()}return s(t,[{key:"addEventListener",value:function(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}},{key:"addGlobalEventListener",value:function(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}},{key:"getZone",value:function(){return this._zone}},{key:"_findPluginFor",value:function(t){var e=this._eventNameToPlugin.get(t);if(e)return e;for(var n=this._plugins,i=0;i-1&&(e.splice(n,1),o+=t+".")}),o+=r,0!=e.length||0===r.length)return null;var a={};return a.domEventName=i,a.fullKey=o,a}},{key:"getEventFullKey",value:function(t){var e="",n=function(t){var e=t.key;if(null==e){if(null==(e=t.keyIdentifier))return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&Cd.hasOwnProperty(e)&&(e=Cd[e]))}return Sd[e]||e}(t);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),kd.forEach(function(i){i!=n&&(0,Ad[i])(t)&&(e+=i+".")}),e+=n}},{key:"eventCallback",value:function(t,e,i){return function(r){n.getEventFullKey(r)===t&&i.runGuarded(function(){return e(r)})}}},{key:"_normalizeKey",value:function(t){switch(t){case"esc":return"escape";default:return t}}}]),n}(ld);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Id=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return zi(Td)},token:t,providedIn:"root"}),t}(),Td=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this))._doc=t,i}return s(n,[{key:"sanitize",value:function(t,e){if(null==e)return null;switch(t){case Tr.NONE:return e;case Tr.HTML:return rr(e,"HTML")?ir(e):Mr(this._doc,String(e)).toString();case Tr.STYLE:return rr(e,"Style")?ir(e):e;case Tr.SCRIPT:if(rr(e,"Script"))return ir(e);throw new Error("unsafe value used in a script context");case Tr.URL:return or(e),rr(e,"URL")?ir(e):cr(String(e));case Tr.RESOURCE_URL:if(rr(e,"ResourceURL"))return ir(e);throw new Error("unsafe value used in a resource URL context (see https://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext ".concat(t," (see https://g.co/ng/security#xss)"))}}},{key:"bypassSecurityTrustHtml",value:function(t){return new Qi(t)}},{key:"bypassSecurityTrustStyle",value:function(t){return new Ji(t)}},{key:"bypassSecurityTrustScript",value:function(t){return new tr(t)}},{key:"bypassSecurityTrustUrl",value:function(t){return new er(t)}},{key:"bypassSecurityTrustResourceUrl",value:function(t){return new nr(t)}}]),n}(Id);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:function(){return t=zi(Ta),new Td(t.get(uh));var t},token:t,providedIn:"root"}),t}(),Dd=Wc(ih,"browser",[{provide:dc,useValue:"browser"},{provide:hc,useValue:function(){ed.makeCurrent(),od.init()},multi:!0},{provide:uh,useFactory:function(){return function(t){Fe=t}(document),document},deps:[]}]),Ed=[[],{provide:Ea,useValue:"root"},{provide:Nr,useFactory:function(){return new Nr},deps:[]},{provide:ad,useClass:xd,multi:!0,deps:[uh,Mc,dc]},{provide:ad,useClass:Md,multi:!0,deps:[uh]},[],{provide:yd,useClass:yd,deps:[sd,cd,lc]},{provide:El,useExisting:yd},{provide:ud,useExisting:cd},{provide:cd,useClass:cd,deps:[uh]},{provide:Lc,useClass:Lc,deps:[Mc]},{provide:sd,useClass:sd,deps:[ad,Mc]},[]],Od=function(){var t=function(){function t(e){if(o(this,t),e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return s(t,null,[{key:"withServerTransition",value:function(e){return{ngModule:t,providers:[{provide:lc,useValue:e.appId},{provide:id,useExisting:lc},rd]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(t,12))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:Ed,imports:[Kh,oh]}),t}();function Pd(){for(var t=arguments.length,e=new Array(t),n=0;n0){var i=t.slice(0,e),r=i.toLowerCase(),o=t.slice(e+1).trim();n.maybeSetNormalizedName(i,r),n.headers.has(r)?n.headers.get(r).push(o):n.headers.set(r,[o])}})}:function(){n.headers=new Map,Object.keys(e).forEach(function(t){var i=e[t],r=t.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(n.headers.set(r,i),n.maybeSetNormalizedName(t,r))})}:this.headers=new Map}return s(t,[{key:"has",value:function(t){return this.init(),this.headers.has(t.toLowerCase())}},{key:"get",value:function(t){this.init();var e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}},{key:"keys",value:function(){return this.init(),Array.from(this.normalizedNames.values())}},{key:"getAll",value:function(t){return this.init(),this.headers.get(t.toLowerCase())||null}},{key:"append",value:function(t,e){return this.clone({name:t,value:e,op:"a"})}},{key:"set",value:function(t,e){return this.clone({name:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({name:t,value:e,op:"d"})}},{key:"maybeSetNormalizedName",value:function(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}},{key:"init",value:function(){var e=this;this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(t){return e.applyUpdate(t)}),this.lazyUpdate=null))}},{key:"copyFrom",value:function(t){var e=this;t.init(),Array.from(t.headers.keys()).forEach(function(n){e.headers.set(n,t.headers.get(n)),e.normalizedNames.set(n,t.normalizedNames.get(n))})}},{key:"clone",value:function(e){var n=new t;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([e]),n}},{key:"applyUpdate",value:function(t){var e=t.name.toLowerCase();switch(t.op){case"a":case"s":var n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);var i=("a"===t.op?this.headers.get(e):void 0)||[];i.push.apply(i,b(n)),this.headers.set(e,i);break;case"d":var r=t.value;if(r){var o=this.headers.get(e);if(!o)return;0===(o=o.filter(function(t){return-1===r.indexOf(t)})).length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,o)}else this.headers.delete(e),this.normalizedNames.delete(e)}}},{key:"forEach",value:function(t){var e=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return t(e.normalizedNames.get(n),e.headers.get(n))})}}]),t}(),Hd=function(){function t(){o(this,t)}return s(t,[{key:"encodeKey",value:function(t){return Gd(t)}},{key:"encodeValue",value:function(t){return Gd(t)}},{key:"decodeKey",value:function(t){return decodeURIComponent(t)}},{key:"decodeValue",value:function(t){return decodeURIComponent(t)}}]),t}();function jd(t,e){var n=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(function(t){var i=t.indexOf("="),r=y(-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],2),o=r[0],a=r[1],s=n.get(o)||[];s.push(a),n.set(o,s)}),n}function Gd(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var Ud=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,t),this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new Hd,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=jd(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(function(t){var i=n.fromObject[t];e.map.set(t,Array.isArray(i)?i:[i])})):this.map=null}return s(t,[{key:"has",value:function(t){return this.init(),this.map.has(t)}},{key:"get",value:function(t){this.init();var e=this.map.get(t);return e?e[0]:null}},{key:"getAll",value:function(t){return this.init(),this.map.get(t)||null}},{key:"keys",value:function(){return this.init(),Array.from(this.map.keys())}},{key:"append",value:function(t,e){return this.clone({param:t,value:e,op:"a"})}},{key:"appendAll",value:function(t){var e=[];return Object.keys(t).forEach(function(n){var i=t[n];Array.isArray(i)?i.forEach(function(t){e.push({param:n,value:t,op:"a"})}):e.push({param:n,value:i,op:"a"})}),this.clone(e)}},{key:"set",value:function(t,e){return this.clone({param:t,value:e,op:"s"})}},{key:"delete",value:function(t,e){return this.clone({param:t,value:e,op:"d"})}},{key:"toString",value:function(){var t=this;return this.init(),this.keys().map(function(e){var n=t.encoder.encodeKey(e);return t.map.get(e).map(function(e){return n+"="+t.encoder.encodeValue(e)}).join("&")}).filter(function(t){return""!==t}).join("&")}},{key:"clone",value:function(e){var n=new t({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat(e),n}},{key:"init",value:function(){var t=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(e){return t.map.set(e,t.cloneFrom.map.get(e))}),this.updates.forEach(function(e){switch(e.op){case"a":case"s":var n=("a"===e.op?t.map.get(e.param):void 0)||[];n.push(e.value),t.map.set(e.param,n);break;case"d":if(void 0===e.value){t.map.delete(e.param);break}var i=t.map.get(e.param)||[],r=i.indexOf(e.value);-1!==r&&i.splice(r,1),i.length>0?t.map.set(e.param,i):t.map.delete(e.param)}}),this.cloneFrom=this.updates=null)}}]),t}();function Wd(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function Yd(t){return"undefined"!=typeof Blob&&t instanceof Blob}function qd(t){return"undefined"!=typeof FormData&&t instanceof FormData}var Xd=function(){function t(e,n,i,r){var a;if(o(this,t),this.url=n,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,a=r):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new Bd),this.params){var s=this.params.toString();if(0===s.length)this.urlWithParams=n;else{var l=n.indexOf("?");this.urlWithParams=n+(-1===l?"?":l0&&void 0!==arguments[0]?arguments[0]:{},n=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=void 0!==e.body?e.body:this.body,a=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,s=void 0!==e.reportProgress?e.reportProgress:this.reportProgress,l=e.headers||this.headers,u=e.params||this.params;return void 0!==e.setHeaders&&(l=Object.keys(e.setHeaders).reduce(function(t,n){return t.set(n,e.setHeaders[n])},l)),e.setParams&&(u=Object.keys(e.setParams).reduce(function(t,n){return t.set(n,e.setParams[n])},u)),new t(n,i,o,{params:u,headers:l,reportProgress:s,responseType:r,withCredentials:a})}}]),t}(),Zd=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({}),Kd=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"OK";o(this,t),this.headers=e.headers||new Bd,this.status=void 0!==e.status?e.status:n,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300},$d=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=e.call(this,i)).type=Zd.ResponseHeader,t}return s(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Kd),Qd=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=e.call(this,i)).type=Zd.Response,t.body=void 0!==i.body?i.body:null,t}return s(n,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new n({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}]),n}(Kd),Jd=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t,0,"Unknown Error")).name="HttpErrorResponse",i.ok=!1,i.message=i.status>=200&&i.status<300?"Http failure during parsing for ".concat(t.url||"(unknown url)"):"Http failure response for ".concat(t.url||"(unknown url)",": ").concat(t.status," ").concat(t.statusText),i.error=t.error||null,i}return n}(Kd);function tf(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}var ef=function(){var t=function(){function t(e){o(this,t),this.handler=e}return s(t,[{key:"request",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t instanceof Xd)n=t;else{var o=void 0;o=r.headers instanceof Bd?r.headers:new Bd(r.headers);var a=void 0;r.params&&(a=r.params instanceof Ud?r.params:new Ud({fromObject:r.params})),n=new Xd(t,e,void 0!==r.body?r.body:null,{headers:o,params:a,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}var s=Pd(n).pipe(Rd(function(t){return i.handler.handle(t)}));if(t instanceof Xd||"events"===r.observe)return s;var l=s.pipe(Ld(function(t){return t instanceof Qd}));switch(r.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(q(function(t){if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return l.pipe(q(function(t){if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return l.pipe(q(function(t){if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return l.pipe(q(function(t){return t.body}))}case"response":return l;default:throw new Error("Unreachable: unhandled observe type ".concat(r.observe,"}"))}}},{key:"delete",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("DELETE",t,e)}},{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("GET",t,e)}},{key:"head",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("HEAD",t,e)}},{key:"jsonp",value:function(t,e){return this.request("JSONP",t,{params:(new Ud).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}},{key:"options",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request("OPTIONS",t,e)}},{key:"patch",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PATCH",t,tf(n,e))}},{key:"post",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("POST",t,tf(n,e))}},{key:"put",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request("PUT",t,tf(n,e))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Vd))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),nf=function(){function t(e,n){o(this,t),this.next=e,this.interceptor=n}return s(t,[{key:"handle",value:function(t){return this.interceptor.intercept(t,this.next)}}]),t}(),rf=new wi("HTTP_INTERCEPTORS"),of=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"intercept",value:function(t,e){return e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),af=/^\)\]\}',?\n/,sf=function t(){o(this,t)},lf=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"build",value:function(){return new XMLHttpRequest}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),uf=function(){var t=function(){function t(e){o(this,t),this.xhrFactory=e}return s(t,[{key:"handle",value:function(t){var e=this;if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new z(function(n){var i=e.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach(function(t,e){return i.setRequestHeader(t,e.join(","))}),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){var r=t.detectContentTypeHeader();null!==r&&i.setRequestHeader("Content-Type",r)}if(t.responseType){var o=t.responseType.toLowerCase();i.responseType="json"!==o?o:"text"}var a=t.serializeBody(),s=null,l=function(){if(null!==s)return s;var e=1223===i.status?204:i.status,n=i.statusText||"OK",r=new Bd(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return s=new $d({headers:r,status:e,statusText:n,url:o})},u=function(){var e=l(),r=e.headers,o=e.status,a=e.statusText,s=e.url,u=null;204!==o&&(u=void 0===i.response?i.responseText:i.response),0===o&&(o=u?200:0);var c=o>=200&&o<300;if("json"===t.responseType&&"string"==typeof u){var h=u;u=u.replace(af,"");try{u=""!==u?JSON.parse(u):null}catch(d){u=h,c&&(c=!1,u={error:d,text:u})}}c?(n.next(new Qd({body:u,headers:r,status:o,statusText:a,url:s||void 0})),n.complete()):n.error(new Jd({error:u,headers:r,status:o,statusText:a,url:s||void 0}))},c=function(t){var e=l(),r=new Jd({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:e.url||void 0});n.error(r)},h=!1,d=function(e){h||(n.next(l()),h=!0);var r={type:Zd.DownloadProgress,loaded:e.loaded};e.lengthComputable&&(r.total=e.total),"text"===t.responseType&&i.responseText&&(r.partialText=i.responseText),n.next(r)},f=function(t){var e={type:Zd.UploadProgress,loaded:t.loaded};t.lengthComputable&&(e.total=t.total),n.next(e)};return i.addEventListener("load",u),i.addEventListener("error",c),i.addEventListener("timeout",c),i.addEventListener("abort",c),t.reportProgress&&(i.addEventListener("progress",d),null!==a&&i.upload&&i.upload.addEventListener("progress",f)),i.send(a),n.next({type:Zd.Sent}),function(){i.removeEventListener("error",c),i.removeEventListener("abort",c),i.removeEventListener("load",u),i.removeEventListener("timeout",c),t.reportProgress&&(i.removeEventListener("progress",d),null!==a&&i.upload&&i.upload.removeEventListener("progress",f)),i.readyState!==i.DONE&&i.abort()}})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(sf))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),cf=new wi("XSRF_COOKIE_NAME"),hf=new wi("XSRF_HEADER_NAME"),df=function t(){o(this,t)},ff=function(){var t=function(){function t(e,n,i){o(this,t),this.doc=e,this.platform=n,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return s(t,[{key:"getToken",value:function(){if("server"===this.platform)return null;var t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Dh(t,this.cookieName),this.lastCookieString=t),this.lastToken}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(uh),zi(dc),zi(cf))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),pf=function(){var t=function(){function t(e,n){o(this,t),this.tokenService=e,this.headerName=n}return s(t,[{key:"intercept",value:function(t,e){var n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);var i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(df),zi(hf))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),gf=function(){var t=function(){function t(e,n){o(this,t),this.backend=e,this.injector=n,this.chain=null}return s(t,[{key:"handle",value:function(t){if(null===this.chain){var e=this.injector.get(rf,[]);this.chain=e.reduceRight(function(t,e){return new nf(t,e)},this.backend)}return this.chain.handle(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(zd),zi(Ya))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),mf=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"disable",value:function(){return{ngModule:t,providers:[{provide:pf,useClass:of}]}}},{key:"withOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[e.cookieName?{provide:cf,useValue:e.cookieName}:[],e.headerName?{provide:hf,useValue:e.headerName}:[]]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[pf,{provide:rf,useExisting:pf,multi:!0},{provide:df,useClass:ff},{provide:cf,useValue:"XSRF-TOKEN"},{provide:hf,useValue:"X-XSRF-TOKEN"}]}),t}(),vf=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[ef,{provide:Vd,useClass:gf},uf,{provide:zd,useExisting:uf},lf,{provide:sf,useExisting:lf}],imports:[[mf.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t}(),yf=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this))._value=t,i}return s(n,[{key:"_subscribe",value:function(t){var e=r(i(n.prototype),"_subscribe",this).call(this,t);return e&&!e.closed&&t.next(this._value),e}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new H;return this._value}},{key:"next",value:function(t){r(i(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(U),_f=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"notifyNext",value:function(t,e,n,i,r){this.destination.next(e)}},{key:"notifyError",value:function(t,e){this.destination.error(t)}},{key:"notifyComplete",value:function(t){this.destination.complete()}}]),n}(R),bf=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this)).parent=t,a.outerValue=i,a.outerIndex=r,a.index=0,a}return s(n,[{key:"_next",value:function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}},{key:"_error",value:function(t){this.parent.notifyError(t,this),this.unsubscribe()}},{key:"_complete",value:function(){this.parent.notifyComplete(this),this.unsubscribe()}}]),n}(R);function wf(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new bf(t,n,i);if(!r.closed)return e instanceof z?e.subscribe(r):et(e)(r)}var xf={};function kf(){for(var t=arguments.length,e=new Array(t),n=0;n=2&&(n=!0),function(i){return i.lift(new Hf(t,e,n))}}var Hf=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];o(this,t),this.accumulator=e,this.seed=n,this.hasSeed=i}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new jf(t,this.accumulator,this.seed,this.hasSeed))}}]),t}(),jf=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t)).accumulator=i,s._seed=r,s.hasSeed=a,s.index=0,s}return s(n,[{key:"_next",value:function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}},{key:"_tryNext",value:function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(i){this.destination.error(i)}this.seed=e,this.destination.next(e)}},{key:"seed",get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t}}]),n}(R);function Gf(t){return function(e){var n=new Uf(t),i=e.lift(n);return n.caught=i}}var Uf=function(){function t(e){o(this,t),this.selector=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new Wf(t,this.selector,this.caught))}}]),t}(),Wf=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).selector=i,a.caught=r,a}return s(n,[{key:"error",value:function(t){if(!this.isStopped){var e;try{e=this.selector(t,this.caught)}catch(s){return void r(i(n.prototype),"error",this).call(this,s)}this._unsubscribeAndRecycle();var o=new rt(this);this.add(o);var a=at(e,o);a!==o&&this.add(a)}}}]),n}(ot);function Yf(t){return function(e){return 0===t?Df():e.lift(new qf(t))}}var qf=function(){function t(e){if(o(this,t),this.total=e,this.total<0)throw new Lf}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new Xf(t,this.total))}}]),t}(),Xf=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).total=i,r.ring=new Array,r.count=0,r}return s(n,[{key:"_next",value:function(t){var e=this.ring,n=this.total,i=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,i=this.ring,r=0;r0&&void 0!==arguments[0]?arguments[0]:Qf;return function(e){return e.lift(new Kf(t))}}var Kf=function(){function t(e){o(this,t),this.errorFactory=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new $f(t,this.errorFactory))}}]),t}(),$f=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).errorFactory=i,r.hasValue=!1,r}return s(n,[{key:"_next",value:function(t){this.hasValue=!0,this.destination.next(t)}},{key:"_complete",value:function(){if(this.hasValue)return this.destination.complete();var t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}]),n}(R);function Qf(){return new Af}function Jf(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(e){return e.lift(new tp(t))}}var tp=function(){function t(e){o(this,t),this.defaultValue=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new ep(t,this.defaultValue))}}]),t}(),ep=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).defaultValue=i,r.isEmpty=!0,r}return s(n,[{key:"_next",value:function(t){this.isEmpty=!1,this.destination.next(t)}},{key:"_complete",value:function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}]),n}(R);function np(t,e){var n=arguments.length>=2;return function(i){return i.pipe(t?Ld(function(e,n){return t(e,n,i)}):F,Nf(1),n?Jf(e):Zf(function(){return new Af}))}}function ip(){}function rp(t,e,n){return function(i){return i.lift(new op(t,e,n))}}var op=function(){function t(e,n,i){o(this,t),this.nextOrObserver=e,this.error=n,this.complete=i}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new ap(t,this.nextOrObserver,this.error,this.complete))}}]),t}(),ap=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t))._tapNext=ip,s._tapError=ip,s._tapComplete=ip,s._tapError=r||ip,s._tapComplete=a||ip,C(i)?(s._context=d(s),s._tapNext=i):i&&(s._context=i,s._tapNext=i.next||ip,s._tapError=i.error||ip,s._tapComplete=i.complete||ip),s}return s(n,[{key:"_next",value:function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}},{key:"_error",value:function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}},{key:"_complete",value:function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}]),n}(R),sp=function(){function t(e){o(this,t),this.callback=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new lp(t,this.callback))}}]),t}(),lp=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).add(new M(i)),r}return n}(R),up=function t(e,n){o(this,t),this.id=e,this.url=n},cp=function(t){u(n,t);var e=p(n);function n(t,i){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"imperative",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return o(this,n),(r=e.call(this,t,i)).navigationTrigger=a,r.restoredState=s,r}return s(n,[{key:"toString",value:function(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(up),hp=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t,i)).urlAfterRedirects=r,a}return s(n,[{key:"toString",value:function(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}}]),n}(up),dp=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t,i)).reason=r,a}return s(n,[{key:"toString",value:function(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}}]),n}(up),fp=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t,i)).error=r,a}return s(n,[{key:"toString",value:function(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}}]),n}(up),pp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),gp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),mp=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s){var l;return o(this,n),(l=e.call(this,t,i)).urlAfterRedirects=r,l.state=a,l.shouldActivate=s,l}return s(n,[{key:"toString",value:function(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}}]),n}(up),vp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),yp=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i)).urlAfterRedirects=r,s.state=a,s}return s(n,[{key:"toString",value:function(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}}]),n}(up),_p=function(){function t(e){o(this,t),this.route=e}return s(t,[{key:"toString",value:function(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}}]),t}(),bp=function(){function t(e){o(this,t),this.route=e}return s(t,[{key:"toString",value:function(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}}]),t}(),wp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ChildActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),xp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ChildActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),kp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ActivationStart(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),Sp=function(){function t(e){o(this,t),this.snapshot=e}return s(t,[{key:"toString",value:function(){return"ActivationEnd(path: '".concat(this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"","')")}}]),t}(),Cp=function(){function t(e,n,i){o(this,t),this.routerEvent=e,this.position=n,this.anchor=i}return s(t,[{key:"toString",value:function(){var t=this.position?"".concat(this.position[0],", ").concat(this.position[1]):null;return"Scroll(anchor: '".concat(this.anchor,"', position: '").concat(t,"')")}}]),t}(),Ap="primary",Mp=function(){function t(e){o(this,t),this.params=e||{}}return s(t,[{key:"has",value:function(t){return Object.prototype.hasOwnProperty.call(this.params,t)}},{key:"get",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e[0]:e}return null}},{key:"getAll",value:function(t){if(this.has(t)){var e=this.params[t];return Array.isArray(e)?e:[e]}return[]}},{key:"keys",get:function(){return Object.keys(this.params)}}]),t}();function Ip(t){return new Mp(t)}function Tp(t){var e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function Dp(t,e,n){var i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.length0?t[t.length-1]:null}function Lp(t,e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)}function Np(t){return ks(t)?t:ws(t)?it(Promise.resolve(t)):Pd(t)}function Fp(t,e,n){return n?function(t,e){return Ep(t,e)}(t.queryParams,e.queryParams)&&Vp(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(function(n){return Op(t[n],e[n])})}(t.queryParams,e.queryParams)&&zp(t.root,e.root)}function Vp(t,e){if(!Up(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(var n in e.children){if(!t.children[n])return!1;if(!Vp(t.children[n],e.children[n]))return!1}return!0}function zp(t,e){return Bp(t,e,e.segments)}function Bp(t,e,n){if(t.segments.length>n.length)return!!Up(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!Up(t.segments,n))return!1;for(var i in e.children){if(!t.children[i])return!1;if(!zp(t.children[i],e.children[i]))return!1}return!0}var r=n.slice(0,t.segments.length),o=n.slice(t.segments.length);return!!Up(t.segments,r)&&!!t.children.primary&&Bp(t.children.primary,e,o)}var Hp=function(){function t(e,n,i){o(this,t),this.root=e,this.queryParams=n,this.fragment=i}return s(t,[{key:"toString",value:function(){return qp.serialize(this)}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ip(this.queryParams)),this._queryParamMap}}]),t}(),jp=function(){function t(e,n){var i=this;o(this,t),this.segments=e,this.children=n,this.parent=null,Lp(n,function(t,e){return t.parent=i})}return s(t,[{key:"hasChildren",value:function(){return this.numberOfChildren>0}},{key:"toString",value:function(){return Xp(this)}},{key:"numberOfChildren",get:function(){return Object.keys(this.children).length}}]),t}(),Gp=function(){function t(e,n){o(this,t),this.path=e,this.parameters=n}return s(t,[{key:"toString",value:function(){return eg(this)}},{key:"parameterMap",get:function(){return this._parameterMap||(this._parameterMap=Ip(this.parameters)),this._parameterMap}}]),t}();function Up(t,e){return t.length===e.length&&t.every(function(t,n){return t.path===e[n].path})}var Wp=function t(){o(this,t)},Yp=function(){function t(){o(this,t)}return s(t,[{key:"parse",value:function(t){var e=new ag(t);return new Hp(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}},{key:"serialize",value:function(t){var e,n,i="/".concat(Zp(t.root,!0)),r=(e=t.queryParams,(n=Object.keys(e).map(function(t){var n=e[t];return Array.isArray(n)?n.map(function(e){return"".concat($p(t),"=").concat($p(e))}).join("&"):"".concat($p(t),"=").concat($p(n))})).length?"?".concat(n.join("&")):""),o="string"==typeof t.fragment?"#".concat(encodeURI(t.fragment)):"";return"".concat(i).concat(r).concat(o)}}]),t}(),qp=new Yp;function Xp(t){return t.segments.map(function(t){return eg(t)}).join("/")}function Zp(t,e){if(!t.hasChildren())return Xp(t);if(e){var n=t.children.primary?Zp(t.children.primary,!1):"",i=[];return Lp(t.children,function(t,e){e!==Ap&&i.push("".concat(e,":").concat(Zp(t,!1)))}),i.length>0?"".concat(n,"(").concat(i.join("//"),")"):n}var r=function(t,e){var n=[];return Lp(t.children,function(t,i){i===Ap&&(n=n.concat(e(t,i)))}),Lp(t.children,function(t,i){i!==Ap&&(n=n.concat(e(t,i)))}),n}(t,function(e,n){return n===Ap?[Zp(t.children.primary,!1)]:["".concat(n,":").concat(Zp(e,!1))]});return 1===Object.keys(t.children).length&&null!=t.children.primary?"".concat(Xp(t),"/").concat(r[0]):"".concat(Xp(t),"/(").concat(r.join("//"),")")}function Kp(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $p(t){return Kp(t).replace(/%3B/gi,";")}function Qp(t){return Kp(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Jp(t){return decodeURIComponent(t)}function tg(t){return Jp(t.replace(/\+/g,"%20"))}function eg(t){return"".concat(Qp(t.path)).concat((e=t.parameters,Object.keys(e).map(function(t){return";".concat(Qp(t),"=").concat(Qp(e[t]))}).join("")));var e}var ng=/^[^\/()?;=#]+/;function ig(t){var e=t.match(ng);return e?e[0]:""}var rg=/^[^=?&#]+/,og=/^[^?&#]+/,ag=function(){function t(e){o(this,t),this.url=e,this.remaining=e}return s(t,[{key:"parseRootSegment",value:function(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new jp([],{}):new jp([],this.parseChildren())}},{key:"parseQueryParams",value:function(){var t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}},{key:"parseFragment",value:function(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}},{key:"parseChildren",value:function(){if(""===this.remaining)return{};this.consumeOptional("/");var t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());var e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));var n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new jp(t,e)),n}},{key:"parseSegment",value:function(){var t=ig(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error("Empty path url segment cannot have parameters: '".concat(this.remaining,"'."));return this.capture(t),new Gp(Jp(t),this.parseMatrixParams())}},{key:"parseMatrixParams",value:function(){for(var t={};this.consumeOptional(";");)this.parseParam(t);return t}},{key:"parseParam",value:function(t){var e=ig(this.remaining);if(e){this.capture(e);var n="";if(this.consumeOptional("=")){var i=ig(this.remaining);i&&this.capture(n=i)}t[Jp(e)]=Jp(n)}}},{key:"parseQueryParam",value:function(t){var e,n=(e=this.remaining.match(rg))?e[0]:"";if(n){this.capture(n);var i="";if(this.consumeOptional("=")){var r=function(t){var e=t.match(og);return e?e[0]:""}(this.remaining);r&&this.capture(i=r)}var o=tg(n),a=tg(i);if(t.hasOwnProperty(o)){var s=t[o];Array.isArray(s)||(t[o]=s=[s]),s.push(a)}else t[o]=a}}},{key:"parseParens",value:function(t){var e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){var n=ig(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error("Cannot parse url '".concat(this.url,"'"));var r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):t&&(r=Ap);var o=this.parseChildren();e[r]=1===Object.keys(o).length?o.primary:new jp([],o),this.consumeOptional("//")}return e}},{key:"peekStartsWith",value:function(t){return this.remaining.startsWith(t)}},{key:"consumeOptional",value:function(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}},{key:"capture",value:function(t){if(!this.consumeOptional(t))throw new Error('Expected "'.concat(t,'".'))}}]),t}(),sg=function(){function t(e){o(this,t),this._root=e}return s(t,[{key:"parent",value:function(t){var e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}},{key:"children",value:function(t){var e=lg(t,this._root);return e?e.children.map(function(t){return t.value}):[]}},{key:"firstChild",value:function(t){var e=lg(t,this._root);return e&&e.children.length>0?e.children[0].value:null}},{key:"siblings",value:function(t){var e=ug(t,this._root);return e.length<2?[]:e[e.length-2].children.map(function(t){return t.value}).filter(function(e){return e!==t})}},{key:"pathFromRoot",value:function(t){return ug(t,this._root).map(function(t){return t.value})}},{key:"root",get:function(){return this._root.value}}]),t}();function lg(t,e){if(t===e.value)return e;var n,i=v(e.children);try{for(i.s();!(n=i.n()).done;){var r=lg(t,n.value);if(r)return r}}catch(o){i.e(o)}finally{i.f()}return null}function ug(t,e){if(t===e.value)return[e];var n,i=v(e.children);try{for(i.s();!(n=i.n()).done;){var r=ug(t,n.value);if(r.length)return r.unshift(e),r}}catch(o){i.e(o)}finally{i.f()}return[]}var cg=function(){function t(e,n){o(this,t),this.value=e,this.children=n}return s(t,[{key:"toString",value:function(){return"TreeNode(".concat(this.value,")")}}]),t}();function hg(t){var e={};return t&&t.children.forEach(function(t){return e[t.value.outlet]=t}),e}var dg=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).snapshot=i,_g(d(r),t),r}return s(n,[{key:"toString",value:function(){return this.snapshot.toString()}}]),n}(sg);function fg(t,e){var n=function(t,e){var n=new vg([],{},{},"",{},Ap,e,null,t.root,-1,{});return new yg("",new cg(n,[]))}(t,e),i=new yf([new Gp("",{})]),r=new yf({}),o=new yf({}),a=new yf({}),s=new yf(""),l=new pg(i,r,a,s,o,Ap,e,n.root);return l.snapshot=n.root,new dg(new cg(l,[]),n)}var pg=function(){function t(e,n,i,r,a,s,l,u){o(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=s,this.component=l,this._futureSnapshot=u}return s(t,[{key:"toString",value:function(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}},{key:"routeConfig",get:function(){return this._futureSnapshot.routeConfig}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=this.params.pipe(q(function(t){return Ip(t)}))),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(q(function(t){return Ip(t)}))),this._queryParamMap}}]),t}();function gg(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"emptyOnly",n=t.pathFromRoot,i=0;if("always"!==e)for(i=n.length-1;i>=1;){var r=n[i],o=n[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return mg(n.slice(i))}function mg(t){return t.reduce(function(t,e){return{params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}},{params:{},data:{},resolve:{}})}var vg=function(){function t(e,n,i,r,a,s,l,u,c,h,d){o(this,t),this.url=e,this.params=n,this.queryParams=i,this.fragment=r,this.data=a,this.outlet=s,this.component=l,this.routeConfig=u,this._urlSegment=c,this._lastPathIndex=h,this._resolve=d}return s(t,[{key:"toString",value:function(){var t=this.url.map(function(t){return t.toString()}).join("/"),e=this.routeConfig?this.routeConfig.path:"";return"Route(url:'".concat(t,"', path:'").concat(e,"')")}},{key:"root",get:function(){return this._routerState.root}},{key:"parent",get:function(){return this._routerState.parent(this)}},{key:"firstChild",get:function(){return this._routerState.firstChild(this)}},{key:"children",get:function(){return this._routerState.children(this)}},{key:"pathFromRoot",get:function(){return this._routerState.pathFromRoot(this)}},{key:"paramMap",get:function(){return this._paramMap||(this._paramMap=Ip(this.params)),this._paramMap}},{key:"queryParamMap",get:function(){return this._queryParamMap||(this._queryParamMap=Ip(this.queryParams)),this._queryParamMap}}]),t}(),yg=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,i)).url=t,_g(d(r),i),r}return s(n,[{key:"toString",value:function(){return bg(this._root)}}]),n}(sg);function _g(t,e){e.value._routerState=t,e.children.forEach(function(e){return _g(t,e)})}function bg(t){var e=t.children.length>0?" { ".concat(t.children.map(bg).join(", ")," } "):"";return"".concat(t.value).concat(e)}function wg(t){if(t.snapshot){var e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,Ep(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),Ep(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(var n=0;nr;){if(o-=r,!(i=i.parent))throw new Error("Invalid number of '../'");r=i.segments.length}return new Eg(i,!1,r-o)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+r,t.numberOfDoubleDots)}(o,e,t),s=a.processChildren?Pg(a.segmentGroup,a.index,o.commands):Og(a.segmentGroup,a.index,o.commands);return Ig(a.segmentGroup,s,e,i,r)}function Ag(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Mg(t){return"object"==typeof t&&null!=t&&t.outlets}function Ig(t,e,n,i,r){var o={};return i&&Lp(i,function(t,e){o[e]=Array.isArray(t)?t.map(function(t){return"".concat(t)}):"".concat(t)}),new Hp(n.root===t?e:Tg(n.root,t,e),o,r)}function Tg(t,e,n){var i={};return Lp(t.children,function(t,r){i[r]=t===e?n:Tg(t,e,n)}),new jp(t.segments,i)}var Dg=function(){function t(e,n,i){if(o(this,t),this.isAbsolute=e,this.numberOfDoubleDots=n,this.commands=i,e&&i.length>0&&Ag(i[0]))throw new Error("Root segment cannot have matrix parameters");var r=i.find(Mg);if(r&&r!==Rp(i))throw new Error("{outlets:{}} has to be the last command")}return s(t,[{key:"toRoot",value:function(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}]),t}(),Eg=function t(e,n,i){o(this,t),this.segmentGroup=e,this.processChildren=n,this.index=i};function Og(t,e,n){if(t||(t=new jp([],{})),0===t.segments.length&&t.hasChildren())return Pg(t,e,n);var i=function(t,e,n){for(var i=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};r=n.length)return o;var a=t.segments[r],s=n[i];if(Mg(s))break;var l="".concat(s),u=i0&&void 0===l)break;if(l&&u&&"object"==typeof u&&void 0===u.outlets){if(!Fg(l,u,a))return o;i+=2}else{if(!Fg(l,{},a))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex1&&void 0!==arguments[1]?arguments[1]:"",n=0;n0)?Object.assign({},Qg):{matched:!0,consumedSegments:[],lastChild:0,parameters:{},positionalParamSegments:{}};var r=(e.matcher||Dp)(n,t,e);if(!r)return Object.assign({},Qg);var o={};Lp(r.posParams,function(t,e){o[e]=t.path});var a=r.consumed.length>0?Object.assign(Object.assign({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,lastChild:r.consumed.length,parameters:a,positionalParamSegments:null!==(i=r.posParams)&&void 0!==i?i:{}}}function tm(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"corrected";if(n.length>0&&im(t,n,i)){var o=new jp(e,nm(t,e,i,new jp(n,t.children)));return o._sourceSegment=t,o._segmentIndexShift=e.length,{segmentGroup:o,slicedSegments:[]}}if(0===n.length&&rm(t,n,i)){var a=new jp(t.segments,em(t,e,n,i,t.children,r));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:n}}var s=new jp(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function em(t,e,n,i,r,o){var a,s={},l=v(i);try{for(l.s();!(a=l.n()).done;){var u=a.value;if(om(t,n,u)&&!r[Kg(u)]){var c=new jp([],{});c._sourceSegment=t,c._segmentIndexShift="legacy"===o?t.segments.length:e.length,s[Kg(u)]=c}}}catch(h){l.e(h)}finally{l.f()}return Object.assign(Object.assign({},r),s)}function nm(t,e,n,i){var r={};r.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;var o,a=v(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(""===s.path&&Kg(s)!==Ap){var l=new jp([],{});l._sourceSegment=t,l._segmentIndexShift=e.length,r[Kg(s)]=l}}}catch(u){a.e(u)}finally{a.f()}return r}function im(t,e,n){return n.some(function(n){return om(t,e,n)&&Kg(n)!==Ap})}function rm(t,e,n){return n.some(function(n){return om(t,e,n)})}function om(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path}function am(t,e,n,i){return!!(Kg(t)===i||i!==Ap&&om(e,n,t))&&("**"===t.path||Jg(e,t,n).matched)}function sm(t,e,n){return 0===e.length&&!t.children[n]}var lm=function t(e){o(this,t),this.segmentGroup=e||null},um=function t(e){o(this,t),this.urlTree=e};function cm(t){return new z(function(e){return e.error(new lm(t))})}function hm(t){return new z(function(e){return e.error(new um(t))})}function dm(t){return new z(function(e){return e.error(new Error("Only absolute redirects can have named outlets. redirectTo: '".concat(t,"'")))})}var fm=function(){function t(e,n,i,r,a){o(this,t),this.configLoader=n,this.urlSerializer=i,this.urlTree=r,this.config=a,this.allowRedirects=!0,this.ngModule=e.get(hu)}return s(t,[{key:"apply",value:function(){var t=this,e=tm(this.urlTree.root,[],[],this.config).segmentGroup,n=new jp(e.segments,e.children);return this.expandSegmentGroup(this.ngModule,this.config,n,Ap).pipe(q(function(e){return t.createUrlTree(pm(e),t.urlTree.queryParams,t.urlTree.fragment)})).pipe(Gf(function(e){if(e instanceof um)return t.allowRedirects=!1,t.match(e.urlTree);if(e instanceof lm)throw t.noMatchError(e);throw e}))}},{key:"match",value:function(t){var e=this;return this.expandSegmentGroup(this.ngModule,this.config,t.root,Ap).pipe(q(function(n){return e.createUrlTree(pm(n),t.queryParams,t.fragment)})).pipe(Gf(function(t){if(t instanceof lm)throw e.noMatchError(t);throw t}))}},{key:"noMatchError",value:function(t){return new Error("Cannot match any routes. URL Segment: '".concat(t.segmentGroup,"'"))}},{key:"createUrlTree",value:function(t,e,n){var i=t.segments.length>0?new jp([],_({},Ap,t)):t;return new Hp(i,e,n)}},{key:"expandSegmentGroup",value:function(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(q(function(t){return new jp([],t)})):this.expandSegment(t,n,e,n.segments,i,!0)}},{key:"expandChildren",value:function(t,e,n){for(var i=this,r=[],o=0,a=Object.keys(n.children);o=2;return function(i){return i.pipe(t?Ld(function(e,n){return t(e,n,i)}):F,Yf(1),n?Jf(e):Zf(function(){return new Af}))}}())}},{key:"expandSegment",value:function(t,e,n,i,r,o){var a=this;return it(n).pipe(Rd(function(s){return a.expandSegmentAgainstRoute(t,e,n,s,i,r,o).pipe(Gf(function(t){if(t instanceof lm)return Pd(null);throw t}))}),np(function(t){return!!t}),Gf(function(t,n){if(t instanceof Af||"EmptyError"===t.name){if(sm(e,i,r))return Pd(new jp([],{}));throw new lm(e)}throw t}))}},{key:"expandSegmentAgainstRoute",value:function(t,e,n,i,r,o,a){return am(i,e,r,o)?void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,r,o):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,o):cm(e):cm(e)}},{key:"expandSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,o){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,o):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,o)}},{key:"expandWildCardWithParamsAgainstRouteUsingRedirect",value:function(t,e,n,i){var r=this,o=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?hm(o):this.lineralizeSegments(n,o).pipe(st(function(n){var o=new jp(n,{});return r.expandSegment(t,o,e,n,i,!1)}))}},{key:"expandRegularSegmentAgainstRouteUsingRedirect",value:function(t,e,n,i,r,o){var a=this,s=Jg(e,i,r),l=s.consumedSegments,u=s.lastChild,c=s.positionalParamSegments;if(!s.matched)return cm(e);var h=this.applyRedirectCommands(l,i.redirectTo,c);return i.redirectTo.startsWith("/")?hm(h):this.lineralizeSegments(i,h).pipe(st(function(i){return a.expandSegment(t,e,n,i.concat(r.slice(u)),o,!1)}))}},{key:"matchSegmentAgainstRoute",value:function(t,e,n,i,r){var o=this;if("**"===n.path)return n.loadChildren?(n._loadedConfig?Pd(n._loadedConfig):this.configLoader.load(t.injector,n)).pipe(q(function(t){return n._loadedConfig=t,new jp(i,{})})):Pd(new jp(i,{}));var a=Jg(e,n,i),s=a.consumedSegments,l=a.lastChild;if(!a.matched)return cm(e);var u=i.slice(l);return this.getChildConfig(t,n,i).pipe(st(function(t){var i=t.module,a=t.routes,l=tm(e,s,u,a),c=l.segmentGroup,h=l.slicedSegments,d=new jp(c.segments,c.children);if(0===h.length&&d.hasChildren())return o.expandChildren(i,a,d).pipe(q(function(t){return new jp(s,t)}));if(0===a.length&&0===h.length)return Pd(new jp(s,{}));var f=Kg(n)===r;return o.expandSegment(i,d,a,h,f?Ap:r,!0).pipe(q(function(t){return new jp(s.concat(t.segments),t.children)}))}))}},{key:"getChildConfig",value:function(t,e,n){var i=this;return e.children?Pd(new Bg(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Pd(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(st(function(n){return n?i.configLoader.load(t.injector,e).pipe(q(function(t){return e._loadedConfig=t,t})):function(t){return new z(function(e){return e.error(Tp("Cannot load children because the guard of the route \"path: '".concat(t.path,"'\" returned false")))})}(e)})):Pd(new Bg([],t))}},{key:"runCanLoadGuards",value:function(t,e,n){var i=this,r=e.canLoad;return r&&0!==r.length?Pd(r.map(function(i){var r,o=t.get(i);if(function(t){return t&&Hg(t.canLoad)}(o))r=o.canLoad(e,n);else{if(!Hg(o))throw new Error("Invalid CanLoad guard");r=o(e,n)}return Np(r)})).pipe(Ug(),rp(function(t){if(jg(t)){var e=Tp('Redirecting to "'.concat(i.urlSerializer.serialize(t),'"'));throw e.url=t,e}}),q(function(t){return!0===t})):Pd(!0)}},{key:"lineralizeSegments",value:function(t,e){for(var n=[],i=e.root;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Pd(n);if(i.numberOfChildren>1||!i.children.primary)return dm(t.redirectTo);i=i.children.primary}}},{key:"applyRedirectCommands",value:function(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}},{key:"applyRedirectCreatreUrlTree",value:function(t,e,n,i){var r=this.createSegmentGroup(t,e.root,n,i);return new Hp(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}},{key:"createQueryParams",value:function(t,e){var n={};return Lp(t,function(t,i){if("string"==typeof t&&t.startsWith(":")){var r=t.substring(1);n[i]=e[r]}else n[i]=t}),n}},{key:"createSegmentGroup",value:function(t,e,n,i){var r=this,o=this.createSegments(t,e.segments,n,i),a={};return Lp(e.children,function(e,o){a[o]=r.createSegmentGroup(t,e,n,i)}),new jp(o,a)}},{key:"createSegments",value:function(t,e,n,i){var r=this;return e.map(function(e){return e.path.startsWith(":")?r.findPosParam(t,e,i):r.findOrReturn(e,n)})}},{key:"findPosParam",value:function(t,e,n){var i=n[e.path.substring(1)];if(!i)throw new Error("Cannot redirect to '".concat(t,"'. Cannot find '").concat(e.path,"'."));return i}},{key:"findOrReturn",value:function(t,e){var n,i=0,r=v(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.path===t.path)return e.splice(i),o;i++}}catch(a){r.e(a)}finally{r.f()}return t}}]),t}();function pm(t){for(var e={},n=0,i=Object.keys(t.children);n0||o.hasChildren())&&(e[r]=o)}return function(t){if(1===t.numberOfChildren&&t.children.primary){var e=t.children.primary;return new jp(t.segments.concat(e.segments),e.children)}return t}(new jp(t.segments,e))}var gm=function t(e){o(this,t),this.path=e,this.route=this.path[this.path.length-1]},mm=function t(e,n){o(this,t),this.component=e,this.route=n};function vm(t,e,n){var i=function(t){if(!t)return null;for(var e=t.parent;e;e=e.parent){var n=e.routeConfig;if(n&&n._loadedConfig)return n._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function ym(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=hg(e);return t.children.forEach(function(t){_m(t,o[t.value.outlet],n,i.concat([t.value]),r),delete o[t.value.outlet]}),Lp(o,function(t,e){return wm(t,n.getContext(e),r)}),r}function _m(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{canDeactivateChecks:[],canActivateChecks:[]},o=t.value,a=e?e.value:null,s=n?n.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){var l=bm(a,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new gm(i)):(o.data=a.data,o._resolvedData=a._resolvedData),ym(t,e,o.component?s?s.children:null:n,i,r),l&&s&&s.outlet&&s.outlet.isActivated&&r.canDeactivateChecks.push(new mm(s.outlet.component,a))}else a&&wm(e,s,r),r.canActivateChecks.push(new gm(i)),ym(t,null,o.component?s?s.children:null:n,i,r);return r}function bm(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Up(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Up(t.url,e.url)||!Ep(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!xg(t,e)||!Ep(t.queryParams,e.queryParams);case"paramsChange":default:return!xg(t,e)}}function wm(t,e,n){var i=hg(t),r=t.value;Lp(i,function(t,i){wm(t,r.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new mm(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}var xm=function t(){o(this,t)};function km(t){return new z(function(e){return e.error(t)})}var Sm=function(){function t(e,n,i,r,a,s){o(this,t),this.rootComponentType=e,this.config=n,this.urlTree=i,this.url=r,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=s}return s(t,[{key:"recognize",value:function(){var t=tm(this.urlTree.root,[],[],this.config.filter(function(t){return void 0===t.redirectTo}),this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,Ap);if(null===e)return null;var n=new vg([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Ap,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new cg(n,e),r=new yg(this.url,i);return this.inheritParamsAndData(r._root),r}},{key:"inheritParamsAndData",value:function(t){var e=this,n=t.value,i=gg(n,this.paramsInheritanceStrategy);n.params=Object.freeze(i.params),n.data=Object.freeze(i.data),t.children.forEach(function(t){return e.inheritParamsAndData(t)})}},{key:"processSegmentGroup",value:function(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}},{key:"processChildren",value:function(t,e){for(var n=[],i=0,r=Object.keys(e.children);i0?Rp(n).parameters:{};r=new vg(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Im(t),Kg(t),t.component,t,Am(e),Mm(e)+n.length,Tm(t))}else{var l=Jg(e,t,n);if(!l.matched)return null;o=l.consumedSegments,a=n.slice(l.lastChild),r=new vg(o,l.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Im(t),Kg(t),t.component,t,Am(e),Mm(e)+o.length,Tm(t))}var u=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),c=tm(e,o,a,u.filter(function(t){return void 0===t.redirectTo}),this.relativeLinkResolution),h=c.segmentGroup,d=c.slicedSegments;if(0===d.length&&h.hasChildren()){var f=this.processChildren(u,h);return null===f?null:[new cg(r,f)]}if(0===u.length&&0===d.length)return[new cg(r,[])];var p=Kg(t)===i,g=this.processSegment(u,h,d,p?Ap:i);return null===g?null:[new cg(r,g)]}}]),t}();function Cm(t){var e,n=[],i=new Set,r=v(t);try{var o=function(){var t=e.value;if(!function(t){var e=t.value.routeConfig;return e&&""===e.path&&void 0===e.redirectTo}(t))return n.push(t),"continue";var r,o=n.find(function(e){return t.value.routeConfig===e.value.routeConfig});void 0!==o?((r=o.children).push.apply(r,b(t.children)),i.add(o)):n.push(t)};for(r.s();!(e=r.n()).done;)o()}catch(c){r.e(c)}finally{r.f()}var a,s=v(i);try{for(s.s();!(a=s.n()).done;){var l=a.value,u=Cm(l.children);n.push(new cg(l.value,u))}}catch(c){s.e(c)}finally{s.f()}return n.filter(function(t){return!i.has(t)})}function Am(t){for(var e=t;e._sourceSegment;)e=e._sourceSegment;return e}function Mm(t){for(var e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;e._sourceSegment;)n+=(e=e._sourceSegment)._segmentIndexShift?e._segmentIndexShift:0;return n-1}function Im(t){return t.data||{}}function Tm(t){return t.resolve||{}}function Dm(t){return Of(function(e){var n=t(e);return n?it(n).pipe(q(function(){return e})):Pd(e)})}var Em=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(function(){function t(){o(this,t)}return s(t,[{key:"shouldDetach",value:function(t){return!1}},{key:"store",value:function(t,e){}},{key:"shouldAttach",value:function(t){return!1}},{key:"retrieve",value:function(t){return null}},{key:"shouldReuseRoute",value:function(t,e){return t.routeConfig===e.routeConfig}}]),t}()),Om=new wi("ROUTES"),Pm=function(){function t(e,n,i,r){o(this,t),this.loader=e,this.compiler=n,this.onLoadStartListener=i,this.onLoadEndListener=r}return s(t,[{key:"load",value:function(t,e){var n=this;if(e._loader$)return e._loader$;this.onLoadStartListener&&this.onLoadStartListener(e);var i=this.loadModuleFactory(e.loadChildren).pipe(q(function(i){n.onLoadEndListener&&n.onLoadEndListener(e);var r=i.create(t);return new Bg(Pp(r.injector.get(Om,void 0,jt.Self|jt.Optional)).map(Zg),r)}),Gf(function(t){throw e._loader$=void 0,t}));return e._loader$=new mt(i,function(){return new U}).pipe(ft()),e._loader$}},{key:"loadModuleFactory",value:function(t){var e=this;return"string"==typeof t?it(this.loader.load(t)):Np(t()).pipe(st(function(t){return t instanceof du?Pd(t):it(e.compiler.compileModuleAsync(t))}))}}]),t}(),Rm=function t(){o(this,t),this.outlet=null,this.route=null,this.resolver=null,this.children=new Lm,this.attachRef=null},Lm=function(){function t(){o(this,t),this.contexts=new Map}return s(t,[{key:"onChildOutletCreated",value:function(t,e){var n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}},{key:"onChildOutletDestroyed",value:function(t){var e=this.getContext(t);e&&(e.outlet=null)}},{key:"onOutletDeactivated",value:function(){var t=this.contexts;return this.contexts=new Map,t}},{key:"onOutletReAttached",value:function(t){this.contexts=t}},{key:"getOrCreateContext",value:function(t){var e=this.getContext(t);return e||(e=new Rm,this.contexts.set(t,e)),e}},{key:"getContext",value:function(t){return this.contexts.get(t)||null}}]),t}(),Nm=function(){function t(){o(this,t)}return s(t,[{key:"shouldProcessUrl",value:function(t){return!0}},{key:"extract",value:function(t){return t}},{key:"merge",value:function(t,e){return t}}]),t}();function Fm(t){throw t}function Vm(t,e,n){return e.parse("/")}function zm(t,e){return Pd(null)}var Bm=function(){var t=function(){function t(e,n,i,r,a,s,l,u){var c=this;o(this,t),this.rootComponentType=e,this.urlSerializer=n,this.rootContexts=i,this.location=r,this.config=u,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.disposed=!1,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new U,this.errorHandler=Fm,this.malformedUriErrorHandler=Vm,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:zm,afterPreactivation:zm},this.urlHandlingStrategy=new Nm,this.routeReuseStrategy=new Em,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=a.get(hu),this.console=a.get(pc);var h=a.get(Mc);this.isNgZoneEnabled=h instanceof Mc&&Mc.isInAngularZone(),this.resetConfig(u),this.currentUrlTree=new Hp(new jp([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Pm(s,l,function(t){return c.triggerEvent(new _p(t))},function(t){return c.triggerEvent(new bp(t))}),this.routerState=fg(this.currentUrlTree,this.rootComponentType),this.transitions=new yf({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}return s(t,[{key:"setupNavigations",value:function(t){var e=this,n=this.events;return t.pipe(Ld(function(t){return 0!==t.id}),q(function(t){return Object.assign(Object.assign({},t),{extractedUrl:e.urlHandlingStrategy.extract(t.rawUrl)})}),Of(function(t){var i,r,o,a,s=!1,l=!1;return Pd(t).pipe(rp(function(t){e.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:e.lastSuccessfulNavigation?Object.assign(Object.assign({},e.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Of(function(t){var i,r,o,a,s=!e.navigated||t.extractedUrl.toString()!==e.browserUrlTree.toString();if(("reload"===e.onSameUrlNavigation||s)&&e.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Pd(t).pipe(Of(function(t){var i=e.transitions.getValue();return n.next(new cp(t.id,e.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==e.transitions.getValue()?Tf:Promise.resolve(t)}),(i=e.ngModule.injector,r=e.configLoader,o=e.urlSerializer,a=e.config,Of(function(t){return function(t,e,n,i,r){return new fm(t,e,n,i,r).apply()}(i,r,o,t.extractedUrl,a).pipe(q(function(e){return Object.assign(Object.assign({},t),{urlAfterRedirects:e})}))})),rp(function(t){e.currentNavigation=Object.assign(Object.assign({},e.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,n,i,r,o){return st(function(i){return function(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"emptyOnly",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"legacy";try{var a=new Sm(t,e,n,i,r,o).recognize();return null===a?km(new xm):Pd(a)}catch(s){return km(s)}}(t,n,i.urlAfterRedirects,(a=i.urlAfterRedirects,e.serializeUrl(a)),r,o).pipe(q(function(t){return Object.assign(Object.assign({},i),{targetSnapshot:t})}));var a})}(e.rootComponentType,e.config,0,e.paramsInheritanceStrategy,e.relativeLinkResolution),rp(function(t){"eager"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects);var i=new pp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);n.next(i)}));if(s&&e.rawUrlTree&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){var l=t.extractedUrl,u=t.source,c=t.restoredState,h=t.extras,d=new cp(t.id,e.serializeUrl(l),u,c);n.next(d);var f=fg(l,e.rootComponentType).snapshot;return Pd(Object.assign(Object.assign({},t),{targetSnapshot:f,urlAfterRedirects:l,extras:Object.assign(Object.assign({},h),{skipLocationChange:!1,replaceUrl:!1})}))}return e.rawUrlTree=t.rawUrl,e.browserUrlTree=t.urlAfterRedirects,t.resolve(null),Tf}),Dm(function(t){var n=t.extras;return e.hooks.beforePreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})}),rp(function(t){var n=new gp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}),q(function(t){return Object.assign(Object.assign({},t),{guards:(n=t.targetSnapshot,i=t.currentSnapshot,r=e.rootContexts,o=n._root,ym(o,i?i._root:null,r,[o.value]))});var n,i,r,o}),function(t,e){return st(function(n){var i=n.targetSnapshot,r=n.currentSnapshot,o=n.guards,a=o.canActivateChecks,s=o.canDeactivateChecks;return 0===s.length&&0===a.length?Pd(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return it(t).pipe(st(function(t){return function(t,e,n,i,r){var o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return o&&0!==o.length?Pd(o.map(function(o){var a,s=vm(o,e,r);if(function(t){return t&&Hg(t.canDeactivate)}(s))a=Np(s.canDeactivate(t,e,n,i));else{if(!Hg(s))throw new Error("Invalid CanDeactivate guard");a=Np(s(t,e,n,i))}return a.pipe(np())})).pipe(Ug()):Pd(!0)}(t.component,t.route,n,e,i)}),np(function(t){return!0!==t},!0))}(s,i,r,t).pipe(st(function(n){return n&&"boolean"==typeof n?function(t,e,n,i){return it(e).pipe(Rd(function(e){return If(function(t,e){return null!==t&&e&&e(new wp(t)),Pd(!0)}(e.route.parent,i),function(t,e){return null!==t&&e&&e(new kp(t)),Pd(!0)}(e.route,i),function(t,e,n){var i=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(function(t){return function(t){var e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)}).filter(function(t){return null!==t}).map(function(e){return Ef(function(){return Pd(e.guards.map(function(r){var o,a=vm(r,e.node,n);if(function(t){return t&&Hg(t.canActivateChild)}(a))o=Np(a.canActivateChild(i,t));else{if(!Hg(a))throw new Error("Invalid CanActivateChild guard");o=Np(a(i,t))}return o.pipe(np())})).pipe(Ug())})});return Pd(r).pipe(Ug())}(t,e.path,n),function(t,e,n){var i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Pd(i.map(function(i){return Ef(function(){var r,o=vm(i,e,n);if(function(t){return t&&Hg(t.canActivate)}(o))r=Np(o.canActivate(e,t));else{if(!Hg(o))throw new Error("Invalid CanActivate guard");r=Np(o(e,t))}return r.pipe(np())})})).pipe(Ug()):Pd(!0)}(t,e.route,n))}),np(function(t){return!0!==t},!0))}(i,a,t,e):Pd(n)}),q(function(t){return Object.assign(Object.assign({},n),{guardsResult:t})}))})}(e.ngModule.injector,function(t){return e.triggerEvent(t)}),rp(function(t){if(jg(t.guardsResult)){var n=Tp('Redirecting to "'.concat(e.serializeUrl(t.guardsResult),'"'));throw n.url=t.guardsResult,n}var i=new mp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);e.triggerEvent(i)}),Ld(function(t){if(!t.guardsResult){e.resetUrlToCurrentUrlTree();var i=new dp(t.id,e.serializeUrl(t.extractedUrl),"");return n.next(i),t.resolve(!1),!1}return!0}),Dm(function(t){if(t.guards.canActivateChecks.length)return Pd(t).pipe(rp(function(t){var n=new vp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}),Of(function(t){var i,r,o=!1;return Pd(t).pipe((i=e.paramsInheritanceStrategy,r=e.ngModule.injector,st(function(t){var e=t.targetSnapshot,n=t.guards.canActivateChecks;if(!n.length)return Pd(t);var o=0;return it(n).pipe(Rd(function(t){return function(t,e,n,i){return function(t,e,n,i){var r=Object.keys(t);if(0===r.length)return Pd({});var o={};return it(r).pipe(st(function(r){return function(t,e,n,i){var r=vm(t,e,i);return Np(r.resolve?r.resolve(e,n):r(e,n))}(t[r],e,n,i).pipe(rp(function(t){o[r]=t}))}),Yf(1),st(function(){return Object.keys(o).length===r.length?Pd(o):Tf}))}(t._resolve,t,e,i).pipe(q(function(e){return t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),gg(t,n).resolve),null}))}(t.route,e,i,r)}),rp(function(){return o++}),Yf(1),st(function(e){return o===n.length?Pd(t):Tf}))})),rp({next:function(){return o=!0},complete:function(){if(!o){var i=new dp(t.id,e.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");n.next(i),t.resolve(!1)}}}))}),rp(function(t){var n=new yp(t.id,e.serializeUrl(t.extractedUrl),e.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.triggerEvent(n)}))}),Dm(function(t){var n=t.extras;return e.hooks.afterPreactivation(t.targetSnapshot,{navigationId:t.id,appliedUrlTree:t.extractedUrl,rawUrlTree:t.rawUrl,skipLocationChange:!!n.skipLocationChange,replaceUrl:!!n.replaceUrl})}),q(function(t){var n,i,r,o=(r=kg(e.routeReuseStrategy,(n=t.targetSnapshot)._root,(i=t.currentRouterState)?i._root:void 0),new dg(r,n));return Object.assign(Object.assign({},t),{targetRouterState:o})}),rp(function(t){e.currentUrlTree=t.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(e.currentUrlTree,t.rawUrl),e.routerState=t.targetRouterState,"deferred"===e.urlUpdateStrategy&&(t.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),e.browserUrlTree=t.urlAfterRedirects)}),(r=e.rootContexts,o=e.routeReuseStrategy,a=function(t){return e.triggerEvent(t)},q(function(t){return new Vg(o,t.targetRouterState,t.currentRouterState,a).activate(r),t})),rp({next:function(){s=!0},complete:function(){s=!0}}),(i=function(){if(!s&&!l){e.resetUrlToCurrentUrlTree();var i=new dp(t.id,e.serializeUrl(t.extractedUrl),"Navigation ID ".concat(t.id," is not equal to the current navigation id ").concat(e.navigationId));n.next(i),t.resolve(!1)}e.currentNavigation=null},function(t){return t.lift(new sp(i))}),Gf(function(i){if(l=!0,(s=i)&&s.ngNavigationCancelingError){var r=jg(i.url);r||(e.navigated=!0,e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));var o=new dp(t.id,e.serializeUrl(t.extractedUrl),i.message);n.next(o),r?setTimeout(function(){var n=e.urlHandlingStrategy.merge(i.url,e.rawUrlTree);e.scheduleNavigation(n,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{e.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);var a=new fp(t.id,e.serializeUrl(t.extractedUrl),i);n.next(a);try{t.resolve(e.errorHandler(i))}catch(u){t.reject(u)}}var s;return Tf}))}))}},{key:"resetRootComponentType",value:function(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}},{key:"getTransition",value:function(){var t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}},{key:"setTransition",value:function(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}},{key:"initialNavigation",value:function(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}},{key:"setUpLocationChangeListener",value:function(){var t=this;this.locationSubscription||(this.locationSubscription=this.location.subscribe(function(e){var n=t.extractLocationChangeInfoFromEvent(e);t.shouldScheduleNavigation(t.lastLocationChangeInfo,n)&&setTimeout(function(){var e=n.source,i=n.state,r=n.urlTree,o={replaceUrl:!0};if(i){var a=Object.assign({},i);delete a.navigationId,0!==Object.keys(a).length&&(o.state=a)}t.scheduleNavigation(r,e,i,o)},0),t.lastLocationChangeInfo=n}))}},{key:"extractLocationChangeInfoFromEvent",value:function(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}},{key:"shouldScheduleNavigation",value:function(t,e){if(!t)return!0;var n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}},{key:"getCurrentNavigation",value:function(){return this.currentNavigation}},{key:"triggerEvent",value:function(t){this.events.next(t)}},{key:"resetConfig",value:function(t){Yg(t),this.config=t.map(Zg),this.navigated=!1,this.lastSuccessfulId=-1}},{key:"ngOnDestroy",value:function(){this.dispose()}},{key:"dispose",value:function(){this.transitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}},{key:"createUrlTree",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.relativeTo,i=e.queryParams,r=e.fragment,o=e.queryParamsHandling,a=e.preserveFragment,s=n||this.routerState.root,l=a?this.currentUrlTree.fragment:r,u=null;switch(o){case"merge":u=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=i||null}return null!==u&&(u=this.removeEmptyProps(u)),Cg(s,this.currentUrlTree,t,u,l)}},{key:"navigateByUrl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1},n=jg(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}},{key:"navigate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{skipLocationChange:!1};return Hm(t),this.navigateByUrl(this.createUrlTree(t,e),e)}},{key:"serializeUrl",value:function(t){return this.urlSerializer.serialize(t)}},{key:"parseUrl",value:function(t){var e;try{e=this.urlSerializer.parse(t)}catch(n){e=this.malformedUriErrorHandler(n,this.urlSerializer,t)}return e}},{key:"isActive",value:function(t,e){if(jg(t))return Fp(this.currentUrlTree,t,e);var n=this.parseUrl(t);return Fp(this.currentUrlTree,n,e)}},{key:"removeEmptyProps",value:function(t){return Object.keys(t).reduce(function(e,n){var i=t[n];return null!=i&&(e[n]=i),e},{})}},{key:"processNavigations",value:function(){var t=this;this.navigations.subscribe(function(e){t.navigated=!0,t.lastSuccessfulId=e.id,t.events.next(new hp(e.id,t.serializeUrl(e.extractedUrl),t.serializeUrl(t.currentUrlTree))),t.lastSuccessfulNavigation=t.currentNavigation,e.resolve(!0)},function(e){t.console.warn("Unhandled Navigation Error: ")})}},{key:"scheduleNavigation",value:function(t,e,n,i,r){if(this.disposed)return Promise.resolve(!1);var o,a,s,l=this.getTransition(),u="imperative"!==e&&"imperative"===(null==l?void 0:l.source),c=(this.lastSuccessfulId===l.id||this.currentNavigation?l.rawUrl:l.urlAfterRedirects).toString()===t.toString();if(u&&c)return Promise.resolve(!0);r?(o=r.resolve,a=r.reject,s=r.promise):s=new Promise(function(t,e){o=t,a=e});var h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:o,reject:a,promise:s,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),s.catch(function(t){return Promise.reject(t)})}},{key:"setBrowserUrl",value:function(t,e,n,i){var r=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}},{key:"resetStateAndUrl",value:function(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}},{key:"resetUrlToCurrentUrlTree",value:function(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}},{key:"url",get:function(){return this.serializeUrl(this.currentUrlTree)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ki),zi(Wp),zi(Lm),zi(Sh),zi(Ya),zi(Qc),zi(Sc),zi(void 0))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function Hm(t){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};o(this,t),this.router=e,this.viewportScroller=n,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.anchorScrolling||"disabled"}return s(t,[{key:"init",value:function(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}},{key:"createScrollEvents",value:function(){var t=this;return this.router.events.subscribe(function(e){e instanceof cp?(t.store[t.lastId]=t.viewportScroller.getScrollPosition(),t.lastSource=e.navigationTrigger,t.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof hp&&(t.lastId=e.id,t.scheduleScrollEvent(e,t.router.parseUrl(e.urlAfterRedirects).fragment))})}},{key:"consumeScrollEvents",value:function(){var t=this;return this.router.events.subscribe(function(e){e instanceof Cp&&(e.position?"top"===t.options.scrollPositionRestoration?t.viewportScroller.scrollToPosition([0,0]):"enabled"===t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===t.options.anchorScrolling?t.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==t.options.scrollPositionRestoration&&t.viewportScroller.scrollToPosition([0,0]))})}},{key:"scheduleScrollEvent",value:function(t,e){this.router.triggerEvent(new Cp(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}},{key:"ngOnDestroy",value:function(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Bm),zi($h),zi(void 0))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Qm=new wi("ROUTER_CONFIGURATION"),Jm=new wi("ROUTER_FORROOT_GUARD"),tv=[Sh,{provide:Wp,useClass:Yp},{provide:Bm,useFactory:function(t,e,n,i,r,o,a){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:{},l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9?arguments[9]:void 0,c=new Bm(null,t,e,n,i,r,o,Pp(a));if(l&&(c.urlHandlingStrategy=l),u&&(c.routeReuseStrategy=u),sv(s,c),s.enableTracing){var h=sh();c.events.subscribe(function(t){h.logGroup("Router Event: ".concat(t.constructor.name)),h.log(t.toString()),h.log(t),h.logGroupEnd()})}return c},deps:[Wp,Lm,Sh,Ya,Qc,Sc,Om,Qm,[function t(){o(this,t)},new qi],[function t(){o(this,t)},new qi]]},Lm,{provide:pg,useFactory:function(t){return t.routerState.root},deps:[Bm]},{provide:Qc,useClass:eh},Km,Zm,Xm,{provide:Qm,useValue:{enableTracing:!1}}];function ev(){return new Gc("Router",Bm)}var nv=function(){var t=function(){function t(e,n){o(this,t)}return s(t,null,[{key:"forRoot",value:function(e,n){return{ngModule:t,providers:[tv,av(e),{provide:Jm,useFactory:ov,deps:[[Bm,new qi,new Xi]]},{provide:Qm,useValue:n||{}},{provide:_h,useFactory:rv,deps:[ch,[new Yi(wh),new qi],Qm]},{provide:$m,useFactory:iv,deps:[Bm,$h,Qm]},{provide:qm,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Zm},{provide:Gc,multi:!0,useFactory:ev},[lv,{provide:ac,multi:!0,useFactory:uv,deps:[lv]},{provide:hv,useFactory:cv,deps:[lv]},{provide:fc,multi:!0,useExisting:hv}]]}}},{key:"forChild",value:function(e){return{ngModule:t,providers:[av(e)]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Jm,8),zi(Bm,8))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}();function iv(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new $m(t,e,n)}function rv(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.useHash?new kh(t,e):new xh(t,e)}function ov(t){return"guarded"}function av(t){return[{provide:xi,multi:!0,useValue:t},{provide:Om,multi:!0,useValue:t}]}function sv(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}var lv=function(){var t=function(){function t(e){o(this,t),this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new U}return s(t,[{key:"appInitializer",value:function(){var t=this;return this.injector.get(dh,Promise.resolve(null)).then(function(){var e=null,n=new Promise(function(t){return e=t}),i=t.injector.get(Bm),r=t.injector.get(Qm);return"disabled"===r.initialNavigation?(i.setUpLocationChangeListener(),e(!0)):"enabled"===r.initialNavigation||"enabledBlocking"===r.initialNavigation?(i.hooks.afterPreactivation=function(){return t.initNavigation?Pd(null):(t.initNavigation=!0,e(!0),t.resultOfPreactivationDone)},i.initialNavigation()):e(!0),n})}},{key:"bootstrapListener",value:function(t){var e=this.injector.get(Qm),n=this.injector.get(Km),i=this.injector.get($m),r=this.injector.get(Bm),o=this.injector.get(Kc);t===o.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||r.initialNavigation(),n.setUpPreloading(),i.init(),r.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Ya))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}();function uv(t){return t.appInitializer.bind(t)}function cv(t){return t.bootstrapListener.bind(t)}var hv=new wi("Router Initializer"),dv=function(){function t(t){this.user=t.user,this.role=t.role,this.admin=t.admin}return Object.defineProperty(t.prototype,"isStaff",{get:function(){return"staff"===this.role||"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdmin",{get:function(){return"admin"===this.role},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLogged",{get:function(){return null!=this.user},enumerable:!1,configurable:!0}),t}();function fv(t){return null!=t&&"false"!=="".concat(t)}function pv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return gv(t)?Number(t):e}function gv(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function mv(t){return Array.isArray(t)?t:[t]}function vv(t){return null==t?"":"string"==typeof t?t:"".concat(t,"px")}function yv(t){return t instanceof Tl?t.nativeElement:t}function _v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:/\s+/,n=[];if(null!=t){var i,r=Array.isArray(t)?t:"".concat(t).split(e),o=v(r);try{for(o.s();!(i=o.n()).done;){var a=i.value,s="".concat(a).trim();s&&n.push(s)}}catch(l){o.e(l)}finally{o.f()}}return n}function bv(t,e,n,i){return C(n)&&(i=n,n=void 0),i?bv(t,e,n).pipe(q(function(t){return k(t)?i.apply(void 0,b(t)):i(t)})):new z(function(i){wv(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}function wv(t,e,n,i,r){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var a=t;t.addEventListener(e,n,r),o=function(){return a.removeEventListener(e,n,r)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var s=t;t.on(e,n),o=function(){return s.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var l=t;t.addListener(e,n),o=function(){return l.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var u=0,c=t.length;u1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}},{key:"requestAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(t.flush.bind(t,this),n)}},{key:"recycleAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}},{key:"execute",value:function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}]),n}(function(t){u(n,t);var e=p(n);function n(t,i){return o(this,n),e.call(this)}return s(n,[{key:"schedule",value:function(t){return this}}]),n}(M)),kv=function(){var t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.now;o(this,t),this.SchedulerAction=e,this.now=n}return s(t,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,t).schedule(n,e)}}]),t}();return t.now=function(){return Date.now()},t}(),Sv=function(t){u(n,t);var e=p(n);function n(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kv.now;return o(this,n),(i=e.call(this,t,function(){return n.delegate&&n.delegate!==d(i)?n.delegate.now():r()})).actions=[],i.active=!1,i.scheduled=void 0,i}return s(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(t,e,o):r(i(n.prototype),"schedule",this).call(this,t,e,o)}},{key:"flush",value:function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}}]),n}(kv),Cv=1,Av=function(){return Promise.resolve()}(),Mv={};function Iv(t){return t in Mv&&(delete Mv[t],!0)}var Tv=function(t){var e=Cv++;return Mv[e]=!0,Av.then(function(){return Iv(e)&&t()}),e},Dv=function(t){Iv(t)},Ev=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t,i)).scheduler=t,r.work=i,r}return s(n,[{key:"requestAsyncId",value:function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==o&&o>0?r(i(n.prototype),"requestAsyncId",this).call(this,t,e,o):(t.actions.push(this),t.scheduled||(t.scheduled=Tv(t.flush.bind(t,null))))}},{key:"recycleAsyncId",value:function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==o&&o>0||null===o&&this.delay>0)return r(i(n.prototype),"recycleAsyncId",this).call(this,t,e,o);0===t.actions.length&&(Dv(e),t.scheduled=void 0)}}]),n}(xv),Ov=new(function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,r=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i=0}function Hv(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=-1;return Bv(e)?i=Number(e)<1?1:Number(e):Y(e)&&(n=e),Y(n)||(n=Nv),new z(function(e){var r=Bv(t)?t:+t-n.now();return n.schedule(jv,r,{index:0,period:i,subscriber:e})})}function jv(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function Gv(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv;return Fv(function(){return Hv(t,e)})}function Uv(t){return function(e){return e.lift(new Wv(t))}}var Wv=function(){function t(e){o(this,t),this.notifier=e}return s(t,[{key:"call",value:function(t,e){var n=new Yv(t),i=at(this.notifier,new rt(n));return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}]),t}(),Yv=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t)).seenValue=!1,i}return s(n,[{key:"notifyNext",value:function(){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(ot);function qv(t,e){return new z(e?function(n){return e.schedule(Xv,0,{error:t,subscriber:n})}:function(e){return e.error(t)})}function Xv(t){t.subscriber.error(t.error)}var Zv,Kv=function(){var t=function(){function t(e,n,i){o(this,t),this.kind=e,this.value=n,this.error=i,this.hasValue="N"===e}return s(t,[{key:"observe",value:function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}},{key:"do",value:function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}},{key:"accept",value:function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Pd(this.value);case"E":return qv(this.error);case"C":return Df()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}},{key:"createError",value:function(e){return new t("E",void 0,e)}},{key:"createComplete",value:function(){return t.completeNotification}}]),t}();return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();try{Zv="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(fH){Zv=!1}var $v,Qv,Jv,ty,ey=function(){var t=function t(e){o(this,t),this._platformId=e,this.isBrowser=this._platformId?"browser"===this._platformId:"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!Zv)&&"undefined"!=typeof CSS&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT};return t.\u0275fac=function(e){return new(e||t)(zi(dc))},t.\u0275prov=Ot({factory:function(){return new t(zi(dc))},token:t,providedIn:"root"}),t}(),ny=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),iy=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function ry(){if($v)return $v;if("object"!=typeof document||!document)return $v=new Set(iy);var t=document.createElement("input");return $v=new Set(iy.filter(function(e){return t.setAttribute("type",e),t.type===e}))}function oy(t){return function(){if(null==Qv&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return Qv=!0}}))}finally{Qv=Qv||!1}return Qv}()?t:!!t.capture}function ay(){if(null==Jv){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Jv=!1;if("scrollBehavior"in document.documentElement.style)Jv=!0;else{var t=Element.prototype.scrollTo;Jv=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}}return Jv}function sy(t){if(function(){if(null==ty){var t="undefined"!=typeof document?document.head:null;ty=!(!t||!t.createShadowRoot&&!t.attachShadow)}return ty}()){var e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}var ly=new wi("cdk-dir-doc",{providedIn:"root",factory:function(){return Bi(uh)}}),uy=function(){var t=function(){function t(e){if(o(this,t),this.value="ltr",this.change=new Bu,e){var n=(e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null);this.value="ltr"===n||"rtl"===n?n:"ltr"}}return s(t,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ly,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(ly,8))},token:t,providedIn:"root"}),t}(),cy=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),hy=function t(){o(this,t)};function dy(t){return t&&"function"==typeof t.connect}var fy=function(){function t(){o(this,t)}return s(t,[{key:"applyChanges",value:function(t,e,n,i,r){t.forEachOperation(function(t,i,o){var a,s;if(null==t.previousIndex){var l=n(t,i,o);a=e.createEmbeddedView(l.templateRef,l.context,l.index),s=1}else null==o?(e.remove(i),s=3):(a=e.get(i),e.move(a,o),s=2);r&&r({context:null==a?void 0:a.context,operation:s,record:t})})}},{key:"detach",value:function(){}}]),t}(),py=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];o(this,t),this._multiple=n,this._emitChanges=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new U,i&&i.length&&(n?i.forEach(function(t){return e._markSelected(t)}):this._markSelected(i[0]),this._selectedToEmit.length=0)}return s(t,[{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:20;return this._platform.isBrowser?new z(function(n){t._globalSubscription||t._addGlobalListener();var i=e>0?t._scrolled.pipe(Gv(e)).subscribe(n):t._scrolled.subscribe(n);return t._scrolledCount++,function(){i.unsubscribe(),t._scrolledCount--,t._scrolledCount||t._removeGlobalListener()}}):Pd()}},{key:"ngOnDestroy",value:function(){var t=this;this._removeGlobalListener(),this.scrollContainers.forEach(function(e,n){return t.deregister(n)}),this._scrolled.complete()}},{key:"ancestorScrolled",value:function(t,e){var n=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Ld(function(t){return!t||n.indexOf(t)>-1}))}},{key:"getAncestorScrollContainers",value:function(t){var e=this,n=[];return this.scrollContainers.forEach(function(i,r){e._scrollableContainsElement(r,t)&&n.push(r)}),n}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_scrollableContainsElement",value:function(t,e){var n=yv(e),i=t.getElementRef().nativeElement;do{if(n==i)return!0}while(n=n.parentElement);return!1}},{key:"_addGlobalListener",value:function(){var t=this;this._globalSubscription=this._ngZone.runOutsideAngular(function(){return bv(t._getWindow().document,"scroll").subscribe(function(){return t._scrolled.next()})})}},{key:"_removeGlobalListener",value:function(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc),zi(ey),zi(uh,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(Mc),zi(ey),zi(uh,8))},token:t,providedIn:"root"}),t}(),vy=function(){var t=function(){function t(e,n,i){var r=this;o(this,t),this._platform=e,this._change=new U,this._changeListener=function(t){r._change.next(t)},this._document=i,n.runOutsideAngular(function(){if(e.isBrowser){var t=r._getWindow();t.addEventListener("resize",r._changeListener),t.addEventListener("orientationchange",r._changeListener)}r.change().subscribe(function(){return r._updateViewportSize()})})}return s(t,[{key:"ngOnDestroy",value:function(){if(this._platform.isBrowser){var t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}},{key:"getViewportSize",value:function(){this._viewportSize||this._updateViewportSize();var t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}},{key:"getViewportRect",value:function(){var t=this.getViewportScrollPosition(),e=this.getViewportSize(),n=e.width,i=e.height;return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+n,height:i,width:n}}},{key:"getViewportScrollPosition",value:function(){if(!this._platform.isBrowser)return{top:0,left:0};var t=this._document,e=this._getWindow(),n=t.documentElement,i=n.getBoundingClientRect();return{top:-i.top||t.body.scrollTop||e.scrollY||n.scrollTop||0,left:-i.left||t.body.scrollLeft||e.scrollX||n.scrollLeft||0}}},{key:"change",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return t>0?this._change.pipe(Gv(t)):this._change}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_updateViewportSize",value:function(){var t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey),zi(Mc),zi(uh,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey),zi(Mc),zi(uh,8))},token:t,providedIn:"root"}),t}(),yy=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),_y=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[cy,ny,yy],cy,yy]}),t}(),by=function(){function t(){o(this,t)}return s(t,[{key:"attach",value:function(t){return this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),wy=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this)).component=t,s.viewContainerRef=i,s.injector=r,s.componentFactoryResolver=a,s}return n}(by),xy=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this)).templateRef=t,a.viewContainerRef=i,a.context=r,a}return s(n,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,r(i(n.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,r(i(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(by),ky=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).element=t instanceof Tl?t.nativeElement:t,i}return n}(by),Sy=function(){function t(){o(this,t),this._isDisposed=!1,this.attachDomPortal=null}return s(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t instanceof wy?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof xy?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof ky?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(t){this._disposeFn=t}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),t}(),Cy=function(t){u(n,t);var e=p(n);function n(t,a,s,l,u){var c,h;return o(this,n),(h=e.call(this)).outletElement=t,h._componentFactoryResolver=a,h._appRef=s,h._defaultInjector=l,h.attachDomPortal=function(t){var e=t.element,o=h._document.createComment("dom-portal");e.parentNode.insertBefore(o,e),h.outletElement.appendChild(e),h._attachedPortal=t,r((c=d(h),i(n.prototype)),"setDisposeFn",c).call(c,function(){o.parentNode&&o.parentNode.replaceChild(e,o)})},h._document=u,h}return s(n,[{key:"attachComponentPortal",value:function(t){var e,n=this,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(function(){return e.destroy()})):(e=i.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn(function(){n._appRef.detachView(e.hostView),e.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}},{key:"attachTemplatePortal",value:function(t){var e=this,n=t.viewContainerRef,i=n.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach(function(t){return e.outletElement.appendChild(t)}),i.detectChanges(),this.setDisposeFn(function(){var t=n.indexOf(i);-1!==t&&n.remove(t)}),this._attachedPortal=t,i}},{key:"dispose",value:function(){r(i(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),n}(Sy),Ay=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){return o(this,n),e.call(this,t,i)}return n}(xy);return t.\u0275fac=function(e){return new(e||t)(hs(lu),hs(pu))},t.\u0275dir=ve({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[Xa]}),t}(),My=function(){var t=function(t){u(n,t);var e=p(n);function n(t,a,s){var l,u;return o(this,n),(u=e.call(this))._componentFactoryResolver=t,u._viewContainerRef=a,u._isInitialized=!1,u.attached=new Bu,u.attachDomPortal=function(t){var e=t.element,o=u._document.createComment("dom-portal");t.setAttachedHost(d(u)),e.parentNode.insertBefore(o,e),u._getRootNode().appendChild(e),u._attachedPortal=t,r((l=d(u),i(n.prototype)),"setDisposeFn",l).call(l,function(){o.parentNode&&o.parentNode.replaceChild(e,o)})},u._document=s,u}return s(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(t){t.setAttachedHost(this);var e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,o=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),a=e.createComponent(o,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),r(i(n.prototype),"setDisposeFn",this).call(this,function(){return a.destroy()}),this._attachedPortal=t,this._attachedRef=a,this.attached.emit(a),a}},{key:"attachTemplatePortal",value:function(t){var e=this;t.setAttachedHost(this);var o=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return r(i(n.prototype),"setDisposeFn",this).call(this,function(){return e._viewContainerRef.clear()}),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}},{key:"_getRootNode",value:function(){var t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&r(i(n.prototype),"detach",this).call(this),t&&r(i(n.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(Sy);return t.\u0275fac=function(e){return new(e||t)(hs(Cl),hs(pu),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Xa]}),t}(),Iy=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),Ty=function(){function t(e,n){o(this,t),this.predicate=e,this.inclusive=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new Dy(t,this.predicate,this.inclusive))}}]),t}(),Dy=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).predicate=i,a.inclusive=r,a.index=0,a}return s(n,[{key:"_next",value:function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(i){return void n.error(i)}this.nextOrComplete(t,e)}},{key:"nextOrComplete",value:function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())}}]),n}(R),Ey=13,Oy=27,Py=32,Ry=35,Ly=36,Ny=37,Fy=38,Vy=39,zy=40;function By(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;ie.height||t.scrollWidth>e.width}}]),t}(),Gy=function(){function t(e,n,i,r){var a=this;o(this,t),this._scrollDispatcher=e,this._ngZone=n,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=function(){a.disable(),a._overlayRef.hasAttached()&&a._ngZone.run(function(){return a._overlayRef.detach()})}}return s(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;if(!this._scrollSubscription){var e=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(function(){var e=t._viewportRuler.getViewportScrollPosition().top;Math.abs(e-t._initialScrollPosition)>t._config.threshold?t._detach():t._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),Uy=function(){function t(){o(this,t)}return s(t,[{key:"enable",value:function(){}},{key:"disable",value:function(){}},{key:"attach",value:function(){}}]),t}();function Wy(t,e){return e.some(function(e){return t.bottome.bottom||t.righte.right})}function Yy(t,e){return e.some(function(e){return t.tope.bottom||t.lefte.right})}var qy=function(){function t(e,n,i,r){o(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this._config=r,this._scrollSubscription=null}return s(t,[{key:"attach",value:function(t){this._overlayRef=t}},{key:"enable",value:function(){var t=this;this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(function(){if(t._overlayRef.updatePosition(),t._config&&t._config.autoClose){var e=t._overlayRef.overlayElement.getBoundingClientRect(),n=t._viewportRuler.getViewportSize(),i=n.width,r=n.height;Wy(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(t.disable(),t._ngZone.run(function(){return t._overlayRef.detach()}))}}))}},{key:"disable",value:function(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}},{key:"detach",value:function(){this.disable(),this._overlayRef=null}}]),t}(),Xy=function(){var t=function t(e,n,i,r){var a=this;o(this,t),this._scrollDispatcher=e,this._viewportRuler=n,this._ngZone=i,this.noop=function(){return new Uy},this.close=function(t){return new Gy(a._scrollDispatcher,a._ngZone,a._viewportRuler,t)},this.block=function(){return new jy(a._viewportRuler,a._document)},this.reposition=function(t){return new qy(a._scrollDispatcher,a._viewportRuler,a._ngZone,t)},this._document=r};return t.\u0275fac=function(e){return new(e||t)(zi(my),zi(vy),zi(Mc),zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(my),zi(vy),zi(Mc),zi(uh))},token:t,providedIn:"root"}),t}(),Zy=function t(e){if(o(this,t),this.scrollStrategy=new Uy,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e)for(var n=0,i=Object.keys(e);n-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(uh))},token:t,providedIn:"root"}),t}(),Jy=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this,t))._keydownListener=function(t){for(var e=i._attachedOverlays,n=e.length-1;n>-1;n--)if(e[n]._keydownEvents.observers.length>0){e[n]._keydownEvents.next(t);break}},i}return s(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}]),n}(Qy);return t.\u0275fac=function(e){return new(e||t)(zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(uh))},token:t,providedIn:"root"}),t}(),t_=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t))._platform=i,r._cursorStyleIsSet=!1,r._clickListener=function(t){for(var e=t.composedPath?t.composedPath()[0]:t.target,n=r._attachedOverlays.slice(),i=n.length-1;i>-1;i--){var o=n[i];if(!(o._outsidePointerEvents.observers.length<1)&&o.hasAttached()){if(o.overlayElement.contains(e))break;o._outsidePointerEvents.next(t)}}},r}return s(n,[{key:"add",value:function(t){r(i(n.prototype),"add",this).call(this,t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}},{key:"detach",value:function(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}]),n}(Qy);return t.\u0275fac=function(e){return new(e||t)(zi(uh),zi(ey))},t.\u0275prov=Ot({factory:function(){return new t(zi(uh),zi(ey))},token:t,providedIn:"root"}),t}(),e_=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine),n_=function(){var t=function(){function t(e,n){o(this,t),this._platform=n,this._document=e}return s(t,[{key:"ngOnDestroy",value:function(){var t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}},{key:"getContainerElement",value:function(){return this._containerElement||this._createContainer(),this._containerElement}},{key:"_createContainer",value:function(){var t="cdk-overlay-container";if(this._platform.isBrowser||e_)for(var e=this._document.querySelectorAll(".".concat(t,'[platform="server"], ')+".".concat(t,'[platform="test"]')),n=0;nf&&(f=m,d=g)}}catch(y){p.e(y)}finally{p.f()}return this._isPushed=!1,void this._applyPosition(d.position,d.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(t.position,t.originPoint);this._applyPosition(t.position,t.originPoint)}}},{key:"detach",value:function(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}},{key:"dispose",value:function(){this._isDisposed||(this._boundingBox&&s_(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(r_),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}},{key:"reapplyLastPosition",value:function(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();var t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}},{key:"withScrollableContainers",value:function(t){return this._scrollables=t,this}},{key:"withPositions",value:function(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}},{key:"withViewportMargin",value:function(t){return this._viewportMargin=t,this}},{key:"withFlexibleDimensions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._hasFlexibleDimensions=t,this}},{key:"withGrowAfterOpen",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._growAfterOpen=t,this}},{key:"withPush",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._canPush=t,this}},{key:"withLockedPosition",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._positionLocked=t,this}},{key:"setOrigin",value:function(t){return this._origin=t,this}},{key:"withDefaultOffsetX",value:function(t){return this._offsetX=t,this}},{key:"withDefaultOffsetY",value:function(t){return this._offsetY=t,this}},{key:"withTransformOriginOn",value:function(t){return this._transformOriginSelector=t,this}},{key:"_getOriginPoint",value:function(t,e){var n;if("center"==e.originX)n=t.left+t.width/2;else{var i=this._isRtl()?t.right:t.left,r=this._isRtl()?t.left:t.right;n="start"==e.originX?i:r}return{x:n,y:"center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom}}},{key:"_getOverlayPoint",value:function(t,e,n){var i;return i="center"==n.overlayX?-e.width/2:"start"===n.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,{x:t.x+i,y:t.y+("center"==n.overlayY?-e.height/2:"top"==n.overlayY?0:-e.height)}}},{key:"_getOverlayFit",value:function(t,e,n,i){var r=u_(e),o=t.x,a=t.y,s=this._getOffset(i,"x"),l=this._getOffset(i,"y");s&&(o+=s),l&&(a+=l);var u=0-a,c=a+r.height-n.height,h=this._subtractOverflows(r.width,0-o,o+r.width-n.width),d=this._subtractOverflows(r.height,u,c),f=h*d;return{visibleArea:f,isCompletelyWithinViewport:r.width*r.height===f,fitsInViewportVertically:d===r.height,fitsInViewportHorizontally:h==r.width}}},{key:"_canFitWithFlexibleDimensions",value:function(t,e,n){if(this._hasFlexibleDimensions){var i=n.bottom-e.y,r=n.right-e.x,o=l_(this._overlayRef.getConfig().minHeight),a=l_(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=o&&o<=i)&&(t.fitsInViewportHorizontally||null!=a&&a<=r)}return!1}},{key:"_pushOverlayOnScreen",value:function(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};var i,r,o=u_(e),a=this._viewportRect,s=Math.max(t.x+o.width-a.width,0),l=Math.max(t.y+o.height-a.height,0),u=Math.max(a.top-n.top-t.y,0),c=Math.max(a.left-n.left-t.x,0);return this._previousPushAmount={x:i=o.width<=a.width?c||-s:t.xh&&!this._isInitialRender&&!this._growAfterOpen&&(i=t.y-h/2)}if("end"===e.overlayX&&!u||"start"===e.overlayX&&u)s=l.width-t.x+this._viewportMargin,o=t.x-this._viewportMargin;else if("start"===e.overlayX&&!u||"end"===e.overlayX&&u)a=t.x,o=l.right-t.x;else{var d=Math.min(l.right-t.x+l.left,t.x),f=this._lastBoundingBoxSize.width;a=t.x-d,(o=2*d)>f&&!this._isInitialRender&&!this._growAfterOpen&&(a=t.x-f/2)}return{top:i,left:a,bottom:r,right:s,width:o,height:n}}},{key:"_setBoundingBoxStyles",value:function(t,e){var n=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));var i={};if(this._hasExactPosition())i.top=i.left="0",i.bottom=i.right=i.maxHeight=i.maxWidth="",i.width=i.height="100%";else{var r=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;i.height=vv(n.height),i.top=vv(n.top),i.bottom=vv(n.bottom),i.width=vv(n.width),i.left=vv(n.left),i.right=vv(n.right),i.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",i.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",r&&(i.maxHeight=vv(r)),o&&(i.maxWidth=vv(o))}this._lastBoundingBoxSize=n,s_(this._boundingBox.style,i)}},{key:"_resetBoundingBoxStyles",value:function(){s_(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}},{key:"_resetOverlayElementStyles",value:function(){s_(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}},{key:"_setOverlayElementStyles",value:function(t,e){var n={},i=this._hasExactPosition(),r=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(i){var a=this._viewportRuler.getViewportScrollPosition();s_(n,this._getExactOverlayY(e,t,a)),s_(n,this._getExactOverlayX(e,t,a))}else n.position="static";var s="",l=this._getOffset(e,"x"),u=this._getOffset(e,"y");l&&(s+="translateX(".concat(l,"px) ")),u&&(s+="translateY(".concat(u,"px)")),n.transform=s.trim(),o.maxHeight&&(i?n.maxHeight=vv(o.maxHeight):r&&(n.maxHeight="")),o.maxWidth&&(i?n.maxWidth=vv(o.maxWidth):r&&(n.maxWidth="")),s_(this._pane.style,n)}},{key:"_getExactOverlayY",value:function(t,e,n){var i={top:"",bottom:""},r=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n));var o=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return r.y-=o,"bottom"===t.overlayY?i.bottom="".concat(this._document.documentElement.clientHeight-(r.y+this._overlayRect.height),"px"):i.top=vv(r.y),i}},{key:"_getExactOverlayX",value:function(t,e,n){var i={left:"",right:""},r=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(r=this._pushOverlayOnScreen(r,this._overlayRect,n)),"right"==(this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left")?i.right="".concat(this._document.documentElement.clientWidth-(r.x+this._overlayRect.width),"px"):i.left=vv(r.x),i}},{key:"_getScrollVisibility",value:function(){var t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(function(t){return t.getElementRef().nativeElement.getBoundingClientRect()});return{isOriginClipped:Yy(t,n),isOriginOutsideView:Wy(t,n),isOverlayClipped:Yy(e,n),isOverlayOutsideView:Wy(e,n)}}},{key:"_subtractOverflows",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}},{key:"left",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}},{key:"bottom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}},{key:"right",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}},{key:"width",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}},{key:"height",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}},{key:"centerHorizontally",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.left(t),this._justifyContent="center",this}},{key:"centerVertically",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.top(t),this._alignItems="center",this}},{key:"apply",value:function(){if(this._overlayRef&&this._overlayRef.hasAttached()){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),i=n.width,r=n.height,o=n.maxWidth,a=n.maxHeight,s=!("100%"!==i&&"100vw"!==i||o&&"100%"!==o&&"100vw"!==o),l=!("100%"!==r&&"100vh"!==r||a&&"100%"!==a&&"100vh"!==a);t.position=this._cssPosition,t.marginLeft=s?"0":this._leftOffset,t.marginTop=l?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,s?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=l?"flex-start":this._alignItems}}},{key:"dispose",value:function(){if(!this._isDisposed&&this._overlayRef){var t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(h_),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}]),t}(),f_=function(){var t=function(){function t(e,n,i,r){o(this,t),this._viewportRuler=e,this._document=n,this._platform=i,this._overlayContainer=r}return s(t,[{key:"global",value:function(){return new d_}},{key:"connectedTo",value:function(t,e,n){return new c_(e,n,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}},{key:"flexibleConnectedTo",value:function(t){return new a_(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(vy),zi(uh),zi(ey),zi(n_))},t.\u0275prov=Ot({factory:function(){return new t(zi(vy),zi(uh),zi(ey),zi(n_))},token:t,providedIn:"root"}),t}(),p_=0,g_=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d){o(this,t),this.scrollStrategies=e,this._overlayContainer=n,this._componentFactoryResolver=i,this._positionBuilder=r,this._keyboardDispatcher=a,this._injector=s,this._ngZone=l,this._document=u,this._directionality=c,this._location=h,this._outsideClickDispatcher=d}return s(t,[{key:"create",value:function(t){var e=this._createHostElement(),n=this._createPaneElement(e),i=this._createPortalOutlet(n),r=new Zy(t);return r.direction=r.direction||this._directionality.value,new i_(i,e,n,r,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}},{key:"position",value:function(){return this._positionBuilder}},{key:"_createPaneElement",value:function(t){var e=this._document.createElement("div");return e.id="cdk-overlay-".concat(p_++),e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}},{key:"_createHostElement",value:function(){var t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}},{key:"_createPortalOutlet",value:function(t){return this._appRef||(this._appRef=this._injector.get(Kc)),new Cy(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Xy),zi(n_),zi(Cl),zi(f_),zi(Jy),zi(Ya),zi(Mc),zi(uh),zi(uy),zi(Sh),zi(t_))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),m_=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],v_=new wi("cdk-connected-overlay-scroll-strategy"),y_=function(){var t=function t(e){o(this,t),this.elementRef=e};return t.\u0275fac=function(e){return new(e||t)(hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t}(),__=function(){var t=function(){function t(e,n,i,r,a){o(this,t),this._overlay=e,this._dir=a,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=M.EMPTY,this._attachSubscription=M.EMPTY,this._detachSubscription=M.EMPTY,this._positionSubscription=M.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new Bu,this.positionChange=new Bu,this.attach=new Bu,this.detach=new Bu,this.overlayKeydown=new Bu,this.overlayOutsideClick=new Bu,this._templatePortal=new xy(n,i),this._scrollStrategyFactory=r,this.scrollStrategy=this._scrollStrategyFactory()}return s(t,[{key:"ngOnDestroy",value:function(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}},{key:"ngOnChanges",value:function(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}},{key:"_createOverlay",value:function(){var t=this;this.positions&&this.positions.length||(this.positions=m_);var e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(function(){return t.attach.emit()}),this._detachSubscription=e.detachments().subscribe(function(){return t.detach.emit()}),e.keydownEvents().subscribe(function(e){t.overlayKeydown.next(e),e.keyCode!==Oy||t.disableClose||By(e)||(e.preventDefault(),t._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(function(e){t.overlayOutsideClick.next(e)})}},{key:"_buildConfig",value:function(){var t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new Zy({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}},{key:"_updatePositionStrategy",value:function(t){var e=this,n=this.positions.map(function(t){return{originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||e.offsetX,offsetY:t.offsetY||e.offsetY,panelClass:t.panelClass||void 0}});return t.setOrigin(this.origin.elementRef).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}},{key:"_createPositionStrategy",value:function(){var t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}},{key:"_attachOverlay",value:function(){var t=this;this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(function(e){t.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return n.lift(new Ty(t,e))}}(function(){return t.positionChange.observers.length>0})).subscribe(function(e){t.positionChange.emit(e),0===t.positionChange.observers.length&&t._positionSubscription.unsubscribe()}))}},{key:"_detachOverlay",value:function(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}},{key:"offsetX",get:function(){return this._offsetX},set:function(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"offsetY",get:function(){return this._offsetY},set:function(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=fv(t)}},{key:"lockPosition",get:function(){return this._lockPosition},set:function(t){this._lockPosition=fv(t)}},{key:"flexibleDimensions",get:function(){return this._flexibleDimensions},set:function(t){this._flexibleDimensions=fv(t)}},{key:"growAfterOpen",get:function(){return this._growAfterOpen},set:function(t){this._growAfterOpen=fv(t)}},{key:"push",get:function(){return this._push},set:function(t){this._push=fv(t)}},{key:"overlayRef",get:function(){return this._overlayRef}},{key:"dir",get:function(){return this._dir?this._dir.value:"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(lu),hs(pu),hs(v_),hs(uy,8))},t.\u0275dir=ve({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[Ee]}),t}(),b_={provide:v_,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},w_=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[g_,b_],imports:[[cy,Iy,_y],_y]}),t}();function x_(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv;return function(n){return n.lift(new k_(t,e))}}var k_=function(){function t(e,n){o(this,t),this.dueTime=e,this.scheduler=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new S_(t,this.dueTime,this.scheduler))}}]),t}(),S_=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).dueTime=i,a.scheduler=r,a.debouncedSubscription=null,a.lastValue=null,a.hasValue=!1,a}return s(n,[{key:"_next",value:function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(C_,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}},{key:"clearDebounce",value:function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}]),n}(R);function C_(t){t.debouncedNext()}var A_=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"create",value:function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),M_=function(){var t=function(){function t(e){o(this,t),this._mutationObserverFactory=e,this._observedElements=new Map}return s(t,[{key:"ngOnDestroy",value:function(){var t=this;this._observedElements.forEach(function(e,n){return t._cleanupObserver(n)})}},{key:"observe",value:function(t){var e=this,n=yv(t);return new z(function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}})}},{key:"_observeElement",value:function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new U,n=this._mutationObserverFactory.create(function(t){return e.next(t)});n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}},{key:"_unobserveElement",value:function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}},{key:"_cleanupObserver",value:function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(A_))},t.\u0275prov=Ot({factory:function(){return new t(zi(A_))},token:t,providedIn:"root"}),t}(),I_=function(){var t=function(){function t(e,n,i){o(this,t),this._contentObserver=e,this._elementRef=n,this._ngZone=i,this.event=new Bu,this._disabled=!1,this._currentSubscription=null}return s(t,[{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(function(){t._currentSubscription=(t.debounce?e.pipe(x_(t.debounce)):e).subscribe(t.event)})}},{key:"_unsubscribe",value:function(){var t;null===(t=this._currentSubscription)||void 0===t||t.unsubscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=fv(t),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(t){this._debounce=pv(t),this._subscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(M_),hs(Tl),hs(Mc))},t.\u0275dir=ve({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t}(),T_=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[A_]}),t}();function D_(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}var E_="cdk-describedby-message-container",O_="cdk-describedby-message",P_="cdk-describedby-host",R_=0,L_=new Map,N_=null,F_=function(){var t=function(){function t(e){o(this,t),this._document=e}return s(t,[{key:"describe",value:function(t,e,n){if(this._canBeDescribed(t,e)){var i=V_(e,n);"string"!=typeof e?(z_(e),L_.set(i,{messageElement:e,referenceCount:0})):L_.has(i)||this._createMessageElement(e,n),this._isElementDescribedByMessage(t,i)||this._addMessageReference(t,i)}}},{key:"removeDescription",value:function(t,e,n){if(e&&this._isElementNode(t)){var i=V_(e,n);if(this._isElementDescribedByMessage(t,i)&&this._removeMessageReference(t,i),"string"==typeof e){var r=L_.get(i);r&&0===r.referenceCount&&this._deleteMessageElement(i)}N_&&0===N_.childNodes.length&&this._deleteMessagesContainer()}}},{key:"ngOnDestroy",value:function(){for(var t=this._document.querySelectorAll("[".concat(P_,"]")),e=0;e-1&&e!==n._activeItemIndex&&(n._activeItemIndex=e)}})}return s(t,[{key:"skipPredicate",value:function(t){return this._skipPredicateFn=t,this}},{key:"withWrap",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._wrap=t,this}},{key:"withVerticalOrientation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._vertical=t,this}},{key:"withHorizontalOrientation",value:function(t){return this._horizontal=t,this}},{key:"withAllowedModifierKeys",value:function(t){return this._allowedModifierKeys=t,this}},{key:"withTypeAhead",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200;return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(rp(function(e){return t._pressedLetters.push(e)}),x_(e),Ld(function(){return t._pressedLetters.length>0}),q(function(){return t._pressedLetters.join("")})).subscribe(function(e){for(var n=t._getItemsArray(),i=1;i0&&void 0!==arguments[0])||arguments[0];return this._homeAndEnd=t,this}},{key:"setActiveItem",value:function(t){var e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}},{key:"onKeydown",value:function(t){var e=this,n=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(function(n){return!t[n]||e._allowedModifierKeys.indexOf(n)>-1});switch(n){case 9:return void this.tabOut.next();case zy:if(this._vertical&&i){this.setNextItemActive();break}return;case Fy:if(this._vertical&&i){this.setPreviousItemActive();break}return;case Vy:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case Ny:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case Ly:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case Ry:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||By(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(n>=65&&n<=90||n>=48&&n<=57)&&this._letterKeyStream.next(String.fromCharCode(n))))}this._pressedLetters=[],t.preventDefault()}},{key:"isTyping",value:function(){return this._pressedLetters.length>0}},{key:"setFirstItemActive",value:function(){this._setActiveItemByIndex(0,1)}},{key:"setLastItemActive",value:function(){this._setActiveItemByIndex(this._items.length-1,-1)}},{key:"setNextItemActive",value:function(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}},{key:"setPreviousItemActive",value:function(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}},{key:"updateActiveItem",value:function(t){var e=this._getItemsArray(),n="number"==typeof t?t:e.indexOf(t),i=e[n];this._activeItem=null==i?null:i,this._activeItemIndex=n}},{key:"_setActiveItemByDelta",value:function(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}},{key:"_setActiveInWrapMode",value:function(t){for(var e=this._getItemsArray(),n=1;n<=e.length;n++){var i=(this._activeItemIndex+t*n+e.length)%e.length;if(!this._skipPredicateFn(e[i]))return void this.setActiveItem(i)}}},{key:"_setActiveInDefaultMode",value:function(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}},{key:"_setActiveItemByIndex",value:function(t,e){var n=this._getItemsArray();if(n[t]){for(;this._skipPredicateFn(n[t]);)if(!n[t+=e])return;this.setActiveItem(t)}}},{key:"_getItemsArray",value:function(){return this._items instanceof ju?this._items.toArray():this._items}},{key:"activeItemIndex",get:function(){return this._activeItemIndex}},{key:"activeItem",get:function(){return this._activeItem}}]),t}(),H_=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"setActiveItem",value:function(t){this.activeItem&&this.activeItem.setInactiveStyles(),r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.setActiveStyles()}}]),n}(B_),j_=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._origin="program",t}return s(n,[{key:"setFocusOrigin",value:function(t){return this._origin=t,this}},{key:"setActiveItem",value:function(t){r(i(n.prototype),"setActiveItem",this).call(this,t),this.activeItem&&this.activeItem.focus(this._origin)}}]),n}(B_),G_=function(){var t=function(){function t(e){o(this,t),this._platform=e}return s(t,[{key:"isDisabled",value:function(t){return t.hasAttribute("disabled")}},{key:"isVisible",value:function(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}},{key:"isTabbable",value:function(t){if(!this._platform.isBrowser)return!1;var e,n=function(t){try{return t.frameElement}catch(fH){return null}}((e=t).ownerDocument&&e.ownerDocument.defaultView||window);if(n){if(-1===W_(n))return!1;if(!this.isVisible(n))return!1}var i=t.nodeName.toLowerCase(),r=W_(t);return t.hasAttribute("contenteditable")?-1!==r:"iframe"!==i&&"object"!==i&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){var e=t.nodeName.toLowerCase(),n="input"===e&&t.type;return"text"===n||"password"===n||"select"===e||"textarea"===e}(t))&&("audio"===i?!!t.hasAttribute("controls")&&-1!==r:"video"===i?-1!==r&&(null!==r||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}},{key:"isFocusable",value:function(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){var e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||U_(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey))},token:t,providedIn:"root"}),t}();function U_(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;var e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function W_(t){if(!U_(t))return null;var e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}var Y_=function(){function t(e,n,i,r){var a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o(this,t),this._element=e,this._checker=n,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=function(){return a.focusLastTabbableElement()},this.endAnchorListener=function(){return a.focusFirstTabbableElement()},this._enabled=!0,s||this.attachAnchors()}return s(t,[{key:"destroy",value:function(){var t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}},{key:"attachAnchors",value:function(){var t=this;return!!this._hasAttached||(this._ngZone.runOutsideAngular(function(){t._startAnchor||(t._startAnchor=t._createAnchor(),t._startAnchor.addEventListener("focus",t.startAnchorListener)),t._endAnchor||(t._endAnchor=t._createAnchor(),t._endAnchor.addEventListener("focus",t.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}},{key:"focusInitialElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusInitialElement())})})}},{key:"focusFirstTabbableElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusFirstTabbableElement())})})}},{key:"focusLastTabbableElementWhenReady",value:function(){var t=this;return new Promise(function(e){t._executeOnStable(function(){return e(t.focusLastTabbableElement())})})}},{key:"_getRegionBoundary",value:function(t){for(var e=this._element.querySelectorAll("[cdk-focus-region-".concat(t,"], ")+"[cdkFocusRegion".concat(t,"], ")+"[cdk-focus-".concat(t,"]")),n=0;n=0;n--){var i=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(i)return i}return null}},{key:"_createAnchor",value:function(){var t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}},{key:"_toggleAnchorTabIndex",value:function(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}},{key:"toggleAnchors",value:function(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}},{key:"_executeOnStable",value:function(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Nf(1)).subscribe(t)}},{key:"enabled",get:function(){return this._enabled},set:function(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}}]),t}(),q_=function(){var t=function(){function t(e,n,i){o(this,t),this._checker=e,this._ngZone=n,this._document=i}return s(t,[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Y_(t,this._checker,this._ngZone,this._document,e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(G_),zi(Mc),zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(G_),zi(Mc),zi(uh))},token:t,providedIn:"root"}),t}(),X_=function(){var t=function(){function t(e,n,i){o(this,t),this._elementRef=e,this._focusTrapFactory=n,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}return s(t,[{key:"ngOnDestroy",value:function(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}},{key:"ngAfterContentInit",value:function(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}},{key:"ngDoCheck",value:function(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}},{key:"ngOnChanges",value:function(t){var e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}},{key:"_captureFocus",value:function(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}},{key:"enabled",get:function(){return this.focusTrap.enabled},set:function(t){this.focusTrap.enabled=fv(t)}},{key:"autoCapture",get:function(){return this._autoCapture},set:function(t){this._autoCapture=fv(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(q_),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[Ee]}),t}();"undefined"!=typeof Element&∈var Z_=new wi("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),K_=new wi("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),$_=function(){var t=function(){function t(e,n,i,r){o(this,t),this._ngZone=n,this._defaultOptions=r,this._document=i,this._liveElement=e||this._createLiveElement()}return s(t,[{key:"announce",value:function(t){for(var e,n,i=this,r=this._defaultOptions,o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1&&void 0!==arguments[1]&&arguments[1],n=yv(t);if(!this._platform.isBrowser||1!==n.nodeType)return Pd(null);var i=sy(n)||this._getDocument(),r=this._elementInfo.get(n);if(r)return e&&(r.checkChildren=!0),r.subject;var o={checkChildren:e,subject:new U,rootNode:i};return this._elementInfo.set(n,o),this._registerGlobalListeners(o),o.subject}},{key:"stopMonitoring",value:function(t){var e=yv(t),n=this._elementInfo.get(e);n&&(n.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(n))}},{key:"focusVia",value:function(t,e,n){var i=this,r=yv(t);r===this._getDocument().activeElement?this._getClosestElementsInfo(r).forEach(function(t){var n=y(t,2);return i._originChanged(n[0],e,n[1])}):(this._setOriginForCurrentEventQueue(e),"function"==typeof r.focus&&r.focus(n))}},{key:"ngOnDestroy",value:function(){var t=this;this._elementInfo.forEach(function(e,n){return t.stopMonitoring(n)})}},{key:"_getDocument",value:function(){return this._document||document}},{key:"_getWindow",value:function(){return this._getDocument().defaultView||window}},{key:"_toggleClass",value:function(t,e,n){n?t.classList.add(e):t.classList.remove(e)}},{key:"_getFocusOrigin",value:function(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}},{key:"_setClasses",value:function(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}},{key:"_setOriginForCurrentEventQueue",value:function(t){var e=this;this._ngZone.runOutsideAngular(function(){e._origin=t,0===e._detectionMode&&(e._originTimeoutId=setTimeout(function(){return e._origin=null},1))})}},{key:"_wasCausedByTouch",value:function(t){var e=rb(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}},{key:"_onFocus",value:function(t,e){var n=this._elementInfo.get(e);n&&(n.checkChildren||e===rb(t))&&this._originChanged(e,this._getFocusOrigin(t),n)}},{key:"_onBlur",value:function(t,e){var n=this._elementInfo.get(e);!n||n.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(n.subject,null))}},{key:"_emitOrigin",value:function(t,e){this._ngZone.run(function(){return t.next(e)})}},{key:"_registerGlobalListeners",value:function(t){var e=this;if(this._platform.isBrowser){var n=t.rootNode,i=this._rootNodeFocusListenerCount.get(n)||0;i||this._ngZone.runOutsideAngular(function(){n.addEventListener("focus",e._rootNodeFocusAndBlurListener,nb),n.addEventListener("blur",e._rootNodeFocusAndBlurListener,nb)}),this._rootNodeFocusListenerCount.set(n,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(function(){var t=e._getDocument(),n=e._getWindow();t.addEventListener("keydown",e._documentKeydownListener,nb),t.addEventListener("mousedown",e._documentMousedownListener,nb),t.addEventListener("touchstart",e._documentTouchstartListener,nb),n.addEventListener("focus",e._windowFocusListener)})}}},{key:"_removeGlobalListeners",value:function(t){var e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){var n=this._rootNodeFocusListenerCount.get(e);n>1?this._rootNodeFocusListenerCount.set(e,n-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,nb),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,nb),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){var i=this._getDocument(),r=this._getWindow();i.removeEventListener("keydown",this._documentKeydownListener,nb),i.removeEventListener("mousedown",this._documentMousedownListener,nb),i.removeEventListener("touchstart",this._documentTouchstartListener,nb),r.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}},{key:"_originChanged",value:function(t,e,n){this._setClasses(t,e),this._emitOrigin(n.subject,e),this._lastFocusOrigin=e}},{key:"_getClosestElementsInfo",value:function(t){var e=[];return this._elementInfo.forEach(function(n,i){(i===t||n.checkChildren&&i.contains(t))&&e.push([i,n])}),e}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(Mc),zi(ey),zi(uh,8),zi(eb,8))},t.\u0275prov=Ot({factory:function(){return new t(zi(Mc),zi(ey),zi(uh,8),zi(eb,8))},token:t,providedIn:"root"}),t}();function rb(t){return t.composedPath?t.composedPath()[0]:t.target}var ob=function(){var t=function(){function t(e,n){o(this,t),this._elementRef=e,this._focusMonitor=n,this.cdkFocusChange=new Bu}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(function(e){return t.cdkFocusChange.emit(e)})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ib))},t.\u0275dir=ve({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t}(),ab="cdk-high-contrast-black-on-white",sb="cdk-high-contrast-white-on-black",lb="cdk-high-contrast-active",ub=function(){var t=function(){function t(e,n){o(this,t),this._platform=e,this._document=n}return s(t,[{key:"getHighContrastMode",value:function(){if(!this._platform.isBrowser)return 0;var t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);var e=this._document.defaultView||window,n=e&&e.getComputedStyle?e.getComputedStyle(t):null,i=(n&&n.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),i){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}},{key:"_applyBodyHighContrastModeCssClasses",value:function(){if(this._platform.isBrowser&&this._document.body){var t=this._document.body.classList;t.remove(lb),t.remove(ab),t.remove(sb);var e=this.getHighContrastMode();1===e?(t.add(lb),t.add(ab)):2===e&&(t.add(lb),t.add(sb))}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey),zi(uh))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey),zi(uh))},token:t,providedIn:"root"}),t}(),cb=function(){var t=function t(e){o(this,t),e._applyBodyHighContrastModeCssClasses()};return t.\u0275fac=function(e){return new(e||t)(zi(ub))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[ny,T_]]}),t}(),hb=new Ll("11.2.12"),db=function t(){o(this,t)},fb=function t(){o(this,t)},pb="*";function gb(t,e){return{type:7,name:t,definitions:e,options:{}}}function mb(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:e,timings:t}}function vb(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:t,options:e}}function yb(t){return{type:6,styles:t,offset:null}}function _b(t,e,n){return{type:0,name:t,styles:e,options:n}}function bb(t){return{type:5,steps:t}}function wb(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:t,animation:e,options:n}}function xb(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:t}}function kb(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:t,animation:e,options:n}}function Sb(t){Promise.resolve(null).then(t)}var Cb=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o(this,t),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+n}return s(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var t=this;Sb(function(){return t._onFinish()})}},{key:"_onStart",value:function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(t){this._position=this.totalTime?t*this.totalTime:1}},{key:"getPosition",value:function(){return this.totalTime?this._position/this.totalTime:1}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}}]),t}(),Ab=function(){function t(e){var n=this;o(this,t),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;var i=0,r=0,a=0,s=this.players.length;0==s?Sb(function(){return n._onFinish()}):this.players.forEach(function(t){t.onDone(function(){++i==s&&n._onFinish()}),t.onDestroy(function(){++r==s&&n._onDestroy()}),t.onStart(function(){++a==s&&n._onStart()})}),this.totalTime=this.players.reduce(function(t,e){return Math.max(t,e.totalTime)},0)}return s(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach(function(t){return t.init()})}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[])}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(function(t){return t.play()})}},{key:"pause",value:function(){this.players.forEach(function(t){return t.pause()})}},{key:"restart",value:function(){this.players.forEach(function(t){return t.restart()})}},{key:"finish",value:function(){this._onFinish(),this.players.forEach(function(t){return t.finish()})}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(function(t){return t.destroy()}),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach(function(t){return t.reset()}),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(t){var e=t*this.totalTime;this.players.forEach(function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}},{key:"getPosition",value:function(){var t=this.players.reduce(function(t,e){return null===t||e.totalTime>t.totalTime?e:t},null);return null!=t?t.getPosition():0}},{key:"beforeDestroy",value:function(){this.players.forEach(function(t){t.beforeDestroy&&t.beforeDestroy()})}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}}]),t}(),Mb="!";function Ib(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Tb(t){switch(t.length){case 0:return new Cb;case 1:return t[0];default:return new Ab(t)}}function Db(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=[],s=[],l=-1,u=null;if(i.forEach(function(t){var n=t.offset,i=n==l,c=i&&u||{};Object.keys(t).forEach(function(n){var i=n,s=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,a),s){case Mb:s=r[n];break;case pb:s=o[n];break;default:s=e.normalizeStyleValue(n,i,s,a)}c[i]=s}),i||s.push(c),u=c,l=n}),a.length){var c="\n - ";throw new Error("Unable to animate due to the following errors:".concat(c).concat(a.join(c)))}return s}function Eb(t,e,n,i){switch(e){case"start":t.onStart(function(){return i(n&&Ob(n,"start",t))});break;case"done":t.onDone(function(){return i(n&&Ob(n,"done",t))});break;case"destroy":t.onDestroy(function(){return i(n&&Ob(n,"destroy",t))})}}function Ob(t,e,n){var i=n.totalTime,r=Pb(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),o=t._data;return null!=o&&(r._data=o),r}function Pb(t,e,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0;return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:o,disabled:!!a}}function Rb(t,e,n){var i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function Lb(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var Nb=function(t,e){return!1},Fb=function(t,e){return!1},Vb=function(t,e,n){return[]},zb=Ib();(zb||"undefined"!=typeof Element)&&(Nb=function(t,e){return t.contains(e)},Fb=function(){if(zb||Element.prototype.matches)return function(t,e){return t.matches(e)};var t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?function(t,n){return e.apply(t,[n])}:Fb}(),Vb=function(t,e,n){var i=[];if(n)for(var r=t.querySelectorAll(e),o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function ow(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)for(var i in t)n[i]=t[i];else rw(t,n);return n}function aw(t,e,n){return n?e+":"+n+";":""}function sw(t){for(var e="",n=0;n *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var r=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==r||r.length<4)return n.push('The provided transition expression "'.concat(t,'" is not supported')),e;var o=r[1],a=r[2],s=r[3];e.push(Sw(o,s)),"<"!=a[0]||o==ww&&s==ww||e.push(Sw(s,o))}(t,r,i)}):r.push(n),r),animation:o,queryCount:e.queryCount,depCount:e.depCount,options:Ew(t.options)}}},{key:"visitSequence",value:function(t,e){var n=this;return{type:2,steps:t.steps.map(function(t){return _w(n,t,e)}),options:Ew(t.options)}}},{key:"visitGroup",value:function(t,e){var n=this,i=e.currentTime,r=0,o=t.steps.map(function(t){e.currentTime=i;var o=_w(n,t,e);return r=Math.max(r,e.currentTime),o});return e.currentTime=r,{type:3,steps:o,options:Ew(t.options)}}},{key:"visitAnimate",value:function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return Ow(iw(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some(function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)})){var r=Ow(0,0,"");return r.dynamic=!0,r.strValue=i,r}return Ow((n=n||iw(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var r=t.styles?t.styles:yb({});if(5==r.type)n=this.visitKeyframes(r,e);else{var o=t.styles,a=!1;if(!o){a=!0;var s={};i.easing&&(s.easing=i.easing),o=yb(s)}e.currentTime+=i.duration+i.delay;var l=this.visitStyle(o,e);l.isEmptyStep=a,n=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}},{key:"_makeStyleAst",value:function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach(function(t){"string"==typeof t?t==pb?n.push(t):e.errors.push("The provided style string value ".concat(t," is not allowed.")):n.push(t)}):n.push(t.styles);var i=!1,r=null;return n.forEach(function(t){if(Dw(t)){var e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(var o in e)if(e[o].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(t,e){var n=this,i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(function(t){"string"!=typeof t&&Object.keys(t).forEach(function(i){if(n._driver.validateStyleProperty(i)){var a,s,l,u=e.collectedStyles[e.currentQuerySelector],c=u[i],h=!0;c&&(o!=r&&o>=c.startTime&&r<=c.endTime&&(e.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(c.startTime,'ms" and "').concat(c.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(o,'ms" and "').concat(r,'ms"')),h=!1),o=c.startTime),h&&(u[i]={startTime:o,endTime:r}),e.options&&(a=e.errors,s=e.options.params||{},(l=dw(t[i])).length&&l.forEach(function(t){s.hasOwnProperty(t)||a.push("Unable to resolve the local animation param ".concat(t," in the given list of values"))}))}else e.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))})})}},{key:"visitKeyframes",value:function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var r=0,o=[],a=!1,s=!1,l=0,u=t.steps.map(function(t){var i=n._makeStyleAst(t,e),u=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach(function(t){if(Dw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}});else if(Dw(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),c=0;return null!=u&&(r++,c=i.offset=u),s=s||c<0||c>1,a=a||c0&&r0?r==d?1:h*r:o[r],s=a*g;e.currentTime=f+p.delay+s,p.duration=s,n._validateStyleAst(t,e),t.offset=a,i.styles.push(t)}),i}},{key:"visitReference",value:function(t,e){return{type:8,animation:_w(this,cw(t.animation),e),options:Ew(t.options)}}},{key:"visitAnimateChild",value:function(t,e){return e.depCount++,{type:9,options:Ew(t.options)}}},{key:"visitAnimateRef",value:function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Ew(t.options)}}},{key:"visitQuery",value:function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var r=y(function(t){var e=!!t.split(/\s*,\s*/).find(function(t){return t==Cw});return e&&(t=t.replace(Aw,"")),[t=t.replace(/@\*/g,Qb).replace(/@\w+/g,function(t){return".ng-trigger-"+t.substr(1)}).replace(/:animating/g,tw),e]}(t.selector),2),o=r[0],a=r[1];e.currentQuerySelector=n.length?n+" "+o:o,Rb(e.collectedStyles,e.currentQuerySelector,{});var s=_w(this,cw(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:a,animation:s,originalSelector:t.selector,options:Ew(t.options)}}},{key:"visitStagger",value:function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:iw(t.timings,e.errors,!0);return{type:12,animation:_w(this,cw(t.animation),e),timings:n,options:null}}}]),t}(),Tw=function t(e){o(this,t),this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null};function Dw(t){return!Array.isArray(t)&&"object"==typeof t}function Ew(t){var e;return t?(t=rw(t)).params&&(t.params=(e=t.params)?rw(e):null):t={},t}function Ow(t,e,n){return{duration:t,delay:e,easing:n}}function Pw(t,e,n,i,r,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:a,subTimeline:s}}var Rw=function(){function t(){o(this,t),this._map=new Map}return s(t,[{key:"consume",value:function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e}},{key:"append",value:function(t,e){var n,i=this._map.get(t);i||this._map.set(t,i=[]),(n=i).push.apply(n,b(e))}},{key:"has",value:function(t){return this._map.has(t)}},{key:"clear",value:function(){this._map.clear()}}]),t}(),Lw=new RegExp(":enter","g"),Nw=new RegExp(":leave","g");function Fw(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new Vw).buildKeyframes(t,e,n,i,r,o,a,s,l,u)}var Vw=function(){function t(){o(this,t)}return s(t,[{key:"buildKeyframes",value:function(t,e,n,i,r,o,a,s,l){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];l=l||new Rw;var c=new Bw(t,e,l,i,r,u,[]);c.options=s,c.currentTimeline.setStyles([o],null,c.errors,s),_w(this,n,c);var h=c.timelines.filter(function(t){return t.containsAnimation()});if(h.length&&Object.keys(a).length){var d=h[h.length-1];d.allowOnlyTimelineStyles()||d.setStyles([a],null,c.errors,s)}return h.length?h.map(function(t){return t.buildKeyframes()}):[Pw(e,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(t,e){}},{key:"visitState",value:function(t,e){}},{key:"visitTransition",value:function(t,e){}},{key:"visitAnimateChild",value:function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,o=this._visitSubInstructions(n,i,i.options);r!=o&&e.transformIntoNewTimeline(o)}e.previousNode=t}},{key:"visitAnimateRef",value:function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}},{key:"_visitSubInstructions",value:function(t,e,n){var i=e.currentTimeline.currentTime,r=null!=n.duration?ew(n.duration):null,o=null!=n.delay?ew(n.delay):null;return 0!==r&&t.forEach(function(t){var n=e.appendInstructionToTimeline(t,r,o);i=Math.max(i,n.duration+n.delay)}),i}},{key:"visitReference",value:function(t,e){e.updateOptions(t.options,!0),_w(this,t.animation,e),e.previousNode=t}},{key:"visitSequence",value:function(t,e){var n=this,i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&((r=e.createSubContext(o)).transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=zw);var a=ew(o.delay);r.delayNextStep(a)}t.steps.length&&(t.steps.forEach(function(t){return _w(n,t,r)}),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}},{key:"visitGroup",value:function(t,e){var n=this,i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?ew(t.options.delay):0;t.steps.forEach(function(a){var s=e.createSubContext(t.options);o&&s.delayNextStep(o),_w(n,a,s),r=Math.max(r,s.currentTimeline.currentTime),i.push(s.currentTimeline)}),i.forEach(function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)}),e.transformIntoNewTimeline(r),e.previousNode=t}},{key:"_visitTiming",value:function(t,e){if(t.dynamic){var n=t.strValue;return iw(e.params?fw(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}},{key:"visitAnimate",value:function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}},{key:"visitStyle",value:function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}},{key:"visitKeyframes",value:function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,o=e.createSubContext().currentTimeline;o.easing=n.easing,t.styles.forEach(function(t){o.forwardTime((t.offset||0)*r),o.setStyles(t.styles,t.easing,e.errors,e.options),o.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(o),e.transformIntoNewTimeline(i+r),e.previousNode=t}},{key:"visitQuery",value:function(t,e){var n=this,i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?ew(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=zw);var a=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=s.length;var l=null;s.forEach(function(i,r){e.currentQueryIndex=r;var s=e.createSubContext(t.options,i);o&&s.delayNextStep(o),i===e.element&&(l=s.currentTimeline),_w(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),a=Math.max(a,s.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(a),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}},{key:"visitStagger",value:function(t,e){var n=e.parentContext,i=e.currentTimeline,r=t.timings,o=Math.abs(r.duration),a=o*(e.currentQueryTotal-1),s=o*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":s=a-s;break;case"full":s=n.currentStaggerTime}var l=e.currentTimeline;s&&l.delayNextStep(s);var u=l.currentTime;_w(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-u+(i.startTime-n.currentTimeline.startTime)}}]),t}(),zw={},Bw=function(){function t(e,n,i,r,a,s,l,u){o(this,t),this._driver=e,this.element=n,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=a,this.errors=s,this.timelines=l,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=zw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=u||new Hw(this._driver,n,0),l.push(this.currentTimeline)}return s(t,[{key:"updateOptions",value:function(t,e){var n=this;if(t){var i=t,r=this.options;null!=i.duration&&(r.duration=ew(i.duration)),null!=i.delay&&(r.delay=ew(i.delay));var o=i.params;if(o){var a=r.params;a||(a=this.options.params={}),Object.keys(o).forEach(function(t){e&&a.hasOwnProperty(t)||(a[t]=fw(o[t],a,n.errors))})}}}},{key:"_copyOptions",value:function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach(function(t){n[t]=e[t]})}}return t}},{key:"createSubContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=n||this.element,o=new t(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}},{key:"transformIntoNewTimeline",value:function(t){return this.previousNode=zw,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new jw(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}},{key:"incrementTime",value:function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}},{key:"delayNextStep",value:function(t){t>0&&this.currentTimeline.delayNextStep(t)}},{key:"invokeQuery",value:function(t,e,n,i,r,o){var a=[];if(i&&a.push(this.element),t.length>0){t=(t=t.replace(Lw,"."+this._enterClassName)).replace(Nw,"."+this._leaveClassName);var s=this._driver.query(this.element,t,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),a.push.apply(a,b(s))}return r||0!=a.length||o.push('`query("'.concat(e,'")` returned zero elements. (Use `query("').concat(e,'", { optional: true })` if you wish to allow this.)')),a}},{key:"params",get:function(){return this.options.params}}]),t}(),Hw=function(){function t(e,n,i,r){o(this,t),this._driver=e,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return s(t,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"delayNextStep",value:function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}},{key:"fork",value:function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}},{key:"_updateStyle",value:function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(function(t){e._backFill[t]=e._globalTimelineStyles[t]||pb,e._currentKeyframe[t]=pb}),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(t,e,n,i){var r=this;e&&(this._previousKeyframe.easing=e);var o=i&&i.params||{},a=function(t,e){var n,i={};return t.forEach(function(t){"*"===t?(n=n||Object.keys(e)).forEach(function(t){i[t]=pb}):ow(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(a).forEach(function(t){var e=fw(a[t],o,n);r._pendingStyles[t]=e,r._localTimelineStyles.hasOwnProperty(t)||(r._backFill[t]=r._globalTimelineStyles.hasOwnProperty(t)?r._globalTimelineStyles[t]:pb),r._updateStyle(t,e)})}},{key:"applyStylesToKeyframe",value:function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach(function(n){t._currentKeyframe[n]=e[n]}),Object.keys(this._localTimelineStyles).forEach(function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])}))}},{key:"snapshotCurrentStyles",value:function(){var t=this;Object.keys(this._localTimelineStyles).forEach(function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)})}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(t){var e=this;Object.keys(t._styleSummary).forEach(function(n){var i=e._styleSummary[n],r=t._styleSummary[n];(!i||r.time>i.time)&&e._updateStyle(n,r.value)})}},{key:"buildKeyframes",value:function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach(function(o,a){var s=ow(o,!0);Object.keys(s).forEach(function(t){var i=s[t];i==Mb?e.add(t):i==pb&&n.add(t)}),i||(s.offset=a/t.duration),r.push(s)});var o=e.size?pw(e.values()):[],a=n.size?pw(n.values()):[];if(i){var s=r[0],l=rw(s);s.offset=0,l.offset=1,r=[s,l]}return Pw(this.element,r,o,a,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t}}]),t}(),jw=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u,c=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return o(this,n),(u=e.call(this,t,i,l.delay)).element=i,u.keyframes=r,u.preStyleProps=a,u.postStyleProps=s,u._stretchStartingKeyframe=c,u.timings={duration:l.duration,delay:l.delay,easing:l.easing},u}return s(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,r=e.easing;if(this._stretchStartingKeyframe&&n){var o=[],a=i+n,s=n/a,l=ow(t[0],!1);l.offset=0,o.push(l);var u=ow(t[0],!1);u.offset=Gw(s),o.push(u);for(var c=t.length-1,h=1;h<=c;h++){var d=ow(t[h],!1);d.offset=Gw((n+d.offset*i)/a),o.push(d)}i=a,n=0,r="",t=o}return Pw(this.element,t,this.preStyleProps,this.postStyleProps,i,n,r,!0)}}]),n}(Hw);function Gw(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,e-1);return Math.round(t*n)/n}var Uw=function t(){o(this,t)},Ww=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"normalizePropertyName",value:function(t,e){return mw(t)}},{key:"normalizeStyleValue",value:function(t,e,n,i){var r="",o=n.toString().trim();if(Yw[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{var a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&i.push("Please provide a CSS unit value for ".concat(t,":").concat(n))}return o+r}}]),n}(Uw),Yw=function(){return t="width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(","),e={},t.forEach(function(t){return e[t]=!0}),e;var t,e}();function qw(t,e,n,i,r,o,a,s,l,u,c,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:o,toState:i,toStyles:a,timelines:s,queriedElements:l,preStyleProps:u,postStyleProps:c,totalTime:h,errors:d}}var Xw={},Zw=function(){function t(e,n,i){o(this,t),this._triggerName=e,this.ast=n,this._stateStyles=i}return s(t,[{key:"match",value:function(t,e,n,i){return function(t,e,n,i,r){return t.some(function(t){return t(e,n,i,r)})}(this.ast.matchers,t,e,n,i)}},{key:"buildStyles",value:function(t,e,n){var i=this._stateStyles["*"],r=this._stateStyles[t],o=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):o}},{key:"build",value:function(t,e,n,i,r,o,a,s,l,u){var c=[],h=this.ast.options&&this.ast.options.params||Xw,d=this.buildStyles(n,a&&a.params||Xw,c),f=s&&s.params||Xw,p=this.buildStyles(i,f,c),g=new Set,m=new Map,v=new Map,y="void"===i,_={params:Object.assign(Object.assign({},h),f)},b=u?[]:Fw(t,e,this.ast.animation,r,o,d,p,_,l,c),w=0;if(b.forEach(function(t){w=Math.max(t.duration+t.delay,w)}),c.length)return qw(e,this._triggerName,n,i,y,d,p,[],[],m,v,w,c);b.forEach(function(t){var n=t.element,i=Rb(m,n,{});t.preStyleProps.forEach(function(t){return i[t]=!0});var r=Rb(v,n,{});t.postStyleProps.forEach(function(t){return r[t]=!0}),n!==e&&g.add(n)});var x=pw(g.values());return qw(e,this._triggerName,n,i,y,d,p,b,x,m,v,w)}}]),t}(),Kw=function(){function t(e,n){o(this,t),this.styles=e,this.defaultParams=n}return s(t,[{key:"buildStyles",value:function(t,e){var n={},i=rw(this.defaultParams);return Object.keys(t).forEach(function(e){var n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(function(t){if("string"!=typeof t){var r=t;Object.keys(r).forEach(function(t){var o=r[t];o.length>1&&(o=fw(o,i,e)),n[t]=o})}}),n}}]),t}(),$w=function(){function t(e,n){var i=this;o(this,t),this.name=e,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach(function(t){i.states[t.name]=new Kw(t.style,t.options&&t.options.params||{})}),Qw(this.states,"true","1"),Qw(this.states,"false","0"),n.transitions.forEach(function(t){i.transitionFactories.push(new Zw(e,t,i.states))}),this.fallbackTransition=new Zw(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return s(t,[{key:"matchTransition",value:function(t,e,n,i){return this.transitionFactories.find(function(r){return r.match(t,e,n,i)})||null}},{key:"matchStyles",value:function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),t}();function Qw(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var Jw=new Rw,tx=function(){function t(e,n,i){o(this,t),this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return s(t,[{key:"register",value:function(t,e){var n=[],i=Mw(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: ".concat(n.join("\n")));this._animations[t]=i}},{key:"_buildPlayer",value:function(t,e,n){var i=t.element,r=Db(this._driver,this._normalizer,i,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}},{key:"create",value:function(t,e){var n,i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],a=this._animations[t],s=new Map;if(a?(n=Fw(this._driver,e,a,Zb,Kb,{},{},r,Jw,o)).forEach(function(t){var e=Rb(s,t.element,{});t.postStyleProps.forEach(function(t){return e[t]=null})}):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: ".concat(o.join("\n")));s.forEach(function(t,e){Object.keys(t).forEach(function(n){t[n]=i._driver.computeStyle(e,n,pb)})});var l=n.map(function(t){var e=s.get(t.element);return i._buildPlayer(t,{},e)}),u=Tb(l);return this._playersById[t]=u,u.onDestroy(function(){return i.destroy(t)}),this.players.push(u),u}},{key:"destroy",value:function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by ".concat(t));return e}},{key:"listen",value:function(t,e,n,i){var r=Pb(e,"","","");return Eb(this._getPlayer(t),n,r,i),function(){}}},{key:"command",value:function(t,e,n,i){if("register"!=n)if("create"!=n){var r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])}}]),t}(),ex="ng-animate-queued",nx="ng-animate-disabled",ix=".ng-animate-disabled",rx="ng-star-inserted",ox=[],ax={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},sx={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},lx=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";o(this,t),this.namespaceId=n;var i=e&&e.hasOwnProperty("value"),r=i?e.value:e;if(this.value=px(r),i){var a=rw(e);delete a.value,this.options=a}else this.options={};this.options.params||(this.options.params={})}return s(t,[{key:"absorbOptions",value:function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach(function(t){null==n[t]&&(n[t]=e[t])})}}},{key:"params",get:function(){return this.options.params}}]),t}(),ux="void",cx=new lx(ux),hx=function(){function t(e,n,i){o(this,t),this.id=e,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,_x(n,this._hostClassName)}return s(t,[{key:"listen",value:function(t,e,n,i){var r,o=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(e,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(e,'" because the provided event is undefined!'));if("start"!=(r=n)&&"done"!=r)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(e,'" is not supported!'));var a=Rb(this._elementListeners,t,[]),s={name:e,phase:n,callback:i};a.push(s);var l=Rb(this._engine.statesByElement,t,{});return l.hasOwnProperty(e)||(_x(t,$b),_x(t,"ng-trigger-"+e),l[e]=cx),function(){o._engine.afterFlush(function(){var t=a.indexOf(s);t>=0&&a.splice(t,1),o._triggers[e]||delete l[e]})}}},{key:"register",value:function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}},{key:"_getTrigger",value:function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'.concat(t,'" has not been registered!'));return e}},{key:"trigger",value:function(t,e,n){var i=this,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this._getTrigger(e),a=new fx(this.id,e,t),s=this._engine.statesByElement.get(t);s||(_x(t,$b),_x(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,s={}));var l=s[e],u=new lx(n,this.id),c=n&&n.hasOwnProperty("value");!c&&l&&u.absorbOptions(l.options),s[e]=u,l||(l=cx);var h=u.value===ux;if(h||l.value!==u.value){var d=Rb(this._engine.playersByElement,t,[]);d.forEach(function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()});var f=o.matchTransition(l.value,u.value,t,u.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:l,toState:u,player:a,isFallbackTransition:p}),p||(_x(t,ex),a.onStart(function(){bx(t,ex)})),a.onDone(function(){var e=i.players.indexOf(a);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var r=n.indexOf(a);r>=0&&n.splice(r,1)}}),this.players.push(a),d.push(a),a}if(!kx(l.params,u.params)){var g=[],m=o.matchStyles(l.value,l.params,g),v=o.matchStyles(u.value,u.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(function(){uw(t,m),lw(t,v)})}}},{key:"deregister",value:function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach(function(e,n){delete e[t]}),this._elementListeners.forEach(function(n,i){e._elementListeners.set(i,n.filter(function(e){return e.name!=t}))})}},{key:"clearElementCache",value:function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach(function(t){return t.destroy()}),this._engine.playersByElement.delete(t))}},{key:"_signalRemovalForInnerTriggers",value:function(t,e){var n=this,i=this._engine.driver.query(t,Qb,!0);i.forEach(function(t){if(!t.__ng_removed){var i=n._engine.fetchNamespacesByElement(t);i.size?i.forEach(function(n){return n.triggerLeaveAnimation(t,e,!1,!0)}):n.clearElementCache(t)}}),this._engine.afterFlushAnimationsDone(function(){return i.forEach(function(t){return n.clearElementCache(t)})})}},{key:"triggerLeaveAnimation",value:function(t,e,n,i){var r=this,o=this._engine.statesByElement.get(t);if(o){var a=[];if(Object.keys(o).forEach(function(e){if(r._triggers[e]){var n=r.trigger(t,e,ux,i);n&&a.push(n)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Tb(a).onDone(function(){return r._engine.processLeaveNode(t)}),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(t){var e=this,n=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(n&&i){var r=new Set;n.forEach(function(n){var o=n.name;if(!r.has(o)){r.add(o);var a=e._triggers[o].fallbackTransition,s=i[o]||cx,l=new lx(ux),u=new fx(e.id,o,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:o,transition:a,fromState:s,toState:l,player:u,isFallbackTransition:!0})}})}}},{key:"removeNode",value:function(t,e){var n=this,i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),!this.triggerLeaveAnimation(t,e,!0)){var r=!1;if(i.totalAnimations){var o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else for(var a=t;a=a.parentNode;)if(i.statesByElement.get(a)){r=!0;break}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{var s=t.__ng_removed;s&&s!==ax||(i.afterFlush(function(){return n.clearElementCache(t)}),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}}},{key:"insertNode",value:function(t,e){_x(t,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(t){var e=this,n=[];return this._queue.forEach(function(i){var r=i.player;if(!r.destroyed){var o=i.element,a=e._elementListeners.get(o);a&&a.forEach(function(e){if(e.name==i.triggerName){var n=Pb(o,i.triggerName,i.fromState.value,i.toState.value);n._data=t,Eb(i.player,e.phase,n,e.callback)}}),r.markedForDestroy?e._engine.afterFlush(function(){r.destroy()}):n.push(i)}}),this._queue=[],n.sort(function(t,n){var i=t.transition.ast.depCount,r=n.transition.ast.depCount;return 0==i||0==r?i-r:e._engine.driver.containsElement(t.element,n.element)?1:-1})}},{key:"destroy",value:function(t){this.players.forEach(function(t){return t.destroy()}),this._signalRemovalForInnerTriggers(this.hostElement,t)}},{key:"elementContainsData",value:function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),!!this._queue.find(function(e){return e.element===t})||e}}]),t}(),dx=function(){function t(e,n,i){o(this,t),this.bodyNode=e,this.driver=n,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=function(t,e){}}return s(t,[{key:"_onRemovalComplete",value:function(t,e){this.onRemovalComplete(t,e)}},{key:"createNamespace",value:function(t,e){var n=new hx(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}},{key:"_balanceNamespaceList",value:function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}},{key:"register",value:function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}},{key:"registerTrigger",value:function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}},{key:"destroy",value:function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush(function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(function(){return i.destroy(e)})}}},{key:"_fetchNamespace",value:function(t){return this._namespaceLookup[t]}},{key:"fetchNamespacesByElement",value:function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),r=0;r=0&&this.collectedLeaveElements.splice(o,1)}if(t){var a=this._fetchNamespace(t);a&&a.insertNode(e,n)}i&&this.collectEnterElement(e)}}},{key:"collectEnterElement",value:function(t){this.collectedEnterElements.push(t)}},{key:"markElementAsDisabled",value:function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),_x(t,nx)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),bx(t,nx))}},{key:"removeNode",value:function(t,e,n,i){if(gx(e)){var r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){var o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,i)}}else this._onRemovalComplete(e,i)}},{key:"markElementAsRemoved",value:function(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(t,e,n,i,r){return gx(e)?this._fetchNamespace(t).listen(e,n,i,r):function(){}}},{key:"_buildInstruction",value:function(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}},{key:"destroyInnerAnimations",value:function(t){var e=this,n=this.driver.query(t,Qb,!0);n.forEach(function(t){return e.destroyActiveAnimationsForElement(t)}),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,tw,!0)).forEach(function(t){return e.finishActiveQueriedAnimationOnElement(t)})}},{key:"destroyActiveAnimationsForElement",value:function(t){var e=this.playersByElement.get(t);e&&e.forEach(function(t){t.queued?t.markedForDestroy=!0:t.destroy()})}},{key:"finishActiveQueriedAnimationOnElement",value:function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach(function(t){return t.finish()})}},{key:"whenRenderingDone",value:function(){var t=this;return new Promise(function(e){if(t.players.length)return Tb(t.players).onDone(function(){return e()});e()})}},{key:"processLeaveNode",value:function(t){var e=this,n=t.__ng_removed;if(n&&n.setForRemoval){if(t.__ng_removed=ax,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,ix)&&this.markElementAsDisabled(t,!1),this.driver.query(t,ix,!0).forEach(function(t){e.markElementAsDisabled(t,!1)})}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach(function(e,n){return t._balanceNamespaceList(e,n)}),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i=0;M--)this._namespaceList[M].drainQueuedTransitions(e).forEach(function(t){var e=t.player,o=t.element;if(C.push(e),n.collectedEnterElements.length){var c=o.__ng_removed;if(c&&c.setForMove)return void e.destroy()}var d=!h||!n.driver.containsElement(h,o),f=k.get(o),g=p.get(o),m=n._buildInstruction(t,i,g,f,d);if(m.errors&&m.errors.length)A.push(m);else{if(d)return e.onStart(function(){return uw(o,m.fromStyles)}),e.onDestroy(function(){return lw(o,m.toStyles)}),void r.push(e);if(t.isFallbackTransition)return e.onStart(function(){return uw(o,m.fromStyles)}),e.onDestroy(function(){return lw(o,m.toStyles)}),void r.push(e);m.timelines.forEach(function(t){return t.stretchStartingKeyframe=!0}),i.append(o,m.timelines),a.push({instruction:m,player:e,element:o}),m.queriedElements.forEach(function(t){return Rb(s,t,[]).push(e)}),m.preStyleProps.forEach(function(t,e){var n=Object.keys(t);if(n.length){var i=l.get(e);i||l.set(e,i=new Set),n.forEach(function(t){return i.add(t)})}}),m.postStyleProps.forEach(function(t,e){var n=Object.keys(t),i=u.get(e);i||u.set(e,i=new Set),n.forEach(function(t){return i.add(t)})})}});if(A.length){var I=[];A.forEach(function(t){I.push("@".concat(t.triggerName," has failed due to:\n")),t.errors.forEach(function(t){return I.push("- ".concat(t,"\n"))})}),C.forEach(function(t){return t.destroy()}),this.reportError(I)}var T=new Map,D=new Map;a.forEach(function(t){var e=t.element;i.has(e)&&(D.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,T))}),r.forEach(function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(function(t){Rb(T,e,[]).push(t),t.destroy()})});var E=m.filter(function(t){return Sx(t,l,u)}),O=new Map;vx(O,this.driver,y,u,pb).forEach(function(t){Sx(t,l,u)&&E.push(t)});var P=new Map;f.forEach(function(t,e){vx(P,n.driver,new Set(t),l,Mb)}),E.forEach(function(t){var e=O.get(t),n=P.get(t);O.set(t,Object.assign(Object.assign({},e),n))});var R=[],L=[],N={};a.forEach(function(t){var e=t.element,a=t.player,s=t.instruction;if(i.has(e)){if(c.has(e))return a.onDestroy(function(){return lw(e,s.toStyles)}),a.disabled=!0,a.overrideTotalTime(s.totalTime),void r.push(a);var l=N;if(D.size>1){for(var u=e,h=[];u=u.parentNode;){var d=D.get(u);if(d){l=d;break}h.push(u)}h.forEach(function(t){return D.set(t,l)})}var f=n._buildAnimation(a.namespaceId,s,T,o,P,O);if(a.setRealPlayer(f),l===N)R.push(a);else{var p=n.playersByElement.get(l);p&&p.length&&(a.parentPlayer=Tb(p)),r.push(a)}}else uw(e,s.fromStyles),a.onDestroy(function(){return lw(e,s.toStyles)}),L.push(a),c.has(e)&&r.push(a)}),L.forEach(function(t){var e=o.get(t.element);if(e&&e.length){var n=Tb(e);t.setRealPlayer(n)}}),r.forEach(function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(var F=0;F0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new Cb(t.duration,t.delay)}},{key:"queuedPlayers",get:function(){var t=[];return this._namespaceList.forEach(function(e){e.players.forEach(function(e){e.queued&&t.push(e)})}),t}}]),t}(),fx=function(){function t(e,n,i){o(this,t),this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new Cb,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return s(t,[{key:"setRealPlayer",value:function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(function(n){e._queuedCallbacks[n].forEach(function(e){return Eb(t,n,void 0,e)})}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(t){this.totalTime=t}},{key:"syncPlayerEvents",value:function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart(function(){return n.triggerCallback("start")}),t.onDone(function(){return e.finish()}),t.onDestroy(function(){return e.destroy()})}},{key:"_queueEvent",value:function(t,e){Rb(this._queuedCallbacks,t,[]).push(e)}},{key:"onDone",value:function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}},{key:"onStart",value:function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}},{key:"onDestroy",value:function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(t){this.queued||this._player.setPosition(t)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)}}]),t}();function px(t){return null!=t?t:null}function gx(t){return t&&1===t.nodeType}function mx(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function vx(t,e,n,i,r){var o=[];n.forEach(function(t){return o.push(mx(t))});var a=[];i.forEach(function(n,i){var o={};n.forEach(function(t){var n=o[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=sx,a.push(i))}),t.set(i,o)});var s=0;return n.forEach(function(t){return mx(t,o[s++])}),a}function yx(t,e){var n=new Map;if(t.forEach(function(t){return n.set(t,[])}),0==e.length)return n;var i=new Set(e),r=new Map;function o(t){if(!t)return 1;var e=r.get(t);if(e)return e;var a=t.parentNode;return e=n.has(a)?a:i.has(a)?1:o(a),r.set(t,e),e}return e.forEach(function(t){var e=o(t);1!==e&&n.get(e).push(t)}),n}function _x(t,e){if(t.classList)t.classList.add(e);else{var n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function bx(t,e){if(t.classList)t.classList.remove(e);else{var n=t.$$classes;n&&delete n[e]}}function wx(t,e,n){Tb(n).onDone(function(){return t.processLeaveNode(e)})}function xx(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(t)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),t}();function Ax(t,e){var n=null,i=null;return Array.isArray(e)&&e.length?(n=Ix(e[0]),e.length>1&&(i=Ix(e[e.length-1]))):e&&(n=Ix(e)),n||i?new Mx(t,n,i):null}var Mx=function(){var t=function(){function t(e,n,i){o(this,t),this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;var r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}return s(t,[{key:"start",value:function(){this._state<1&&(this._startStyles&&lw(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(lw(this._element,this._initialStyles),this._endStyles&&(lw(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(uw(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(uw(this._element,this._endStyles),this._endStyles=null),lw(this._element,this._initialStyles),this._state=3)}}]),t}();return t.initialStylesByElement=new WeakMap,t}();function Ix(t){for(var e=null,n=Object.keys(t),i=0;i=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),Nx(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),e=this._name,(i=Lx(n=Vx(t=this._element,"").split(","),e))>=0&&(n.splice(i,1),Fx(t,"",n.join(","))))}}]),t}();function Px(t,e,n){Fx(t,"PlayState",n,Rx(t,e))}function Rx(t,e){var n=Vx(t,"");return n.indexOf(",")>0?Lx(n.split(","),e):Lx([n],e)}function Lx(t,e){for(var n=0;n=0)return n;return-1}function Nx(t,e,n){n?t.removeEventListener(Ex,e):t.addEventListener(Ex,e)}function Fx(t,e,n,i){var r=Dx+e;if(null!=i){var o=t.style[r];if(o.length){var a=o.split(",");a[i]=n,n=a.join(",")}}t.style[r]=n}function Vx(t,e){return t.style[Dx+e]||""}var zx=function(){function t(e,n,i,r,a,s,l,u){o(this,t),this.element=e,this.keyframes=n,this.animationName=i,this._duration=r,this._delay=a,this._finalStyles=l,this._specialStyles=u,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=r+a,this._buildStyler()}return s(t,[{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"destroy",value:function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(t){this._styler.setPosition(t)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var t=this;this._styler=new Ox(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",function(){return t.finish()})}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}},{key:"beforeDestroy",value:function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach(function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:bw(t.element,i))})}this.currentSnapshot=e}}]),t}(),Bx=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).element=t,r._startingStyles={},r.__initialized=!1,r._styles=Yb(i),r}return s(n,[{key:"init",value:function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(function(e){t._startingStyles[e]=t.element.style[e]}),r(i(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(function(e){return t.element.style.setProperty(e,t._styles[e])}),r(i(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach(function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)}),this._startingStyles=null,r(i(n.prototype),"destroy",this).call(this))}}]),n}(Cb),Hx="gen_css_kf_",jx=function(){function t(){o(this,t),this._count=0,this._head=document.querySelector("head")}return s(t,[{key:"validateStyleProperty",value:function(t){return jb(t)}},{key:"matchesElement",value:function(t,e){return Gb(t,e)}},{key:"containsElement",value:function(t,e){return Ub(t,e)}},{key:"query",value:function(t,e,n){return Wb(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"buildKeyframeElement",value:function(t,e,n){n=n.map(function(t){return Yb(t)});var i="@keyframes ".concat(e," {\n"),r="";n.forEach(function(t){r=" ";var e=parseFloat(t.offset);i+="".concat(r).concat(100*e,"% {\n"),r+=" ",Object.keys(t).forEach(function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+="".concat(r,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(r).concat(e,": ").concat(n,";\n"))}}),i+="".concat(r,"}\n")}),i+="}\n";var o=document.createElement("style");return o.textContent=i,o}},{key:"animate",value:function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=o.filter(function(t){return t instanceof zx}),s={};vw(n,i)&&a.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return s[t]=e[t]})});var l=Gx(e=yw(t,e,s));if(0==n)return new Bx(t,l);var u="".concat(Hx).concat(this._count++),c=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(c);var h=Ax(t,e),d=new zx(t,e,u,n,i,r,l,h);return d.onDestroy(function(){return Ux(c)}),d}}]),t}();function Gx(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach(function(t){Object.keys(t).forEach(function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}function Ux(t){t.parentNode.removeChild(t)}var Wx=function(){function t(e,n,i,r){o(this,t),this.element=e,this.keyframes=n,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return s(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach(function(t){return t()}),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",function(){return t._onFinish()})}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(t,e,n){return t.animate(e,n)}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(function(t){return t()}),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(function(t){return t()}),this._onDestroyFns=[])}},{key:"setPosition",value:function(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:bw(t.element,n))}),this.currentSnapshot=e}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(function(t){return t()}),e.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),t}(),Yx=function(){function t(){o(this,t),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(qx().toString()),this._cssKeyframesDriver=new jx}return s(t,[{key:"validateStyleProperty",value:function(t){return jb(t)}},{key:"matchesElement",value:function(t,e){return Gb(t,e)}},{key:"containsElement",value:function(t,e){return Ub(t,e)}},{key:"query",value:function(t,e,n){return Wb(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"overrideWebAnimationsSupport",value:function(t){this._isNativeImpl=t}},{key:"animate",value:function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=arguments.length>6?arguments[6]:void 0,s=!a&&!this._isNativeImpl;if(s)return this._cssKeyframesDriver.animate(t,e,n,i,r,o);var l=0==i?"both":"forwards",u={duration:n,delay:i,fill:l};r&&(u.easing=r);var c={},h=o.filter(function(t){return t instanceof Wx});vw(n,i)&&h.forEach(function(t){var e=t.currentSnapshot;Object.keys(e).forEach(function(t){return c[t]=e[t]})});var d=Ax(t,e=yw(t,e=e.map(function(t){return ow(t,!1)}),c));return new Wx(t,e,u,d)}}]),t}();function qx(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var Xx=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._nextAnimationId=0,r._renderer=t.createRenderer(i.body,{id:"0",encapsulation:Xt.None,styles:[],data:{animation:[]}}),r}return s(n,[{key:"build",value:function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?vb(t):t;return $x(this._renderer,null,e,"register",[n]),new Zx(e,this._renderer)}}]),n}(db);return t.\u0275fac=function(e){return new(e||t)(zi(El),zi(uh))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Zx=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._id=t,r._renderer=i,r}return s(n,[{key:"create",value:function(t,e){return new Kx(this._id,t,e||{},this._renderer)}}]),n}(fb),Kx=function(){function t(e,n,i,r){o(this,t),this.id=e,this.element=n,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return s(t,[{key:"_listen",value:function(t,e){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(t),e)}},{key:"_command",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=0&&t3&&void 0!==arguments[3])||arguments[3];this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,i)}},{key:"removeChild",value:function(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}},{key:"selectRootElement",value:function(t,e){return this.delegate.selectRootElement(t,e)}},{key:"parentNode",value:function(t){return this.delegate.parentNode(t)}},{key:"nextSibling",value:function(t){return this.delegate.nextSibling(t)}},{key:"setAttribute",value:function(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}},{key:"removeAttribute",value:function(t,e,n){this.delegate.removeAttribute(t,e,n)}},{key:"addClass",value:function(t,e){this.delegate.addClass(t,e)}},{key:"removeClass",value:function(t,e){this.delegate.removeClass(t,e)}},{key:"setStyle",value:function(t,e,n,i){this.delegate.setStyle(t,e,n,i)}},{key:"removeStyle",value:function(t,e,n){this.delegate.removeStyle(t,e,n)}},{key:"setProperty",value:function(t,e,n){e.charAt(0)==Qx&&e==Jx?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}},{key:"setValue",value:function(t,e){this.delegate.setValue(t,e)}},{key:"listen",value:function(t,e,n){return this.delegate.listen(t,e,n)}},{key:"disableAnimations",value:function(t,e){this.engine.disableAnimations(t,e)}},{key:"data",get:function(){return this.delegate.data}}]),t}(),nk=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,i,r,a)).factory=t,s.namespaceId=i,s}return s(n,[{key:"setProperty",value:function(t,e,n){e.charAt(0)==Qx?"."==e.charAt(1)&&e==Jx?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}},{key:"listen",value:function(t,e,n){var i,r,o=this;if(e.charAt(0)==Qx){var a=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t),s=e.substr(1),l="";if(s.charAt(0)!=Qx){var u=y((r=(i=s).indexOf("."),[i.substring(0,r),i.substr(r+1)]),2);s=u[0],l=u[1]}return this.engine.listen(this.namespaceId,a,s,l,function(t){o.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}]),n}(ek),ik=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){return o(this,n),e.call(this,t.body,i,r)}return n}(Cx);return t.\u0275fac=function(e){return new(e||t)(zi(uh),zi(Xb),zi(Uw))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),rk=new wi("AnimationModuleType"),ok=[{provide:db,useClass:Xx},{provide:Uw,useFactory:function(){return new Ww}},{provide:Cx,useClass:ik},{provide:El,useFactory:function(t,e,n){return new tk(t,e,n)},deps:[yd,Cx,Mc]}],ak=[{provide:Xb,useFactory:function(){return"function"==typeof qx()?new Yx:new jx}},{provide:rk,useValue:"BrowserAnimations"}].concat(ok),sk=([{provide:Xb,useClass:qb},{provide:rk,useValue:"NoopAnimations"}].concat(ok),function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:ak,imports:[Od]}),t}());function lk(t,e){if(1&t&&ms(0,"mat-pseudo-checkbox",4),2&t){var n=Ds();ds("state",n.selected?"checked":"unchecked")("disabled",n.disabled)}}function uk(t,e){if(1&t&&(ps(0,"span",5),tl(1),gs()),2&t){var n=Ds();Oo(1),nl("(",n.group.label,")")}}var ck=["*"],hk=function(){var t=function t(){o(this,t)};return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t}(),dk=function(){var t=function t(){o(this,t)};return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t}(),fk=new Ll("11.2.12"),pk=new wi("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),gk=function(){var t=function(){function t(e,n,i){o(this,t),this._hasDoneGlobalChecks=!1,this._document=i,e._applyBodyHighContrastModeCssClasses(),this._sanityChecks=n,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return s(t,[{key:"_getWindow",value:function(){var t=this._document.defaultView||window;return"object"==typeof t&&t?t:null}},{key:"_checksAreEnabled",value:function(){return Bc()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var t=this._getWindow();return t&&(t.__karma__||t.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype)&&!this._document.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){if(this._checksAreEnabled()&&!1!==this._sanityChecks&&this._sanityChecks.theme&&this._document.body&&"function"==typeof getComputedStyle){var t=this._document.createElement("div");t.classList.add("mat-theme-loaded-marker"),this._document.body.appendChild(t);var e=getComputedStyle(t);e&&"none"!==e.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),this._document.body.removeChild(t)}}},{key:"_checkCdkVersionMatch",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&fk.full!==hb.full&&console.warn("The Angular Material version ("+fk.full+") does not match the Angular CDK version ("+hb.full+").\nPlease ensure the versions of these two packages exactly match.")}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ub),zi(pk,8),zi(uh))},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[cy],cy]}),t}();function mk(t){return function(t){u(n,t);var e=p(n);function n(){var t;o(this,n);for(var i=arguments.length,r=new Array(i),a=0;a1&&void 0!==arguments[1]?arguments[1]:0,n=function(t){u(i,t);var n=p(i);function i(){var t;o(this,i);for(var r=arguments.length,a=new Array(r),s=0;s0?n:t}}]),t}(),Ck=new wi("mat-date-formats");try{xk="undefined"!=typeof Intl}catch(fH){xk=!1}var Ak={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},Mk=Dk(31,function(t){return String(t+1)}),Ik={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},Tk=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function Dk(t,e){for(var n=Array(t),i=0;i9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())}},{key:"addCalendarYears",value:function(t,e){return this.addCalendarMonths(t,12*e)}},{key:"addCalendarMonths",value:function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n}},{key:"addCalendarDays",value:function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}},{key:"toIso8601",value:function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}},{key:"deserialize",value:function(t){if("string"==typeof t){if(!t)return null;if(Tk.test(t)){var e=new Date(t);if(this.isValid(e))return e}}return r(i(n.prototype),"deserialize",this).call(this,t)}},{key:"isDateInstance",value:function(t){return t instanceof Date}},{key:"isValid",value:function(t){return!isNaN(t.getTime())}},{key:"invalid",value:function(){return new Date(NaN)}},{key:"_createDateWithOverflow",value:function(t,e,n){var i=new Date;return i.setFullYear(t,e,n),i.setHours(0,0,0,0),i}},{key:"_2digit",value:function(t){return("00"+t).slice(-2)}},{key:"_stripDirectionalityCharacters",value:function(t){return t.replace(/[\u200e\u200f]/g,"")}},{key:"_format",value:function(t,e){var n=new Date;return n.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(n)}}]),n}(Sk);return t.\u0275fac=function(e){return new(e||t)(zi(kk,8),zi(ey))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),Ok=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[{provide:Sk,useClass:Ek}],imports:[[ny]]}),t}(),Pk={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},Rk=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[{provide:Ck,useValue:Pk}],imports:[[Ok]]}),t}(),Lk=function(){var t=function(){function t(){o(this,t)}return s(t,[{key:"isErrorState",value:function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),Nk=function(){function t(e,n,i){o(this,t),this._renderer=e,this.element=n,this.config=i,this.state=3}return s(t,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),t}(),Fk={enterDuration:450,exitDuration:400},Vk=oy({passive:!0}),zk=["mousedown","touchstart"],Bk=["mouseup","mouseleave","touchend","touchcancel"],Hk=function(){function t(e,n,i,r){o(this,t),this._target=e,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=yv(i))}return s(t,[{key:"fadeInRipple",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Object.assign(Object.assign({},Fk),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);var a=i.radius||Gk(t,e,r),s=t-r.left,l=e-r.top,u=o.enterDuration,c=document.createElement("div");c.classList.add("mat-ripple-element"),c.style.left="".concat(s-a,"px"),c.style.top="".concat(l-a,"px"),c.style.height="".concat(2*a,"px"),c.style.width="".concat(2*a,"px"),null!=i.color&&(c.style.backgroundColor=i.color),c.style.transitionDuration="".concat(u,"ms"),this._containerElement.appendChild(c),jk(c),c.style.transform="scale(1)";var h=new Nk(this,c,i);return h.state=0,this._activeRipples.add(h),i.persistent||(this._mostRecentTransientRipple=h),this._runTimeoutOutsideZone(function(){var t=h===n._mostRecentTransientRipple;h.state=1,i.persistent||t&&n._isPointerDown||h.fadeOut()},u),h}},{key:"fadeOutRipple",value:function(t){var e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),e){var n=t.element,i=Object.assign(Object.assign({},Fk),t.config.animation);n.style.transitionDuration="".concat(i.exitDuration,"ms"),n.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(function(){t.state=3,n.parentNode.removeChild(n)},i.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach(function(t){return t.fadeOut()})}},{key:"fadeOutAllNonPersistent",value:function(){this._activeRipples.forEach(function(t){t.config.persistent||t.fadeOut()})}},{key:"setupTriggerEvents",value:function(t){var e=yv(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(zk))}},{key:"handleEvent",value:function(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(Bk),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(t){var e=J_(t),n=this._lastTouchStartEvent&&Date.now()1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular(function(){return setTimeout(t,e)})}},{key:"_registerEvents",value:function(t){var e=this;this._ngZone.runOutsideAngular(function(){t.forEach(function(t){e._triggerElement.addEventListener(t,e,Vk)})})}},{key:"_removeTriggerEvents",value:function(){var t=this;this._triggerElement&&(zk.forEach(function(e){t._triggerElement.removeEventListener(e,t,Vk)}),this._pointerUpEventsRegistered&&Bk.forEach(function(e){t._triggerElement.removeEventListener(e,t,Vk)}))}}]),t}();function jk(t){window.getComputedStyle(t).getPropertyValue("opacity")}function Gk(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),r=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+r*r)}var Uk=new wi("mat-ripple-global-options"),Wk=function(){var t=function(){function t(e,n,i,r,a){o(this,t),this._elementRef=e,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=r||{},this._rippleRenderer=new Hk(this,n,e,i)}return s(t,[{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"fadeOutAllNonPersistent",value:function(){this._rippleRenderer.fadeOutAllNonPersistent()}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}},{key:"disabled",get:function(){return this._disabled},set:function(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(ey),hs(Uk,8),hs(rk,8))},t.\u0275dir=ve({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&Gs("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),t}(),Yk=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk,ny],gk]}),t}(),qk=function(){var t=function t(e){o(this,t),this._animationMode=e,this.state="unchecked",this.disabled=!1};return t.\u0275fac=function(e){return new(e||t)(hs(rk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&Gs("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),t}(),Xk=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk]]}),t}(),Zk=new wi("MAT_OPTION_PARENT_COMPONENT"),Kk=mk(function t(){o(this,t)}),$k=0,Qk=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i,r;return o(this,n),(i=e.call(this))._labelId="mat-optgroup-label-".concat($k++),i._inert=null!==(r=null==t?void 0:t.inertGroups)&&void 0!==r&&r,i}return n}(Kk);return t.\u0275fac=function(e){return new(e||t)(hs(Zk,8))},t.\u0275dir=ve({type:t,inputs:{label:"label"},features:[Xa]}),t}(),Jk=new wi("MatOptgroup"),tS=0,eS=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o(this,t),this.source=e,this.isUserInput=n},nS=function(){var t=function(){function t(e,n,i,r){o(this,t),this._element=e,this._changeDetectorRef=n,this._parent=i,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-".concat(tS++),this.onSelectionChange=new Bu,this._stateChanges=new U}return s(t,[{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(t){t.keyCode!==Ey&&t.keyCode!==Py||By(t)||(this._selectViaInteraction(),t.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new eS(this,t))}},{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=fv(t)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(void 0),hs(Qk))},t.\u0275dir=ve({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t}(),iS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){return o(this,n),e.call(this,t,i,r,a)}return n}(nS);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(Zk,8),hs(Jk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&Ss("click",function(){return e._selectViaInteraction()})("keydown",function(t){return e._handleKeydown(t)}),2&t&&(rl("id",e.id),ss("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),Gs("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[Xa],ngContentSelectors:ck,decls:5,vars:4,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"],[1,"cdk-visually-hidden"]],template:function(t,e){1&t&&(Os(),us(0,lk,1,2,"mat-pseudo-checkbox",0),ps(1,"span",1),Ps(2),gs(),us(3,uk,2,1,"span",2),ms(4,"div",3)),2&t&&(ds("ngIf",e.multiple),Oo(3),ds("ngIf",e.group&&e.group._inert),Oo(1),ds("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[Lh,Wk,qk],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.cdk-high-contrast-active .mat-option[aria-disabled=true]{opacity:.5}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t}();function rS(t,e,n){if(n.length){for(var i=e.toArray(),r=n.toArray(),o=0,a=0;an+i?Math.max(0,t-i+e):n}var aS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Yk,Kh,gk,Xk]]}),t}();function sS(t,e){}var lS=function t(){o(this,t),this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0},uS={dialogContainer:gb("dialogContainer",[_b("void, exit",yb({opacity:0,transform:"scale(0.7)"})),_b("enter",yb({transform:"none"})),wb("* => enter",mb("150ms cubic-bezier(0, 0, 0.2, 1)",yb({transform:"none",opacity:1}))),wb("* => void, * => exit",mb("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",yb({opacity:0})))])},cS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this))._elementRef=t,u._focusTrapFactory=i,u._changeDetectorRef=r,u._config=s,u._focusMonitor=l,u._animationStateChanged=new Bu,u._elementFocusedBeforeDialogWasOpened=null,u._closeInteractionType=null,u.attachDomPortal=function(t){return u._portalOutlet.hasAttached(),u._portalOutlet.attachDomPortal(t)},u._ariaLabelledBy=s.ariaLabelledBy||null,u._document=a,u}return s(n,[{key:"_initializeWithAttachedContent",value:function(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}},{key:"attachComponentPortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}},{key:"_trapFocus",value:function(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}},{key:"_restoreFocus",value:function(){var t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){var e=this._getActiveElement(),n=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==n&&!n.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}},{key:"_capturePreviouslyFocusedElement",value:function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._getActiveElement())}},{key:"_focusDialogContainer",value:function(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}},{key:"_containsFocus",value:function(){var t=this._elementRef.nativeElement,e=this._getActiveElement();return t===e||t.contains(e)}},{key:"_getActiveElement",value:function(){var t,e=this._document.activeElement;return(null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.activeElement)||e}}]),n}(Sy);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(q_),hs(eu),hs(uh,8),hs(lS),hs(ib))},t.\u0275dir=ve({type:t,viewQuery:function(t,e){var n;1&t&&Ju(My,3),2&t&&Qu(n=ec())&&(e._portalOutlet=n.first)},features:[Xa]}),t}(),hS=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._state="enter",t}return s(n,[{key:"_onAnimationDone",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})):"exit"===e&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:n}))}},{key:"_onAnimationStart",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:n}):"exit"!==e&&"void"!==e||this._animationStateChanged.next({state:"closing",totalTime:n})}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(cS);return t.\u0275fac=function(e){return dS(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&Cs("@dialogContainer.start",function(t){return e._onAnimationStart(t)})("@dialogContainer.done",function(t){return e._onAnimationDone(t)}),2&t&&(rl("id",e._id),ss("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),ol("@dialogContainer",e._state))},features:[Xa],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&us(0,sS,0,0,"ng-template",0)},directives:[My],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;box-sizing:content-box;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[uS.dialogContainer]}}),t}(),dS=mi(hS),fS=0,pS=function(){function t(e,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-".concat(fS++);o(this,t),this._overlayRef=e,this._containerInstance=n,this.id=r,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new U,this._afterClosed=new U,this._beforeClosed=new U,this._state=0,n._id=r,n._animationStateChanged.pipe(Ld(function(t){return"opened"===t.state}),Nf(1)).subscribe(function(){i._afterOpened.next(),i._afterOpened.complete()}),n._animationStateChanged.pipe(Ld(function(t){return"closed"===t.state}),Nf(1)).subscribe(function(){clearTimeout(i._closeFallbackTimeout),i._finishDialogClose()}),e.detachments().subscribe(function(){i._beforeClosed.next(i._result),i._beforeClosed.complete(),i._afterClosed.next(i._result),i._afterClosed.complete(),i.componentInstance=null,i._overlayRef.dispose()}),e.keydownEvents().pipe(Ld(function(t){return t.keyCode===Oy&&!i.disableClose&&!By(t)})).subscribe(function(t){t.preventDefault(),gS(i,"keyboard")}),e.backdropClick().subscribe(function(){i.disableClose?i._containerInstance._recaptureFocus():gS(i,"mouse")})}return s(t,[{key:"close",value:function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(Ld(function(t){return"closing"===t.state}),Nf(1)).subscribe(function(n){e._beforeClosed.next(t),e._beforeClosed.complete(),e._overlayRef.detachBackdrop(),e._closeFallbackTimeout=setTimeout(function(){return e._finishDialogClose()},n.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}},{key:"afterOpened",value:function(){return this._afterOpened}},{key:"afterClosed",value:function(){return this._afterClosed}},{key:"beforeClosed",value:function(){return this._beforeClosed}},{key:"backdropClick",value:function(){return this._overlayRef.backdropClick()}},{key:"keydownEvents",value:function(){return this._overlayRef.keydownEvents()}},{key:"updatePosition",value:function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}},{key:"updateSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this._overlayRef.updateSize({width:t,height:e}),this._overlayRef.updatePosition(),this}},{key:"addPanelClass",value:function(t){return this._overlayRef.addPanelClass(t),this}},{key:"removePanelClass",value:function(t){return this._overlayRef.removePanelClass(t),this}},{key:"getState",value:function(){return this._state}},{key:"_finishDialogClose",value:function(){this._state=2,this._overlayRef.dispose()}},{key:"_getPositionStrategy",value:function(){return this._overlayRef.getConfig().positionStrategy}}]),t}();function gS(t,e,n){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(n)}var mS=new wi("MatDialogData"),vS=new wi("mat-dialog-default-options"),yS=new wi("mat-dialog-scroll-strategy"),_S={provide:yS,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.block()}}},bS=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c){var h=this;o(this,t),this._overlay=e,this._injector=n,this._defaultOptions=i,this._parentDialog=r,this._overlayContainer=a,this._dialogRefConstructor=l,this._dialogContainerType=u,this._dialogDataToken=c,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new U,this._afterOpenedAtThisLevel=new U,this._ariaHiddenElements=new Map,this.afterAllClosed=Ef(function(){return h.openDialogs.length?h._getAfterAllClosed():h._getAfterAllClosed().pipe(zf(void 0))}),this._scrollStrategy=s}return s(t,[{key:"_getAfterAllClosed",value:function(){var t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}},{key:"open",value:function(t,e){var n=this;(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new lS)).id&&this.getDialogById(e.id);var i=this._createOverlay(e),r=this._attachDialogContainer(i,e),o=this._attachDialogContent(t,r,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(o),o.afterClosed().subscribe(function(){return n._removeOpenDialog(o)}),this.afterOpened.next(o),r._initializeWithAttachedContent(),o}},{key:"closeAll",value:function(){this._closeDialogs(this.openDialogs)}},{key:"getDialogById",value:function(t){return this.openDialogs.find(function(e){return e.id===t})}},{key:"ngOnDestroy",value:function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}},{key:"_createOverlay",value:function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)}},{key:"_getOverlayConfig",value:function(t){var e=new Zy({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}},{key:"_attachDialogContainer",value:function(t,e){var n=Ya.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:lS,useValue:e}]}),i=new wy(this._dialogContainerType,e.viewContainerRef,n,e.componentFactoryResolver);return t.attach(i).instance}},{key:"_attachDialogContent",value:function(t,e,n,i){var r=new this._dialogRefConstructor(n,e,i.id);if(t instanceof lu)e.attachTemplatePortal(new xy(t,null,{$implicit:i.data,dialogRef:r}));else{var o=this._createInjector(i,r,e),a=e.attachComponentPortal(new wy(t,i.viewContainerRef,o));r.componentInstance=a.instance}return r.updateSize(i.width,i.height).updatePosition(i.position),r}},{key:"_createInjector",value:function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,r=[{provide:this._dialogContainerType,useValue:n},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||i&&i.get(uy,null)||r.push({provide:uy,useValue:{value:t.direction,change:Pd()}}),Ya.create({parent:i||this._injector,providers:r})}},{key:"_removeOpenDialog",value:function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach(function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}},{key:"_hideNonDialogContentFromAssistiveTechnology",value:function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var i=e[n];i===t||"SCRIPT"===i.nodeName||"STYLE"===i.nodeName||i.hasAttribute("aria-live")||(this._ariaHiddenElements.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}}},{key:"_closeDialogs",value:function(t){for(var e=t.length;e--;)t[e].close()}},{key:"openDialogs",get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}},{key:"afterOpened",get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(Ya),hs(void 0),hs(void 0),hs(n_),hs(void 0),hs(ki),hs(ki),hs(wi))},t.\u0275dir=ve({type:t}),t}(),wS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){return o(this,n),e.call(this,t,i,a,l,u,s,pS,hS,mS)}return n}(bS);return t.\u0275fac=function(e){return new(e||t)(zi(g_),zi(Ya),zi(Sh,8),zi(vS,8),zi(yS),zi(t,12),zi(n_))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),xS=0,kS=function(){var t=function(){function t(e,n,i){o(this,t),this.dialogRef=e,this._elementRef=n,this._dialog=i,this.type="button"}return s(t,[{key:"ngOnInit",value:function(){this.dialogRef||(this.dialogRef=MS(this._elementRef,this._dialog.openDialogs))}},{key:"ngOnChanges",value:function(t){var e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}},{key:"_onButtonClick",value:function(t){gS(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(pS,8),hs(Tl),hs(wS))},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&Ss("click",function(t){return e._onButtonClick(t)}),2&t&&ss("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Ee]}),t}(),SS=function(){var t=function(){function t(e,n,i){o(this,t),this._dialogRef=e,this._elementRef=n,this._dialog=i,this.id="mat-dialog-title-".concat(xS++)}return s(t,[{key:"ngOnInit",value:function(){var t=this;this._dialogRef||(this._dialogRef=MS(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(function(){var e=t._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=t.id)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(pS,8),hs(Tl),hs(wS))},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&rl("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t}(),CS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t}(),AS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t}();function MS(t,e){for(var n=t.nativeElement.parentElement;n&&!n.classList.contains("mat-dialog-container");)n=n.parentElement;return n?e.find(function(t){return t.id===n.id}):null}var IS=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[wS,_S],imports:[[w_,Iy,gk],gk]}),t}();function TS(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}var DS=["mat-button",""],ES=["*"],OS=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",PS=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],RS=vk(mk(yk(function t(e){o(this,t),this._elementRef=e}))),LS=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;o(this,n),(a=e.call(this,t))._focusMonitor=i,a._animationMode=r,a.isRoundButton=a._hasHostAttributes("mat-fab","mat-mini-fab"),a.isIconButton=a._hasHostAttributes("mat-icon-button");var s,l=v(PS);try{for(l.s();!(s=l.n()).done;){var u=s.value;a._hasHostAttributes(u)&&a._getHostElement().classList.add(u)}}catch(c){l.e(c)}finally{l.f()}return t.nativeElement.classList.add("mat-button-base"),a.isRoundButton&&(a.color="accent"),a}return s(n,[{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(t,e){t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i0&&(this.dialogRef.afterClosed().subscribe(function(e){t.closed()}),this.setExtra(this.data.autoclose),this.subscription=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv;return(!Bv(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=Nv),new z(function(n){return n.add(e.schedule(TS,t,{subscriber:n,counter:0,period:t})),n})}(1e3).subscribe(function(e){var n=t.data.autoclose-1e3*(e+1);t.setExtra(n),n<=0&&t.close()}))},t.prototype.initYesNo=function(){},t.prototype.ngOnInit=function(){!0===this.data.warnOnYes&&(this.yesColor="warn",this.noColor="primary"),this.data.type===GS.yesno?this.initYesNo():this.initAlert()},t.\u0275fac=function(e){return new(e||t)(hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-modal"]],decls:8,vars:9,consts:[["mat-dialog-title","",3,"innerHtml"],[3,"innerHTML"],["mat-raised-button","","mat-dialog-close","",3,"click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"color","click",4,"ngIf"],["mat-raised-button","","mat-dialog-close","",3,"click"],["mat-raised-button","","mat-dialog-close","",3,"color","click"]],template:function(t,e){1&t&&(ms(0,"h4",0),Ru(1,"safeHtml"),ms(2,"mat-dialog-content",1),Ru(3,"safeHtml"),ps(4,"mat-dialog-actions"),us(5,BS,4,1,"button",2),us(6,HS,3,1,"button",3),us(7,jS,3,1,"button",3),gs()),2&t&&(ds("innerHtml",Lu(1,5,e.data.title),Dr),Oo(2),ds("innerHTML",Lu(3,7,e.data.body),Dr),Oo(3),ds("ngIf",0==e.data.type),Oo(1),ds("ngIf",1==e.data.type),Oo(1),ds("ngIf",1==e.data.type))},directives:[SS,CS,AS,Lh,LS,kS,VS],pipes:[zS],styles:[".uds-modal-footer[_ngcontent-%COMP%]{display:flex;justify-content:left}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),WS=function(t){return t.TEXT="text",t.TEXTBOX="textbox",t.NUMERIC="numeric",t.PASSWORD="password",t.HIDDEN="hidden",t.CHOICE="choice",t.MULTI_CHOICE="multichoice",t.EDITLIST="editlist",t.CHECKBOX="checkbox",t.IMAGECHOICE="imgchoice",t.DATE="date",t.DATETIME="datetime",t.TAGLIST="taglist",t}({}),YS=function(){function t(){}return t.locateChoice=function(t,e){var n=e.gui.values.find(function(e){return e.id===t});if(void 0===n)try{n=e.gui.values[0]}catch(i){n={id:"",img:"",text:""}}return n},t}();function qS(t,e){return new z(function(n){var i=t.length;if(0!==i)for(var r=new Array(i),o=0,a=0,s=function(s){var l=it(t[s]),u=!1;n.add(l.subscribe({next:function(t){u||(u=!0,a++),r[s]=t},error:function(t){return n.error(t)},complete:function(){++o!==i&&u||(a===i&&n.next(e?e.reduce(function(t,e,n){return t[e]=r[n],t},{}):r),n.complete())}}))},l=0;le?{max:{max:e,actual:t.value}}:null};var e}},{key:"required",value:function(t){return oC(t)}},{key:"requiredTrue",value:function(t){return aC(t)}},{key:"email",value:function(t){return function(t){return JS(t.value)||iC.test(t.value)?null:{email:!0}}(t)}},{key:"minLength",value:function(t){return e=t,function(t){return JS(t.value)||!tC(t.value)?null:t.value.lengtht?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}}function lC(t){return null}function uC(t){return null!=t}function cC(t){var e=ws(t)?it(t):t;return ks(e),e}function hC(t){var e={};return t.forEach(function(t){e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function dC(t,e){return e.map(function(e){return e(t)})}function fC(t){return t.map(function(t){return function(t){return!t.validate}(t)?t:function(e){return t.validate(e)}})}function pC(t){if(!t)return null;var e=t.filter(uC);return 0==e.length?null:function(t){return hC(dC(t,e))}}function gC(t){return null!=t?pC(fC(t)):null}function mC(t){if(!t)return null;var e=t.filter(uC);return 0==e.length?null:function(t){return function(){for(var t=arguments.length,e=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:void 0;this.control&&this.control.reset(t)}},{key:"hasError",value:function(t,e){return!!this.control&&this.control.hasError(t,e)}},{key:"getError",value:function(t,e){return this.control?this.control.getError(t,e):null}},{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}},{key:"validator",get:function(){return this._composedValidatorFn||null}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn||null}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t}),t}(),xC=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(wC);return t.\u0275fac=function(e){return kC(e||t)},t.\u0275dir=ve({type:t,features:[Xa]}),t}(),kC=mi(xC),SC=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._parent=null,t.name=null,t.valueAccessor=null,t}return n}(wC),CC=function(){function t(e){o(this,t),this._cd=e}return s(t,[{key:"is",value:function(t){var e,n;return!!(null===(n=null===(e=this._cd)||void 0===e?void 0:e.control)||void 0===n?void 0:n[t])}}]),t}(),AC=function(){var t=function(t){u(n,t);var e=p(n);function n(t){return o(this,n),e.call(this,t)}return n}(CC);return t.\u0275fac=function(e){return new(e||t)(hs(SC,2))},t.\u0275dir=ve({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&Gs("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[Xa]}),t}(),MC=function(){var t=function(t){u(n,t);var e=p(n);function n(t){return o(this,n),e.call(this,t)}return n}(CC);return t.\u0275fac=function(e){return new(e||t)(hs(xC,10))},t.\u0275dir=ve({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&Gs("ng-untouched",e.is("untouched"))("ng-touched",e.is("touched"))("ng-pristine",e.is("pristine"))("ng-dirty",e.is("dirty"))("ng-valid",e.is("valid"))("ng-invalid",e.is("invalid"))("ng-pending",e.is("pending"))},features:[Xa]}),t}();function IC(t,e){EC(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&PC(t,e)})}(t,e),function(t,e){var n=function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)};t.registerOnChange(n),e._registerOnDestroy(function(){t._unregisterOnChange(n)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&PC(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function(t,e){if(e.valueAccessor.setDisabledState){var n=function(t){e.valueAccessor.setDisabledState(t)};t.registerOnDisabledChange(n),e._registerOnDestroy(function(){t._unregisterOnDisabledChange(n)})}}(t,e)}function TC(t,e){var n=function(){};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),OC(t,e,!0),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(function(){}))}function DC(t,e){t.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function EC(t,e,n){var i=_C(t);null!==e.validator?t.setValidators(yC(i,e.validator)):"function"==typeof i&&t.setValidators([i]);var r=bC(t);if(null!==e.asyncValidator?t.setAsyncValidators(yC(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]),n){var o=function(){return t.updateValueAndValidity()};DC(e._rawValidators,o),DC(e._rawAsyncValidators,o)}}function OC(t,e,n){var i=!1;if(null!==t){if(null!==e.validator){var r=_C(t);if(Array.isArray(r)&&r.length>0){var o=r.filter(function(t){return t!==e.validator});o.length!==r.length&&(i=!0,t.setValidators(o))}}if(null!==e.asyncValidator){var a=bC(t);if(Array.isArray(a)&&a.length>0){var s=a.filter(function(t){return t!==e.asyncValidator});s.length!==a.length&&(i=!0,t.setAsyncValidators(s))}}}if(n){var l=function(){};DC(e._rawValidators,l),DC(e._rawAsyncValidators,l)}return i}function PC(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function RC(t,e){EC(t,e,!1)}function LC(t,e){t._syncPendingControls(),e.forEach(function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function NC(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var FC="VALID",VC="INVALID",zC="PENDING",BC="DISABLED";function HC(t){return(WC(t)?t.validators:t)||null}function jC(t){return Array.isArray(t)?gC(t):t||null}function GC(t,e){return(WC(e)?e.asyncValidators:t)||null}function UC(t){return Array.isArray(t)?vC(t):t||null}function WC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var YC=function(){function t(e,n){o(this,t),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=n,this._composedValidatorFn=jC(this._rawValidators),this._composedAsyncValidatorFn=UC(this._rawAsyncValidators)}return s(t,[{key:"setValidators",value:function(t){this._rawValidators=t,this._composedValidatorFn=jC(t)}},{key:"setAsyncValidators",value:function(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=UC(t)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild(function(t){return t.markAllAsTouched()})}},{key:"markAsUntouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild(function(t){t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"markAsDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}},{key:"markAsPristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild(function(t){t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"markAsPending",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status=zC,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}},{key:"disable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=BC,this.errors=null,this._forEachChild(function(e){e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(function(t){return t(!0)})}},{key:"enable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status=FC,this._forEachChild(function(e){e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(function(t){return t(!1)})}},{key:"_updateAncestors",value:function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(t){this._parent=t}},{key:"updateValueAndValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==FC&&this.status!==zC||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}},{key:"_updateTreeValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild(function(e){return e._updateTreeValidity(t)}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?BC:FC}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(t){var e=this;if(this.asyncValidator){this.status=zC,this._hasOwnPendingAsyncValidator=!0;var n=cC(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(function(n){e._hasOwnPendingAsyncValidator=!1,e.setErrors(n,{emitEvent:t})})}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}},{key:"get",value:function(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;var i=t;return e.forEach(function(t){i=i instanceof XC?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof ZC&&i.at(t)||null}),i}(this,t)}},{key:"getError",value:function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}},{key:"hasError",value:function(t,e){return!!this.getError(t,e)}},{key:"_updateControlsErrors",value:function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}},{key:"_initObservables",value:function(){this.valueChanges=new Bu,this.statusChanges=new Bu}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?BC:this.errors?VC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(zC)?zC:this._anyControlsHaveStatus(VC)?VC:FC}},{key:"_anyControlsHaveStatus",value:function(t){return this._anyControls(function(e){return e.status===t})}},{key:"_anyControlsDirty",value:function(){return this._anyControls(function(t){return t.dirty})}},{key:"_anyControlsTouched",value:function(){return this._anyControls(function(t){return t.touched})}},{key:"_updatePristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"_updateTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"_isBoxedValue",value:function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}},{key:"_registerOnCollectionChange",value:function(t){this._onCollectionChange=t}},{key:"_setUpdateStrategy",value:function(t){WC(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}},{key:"_parentMarkedDirty",value:function(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(t){this._rawValidators=this._composedValidatorFn=t}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return this.status===FC}},{key:"invalid",get:function(){return this.status===VC}},{key:"pending",get:function(){return this.status==zC}},{key:"disabled",get:function(){return this.status===BC}},{key:"enabled",get:function(){return this.status!==BC}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"root",get:function(){for(var t=this;t._parent;)t=t._parent;return t}}]),t}(),qC=function(t){u(n,t);var e=p(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0;return o(this,n),(t=e.call(this,HC(r),GC(a,r)))._onChange=[],t._applyFormState(i),t._setUpdateStrategy(r),t._initObservables(),t.updateValueAndValidity({onlySelf:!0,emitEvent:!!a}),t}return s(n,[{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(function(t){return t(e.value,!1!==n.emitViewToModelChange)}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(t,e)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(t){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(t){this._onChange.push(t)}},{key:"_unregisterOnChange",value:function(t){NC(this._onChange,t)}},{key:"registerOnDisabledChange",value:function(t){this._onDisabledChange.push(t)}},{key:"_unregisterOnDisabledChange",value:function(t){NC(this._onDisabledChange,t)}},{key:"_forEachChild",value:function(t){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}]),n}(YC),XC=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,HC(i),GC(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),a}return s(n,[{key:"registerControl",value:function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}},{key:"addControl",value:function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),Object.keys(t).forEach(function(i){e._throwIfControlMissing(i),e.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null!=t&&(Object.keys(t).forEach(function(i){e.controls[i]&&e.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this._reduceChildren({},function(t,e,n){return t[n]=e instanceof qC?e.value:e.getRawValue(),t})}},{key:"_syncPendingControls",value:function(){var t=this._reduceChildren(!1,function(t,e){return!!e._syncPendingControls()||t});return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error("Cannot find form control with name: ".concat(t,"."))}},{key:"_forEachChild",value:function(t){var e=this;Object.keys(this.controls).forEach(function(n){var i=e.controls[n];i&&t(i,n)})}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild(function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)})}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(t){for(var e=0,n=Object.keys(this.controls);e0||this.disabled}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))})}}]),n}(YC),ZC=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,HC(i),GC(r,i))).controls=t,a._initObservables(),a._setUpdateStrategy(i),a._setUpControls(),a.updateValueAndValidity({onlySelf:!0,emitEvent:!!r}),a}return s(n,[{key:"at",value:function(t){return this.controls[t]}},{key:"push",value:function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}},{key:"removeAt",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),t.forEach(function(t,i){e._throwIfControlMissing(i),e.at(i).setValue(t,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};null!=t&&(t.forEach(function(t,i){e.at(i)&&e.at(i).patchValue(t,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild(function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this.controls.map(function(t){return t instanceof qC?t.value:t.getRawValue()})}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild(function(t){return t._registerOnCollectionChange(function(){})}),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var t=this.controls.reduce(function(t,e){return!!e._syncPendingControls()||t},!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index ".concat(t))}},{key:"_forEachChild",value:function(t){this.controls.forEach(function(e,n){t(e,n)})}},{key:"_updateValue",value:function(){var t=this;this.value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})}},{key:"_anyControls",value:function(t){return this.controls.some(function(e){return e.enabled&&t(e)})}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))})}},{key:"_allControlsDisabled",value:function(){var t,e=v(this.controls);try{for(e.s();!(t=e.n()).done;)if(t.value.enabled)return!1}catch(n){e.e(n)}finally{e.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(YC),KC={provide:xC,useExisting:Ct(function(){return QC})},$C=function(){return Promise.resolve(null)}(),QC=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new Bu,r.form=new XC({},gC(t),vC(i)),r}return s(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),IC(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)})}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),NC(e._directives,t)})}},{key:"addFormGroup",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path),i=new XC({});RC(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}},{key:"removeFormGroup",value:function(t){var e=this;$C.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){var n=this;$C.then(function(){n.form.get(t.path).setValue(e)})}},{key:"setValue",value:function(t){this.control.setValue(t)}},{key:"onSubmit",value:function(t){return this.submitted=!0,LC(this.form,this._directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(t){return t.pop(),t.length?this.form.get(t):this.form}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"controls",get:function(){return this.form.controls}}]),n}(xC);return t.\u0275fac=function(e){return new(e||t)(hs(eC,10),hs(nC,10))},t.\u0275dir=ve({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&Ss("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[wl([KC]),Xa]}),t}(),JC={provide:SC,useExisting:Ct(function(){return eA})},tA=function(){return Promise.resolve(null)}(),eA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this)).control=new qC,s._registered=!1,s.update=new Bu,s._parent=t,s._setValidators(i),s._setAsyncValidators(r),s.valueAccessor=function(t,e){if(!e)return null;Array.isArray(e);var n=void 0,i=void 0,r=void 0;return e.forEach(function(t){t.constructor===QS?n=t:Object.getPrototypeOf(t.constructor)===XS?i=t:r=t}),r||i||n||null}(d(s),a),s}return s(n,[{key:"ngOnChanges",value:function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),function(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_setUpControl",value:function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}},{key:"_isStandalone",value:function(){return!this._parent||!(!this.options||!this.options.standalone)}},{key:"_setUpStandalone",value:function(){IC(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(t){var e=this;tA.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})}},{key:"_updateDisabled",value:function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;tA.then(function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()})}},{key:"path",get:function(){return this._parent?(t=this.name,[].concat(b(this._parent.path),[t])):[this.name];var t}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}}]),n}(SC);return t.\u0275fac=function(e){return new(e||t)(hs(xC,9),hs(eC,10),hs(nC,10),hs(ZS,10))},t.\u0275dir=ve({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[wl([JC]),Xa,Ee]}),t}(),nA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t}(),iA={provide:ZS,useExisting:Ct(function(){return rA}),multi:!0},rA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._renderer=t,r._elementRef=i,r.onChange=function(t){},r.onTouched=function(){},r}return s(n,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),n}(XS);return t.\u0275fac=function(e){return new(e||t)(hs(Ol),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&Ss("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[wl([iA]),Xa]}),t}(),oA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),aA=new wi("NgModelWithFormControlWarning"),sA={provide:xC,useExisting:Ct(function(){return lA})},lA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this)).validators=t,r.asyncValidators=i,r.submitted=!1,r._onCollectionChange=function(){return r._updateDomValue()},r.directives=[],r.form=null,r.ngSubmit=new Bu,r._setValidators(t),r._setAsyncValidators(i),r}return s(n,[{key:"ngOnChanges",value:function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}},{key:"ngOnDestroy",value:function(){this.form&&(OC(this.form,this,!1),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(function(){}))}},{key:"addControl",value:function(t){var e=this.form.get(t.path);return IC(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){TC(t.control||null,t),NC(this.directives,t)}},{key:"addFormGroup",value:function(t){this._setUpFormContainer(t)}},{key:"removeFormGroup",value:function(t){this._cleanUpFormContainer(t)}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"addFormArray",value:function(t){this._setUpFormContainer(t)}},{key:"removeFormArray",value:function(t){this._cleanUpFormContainer(t)}},{key:"getFormArray",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){this.form.get(t.path).setValue(e)}},{key:"onSubmit",value:function(t){return this.submitted=!0,LC(this.form,this.directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.form.reset(t),this.submitted=!1}},{key:"_updateDomValue",value:function(){var t=this;this.directives.forEach(function(e){var n=e.control,i=t.form.get(e.path);n!==i&&(TC(n||null,e),i instanceof qC&&(IC(i,e),e.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_setUpFormContainer",value:function(t){var e=this.form.get(t.path);RC(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"_cleanUpFormContainer",value:function(t){if(this.form){var e=this.form.get(t.path);e&&function(t,e){return OC(t,e,!1)}(e,t)&&e.updateValueAndValidity({emitEvent:!1})}}},{key:"_updateRegistrations",value:function(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){})}},{key:"_updateValidators",value:function(){EC(this.form,this,!1),this._oldForm&&OC(this._oldForm,this,!1)}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(xC);return t.\u0275fac=function(e){return new(e||t)(hs(eC,10),hs(nC,10))},t.\u0275dir=ve({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&Ss("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[wl([sA]),Xa,Ee]}),t}(),uA={provide:eC,useExisting:Ct(function(){return hA}),multi:!0},cA={provide:eC,useExisting:Ct(function(){return dA}),multi:!0},hA=function(){var t=function(){function t(){o(this,t),this._required=!1}return s(t,[{key:"validate",value:function(t){return this.required?oC(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"required",get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&"false"!=="".concat(t),this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&ss("required",e.required?"":null)},inputs:{required:"required"},features:[wl([uA])]}),t}(),dA=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return s(n,[{key:"validate",value:function(t){return this.required?aC(t):null}}]),n}(hA);return t.\u0275fac=function(e){return fA(e||t)},t.\u0275dir=ve({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&ss("required",e.required?"":null)},features:[wl([cA]),Xa]}),t}(),fA=mi(dA),pA={provide:eC,useExisting:Ct(function(){return gA}),multi:!0},gA=function(){var t=function(){function t(){o(this,t),this._validator=lC}return s(t,[{key:"ngOnChanges",value:function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null!=this.maxlength?this._validator(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=sC("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&ss("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[wl([pA]),Ee]}),t}(),mA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[oA]]}),t}(),vA=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[mA]}),t}(),yA=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"withConfig",value:function(e){return{ngModule:t,providers:[{provide:aA,useValue:e.warnOnNgModelWithFormControl}]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[mA]}),t}();function _A(t,e){1&t&&Ps(0)}var bA=["*"];function wA(t,e){}var xA=function(t){return{animationDuration:t}},kA=function(t,e){return{value:t,params:e}},SA=["tabBodyWrapper"],CA=["tabHeader"];function AA(t,e){}function MA(t,e){1&t&&us(0,AA,0,0,"ng-template",9),2&t&&ds("cdkPortalOutlet",Ds().$implicit.templateLabel)}function IA(t,e){1&t&&tl(0),2&t&&el(Ds().$implicit.textLabel)}function TA(t,e){if(1&t){var n=bs();ps(0,"div",6),Ss("click",function(){rn(n);var t=e.$implicit,i=e.index,r=Ds(),o=cs(1);return r._handleClick(t,o,i)})("cdkFocusChange",function(t){rn(n);var i=e.index;return Ds()._tabFocusChanged(t,i)}),ps(1,"div",7),us(2,MA,1,1,"ng-template",8),us(3,IA,1,1,"ng-template",8),gs(),gs()}if(2&t){var i=e.$implicit,r=e.index,o=Ds();Gs("mat-tab-label-active",o.selectedIndex==r),ds("id",o._getTabLabelId(r))("disabled",i.disabled)("matRippleDisabled",i.disabled||o.disableRipple),ss("tabIndex",o._getTabIndex(i,r))("aria-posinset",r+1)("aria-setsize",o._tabs.length)("aria-controls",o._getTabContentId(r))("aria-selected",o.selectedIndex==r)("aria-label",i.ariaLabel||null)("aria-labelledby",!i.ariaLabel&&i.ariaLabelledby?i.ariaLabelledby:null),Oo(2),ds("ngIf",i.templateLabel),Oo(1),ds("ngIf",!i.templateLabel)}}function DA(t,e){if(1&t){var n=bs();ps(0,"mat-tab-body",10),Ss("_onCentered",function(){return rn(n),Ds()._removeTabBodyWrapperHeight()})("_onCentering",function(t){return rn(n),Ds()._setTabBodyWrapperHeight(t)}),gs()}if(2&t){var i=e.$implicit,r=e.index,o=Ds();Gs("mat-tab-body-active",o.selectedIndex==r),ds("id",o._getTabContentId(r))("content",i.content)("position",i.position)("origin",i.origin)("animationDuration",o.animationDuration),ss("aria-labelledby",o._getTabLabelId(r))}}var EA=["tabListContainer"],OA=["tabList"],PA=["nextPaginator"],RA=["previousPaginator"],LA=new wi("MatInkBarPositioner",{providedIn:"root",factory:function(){return function(t){return{left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"}}}}),NA=function(){var t=function(){function t(e,n,i,r){o(this,t),this._elementRef=e,this._ngZone=n,this._inkBarPositioner=i,this._animationMode=r}return s(t,[{key:"alignToElement",value:function(t){var e=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return e._setStyles(t)})}):this._setStyles(t)}},{key:"show",value:function(){this._elementRef.nativeElement.style.visibility="visible"}},{key:"hide",value:function(){this._elementRef.nativeElement.style.visibility="hidden"}},{key:"_setStyles",value:function(t){var e=this._inkBarPositioner(t),n=this._elementRef.nativeElement;n.style.left=e.left,n.style.width=e.width}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(LA),hs(rk,8))},t.\u0275dir=ve({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&Gs("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t}(),FA=new wi("MatTabContent"),VA=new wi("MatTabLabel"),zA=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(Ay);return t.\u0275fac=function(e){return BA(e||t)},t.\u0275dir=ve({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[wl([{provide:VA,useExisting:t}]),Xa]}),t}(),BA=mi(zA),HA=mk(function t(){o(this,t)}),jA=new wi("MAT_TAB_GROUP"),GA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this))._viewContainerRef=t,r._closestTabGroup=i,r.textLabel="",r._contentPortal=null,r._stateChanges=new U,r.position=null,r.origin=null,r.isActive=!1,r}return s(n,[{key:"ngOnChanges",value:function(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"ngOnInit",value:function(){this._contentPortal=new xy(this._explicitContent||this._implicitContent,this._viewContainerRef)}},{key:"_setTemplateLabelInput",value:function(t){t&&(this._templateLabel=t)}},{key:"templateLabel",get:function(){return this._templateLabel},set:function(t){this._setTemplateLabelInput(t)}},{key:"content",get:function(){return this._contentPortal}}]),n}(HA);return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(jA))},t.\u0275cmp=he({type:t,selectors:[["mat-tab"]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,VA,1),tc(n,FA,3,lu)),2&t&&(Qu(i=ec())&&(e.templateLabel=i.first),Qu(i=ec())&&(e._explicitContent=i.first))},viewQuery:function(t,e){var n;1&t&&Ju(lu,3),2&t&&Qu(n=ec())&&(e._implicitContent=n.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[Xa,Ee],ngContentSelectors:bA,decls:1,vars:0,template:function(t,e){1&t&&(Os(),us(0,_A,1,0,"ng-template"))},encapsulation:2}),t}(),UA={translateTab:gb("translateTab",[_b("center, void, left-origin-center, right-origin-center",yb({transform:"none"})),_b("left",yb({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),_b("right",yb({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),wb("* => left, * => right, left => center, right => center",mb("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),wb("void => left-origin-center",[yb({transform:"translate3d(-100%, 0, 0)"}),mb("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),wb("void => right-origin-center",[yb({transform:"translate3d(100%, 0, 0)"}),mb("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},WA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t,i,a))._host=r,s._centeringSub=M.EMPTY,s._leavingSub=M.EMPTY,s}return s(n,[{key:"ngOnInit",value:function(){var t=this;r(i(n.prototype),"ngOnInit",this).call(this),this._centeringSub=this._host._beforeCentering.pipe(zf(this._host._isCenterPosition(this._host._position))).subscribe(function(e){e&&!t.hasAttached()&&t.attach(t._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(function(){t.detach()})}},{key:"ngOnDestroy",value:function(){r(i(n.prototype),"ngOnDestroy",this).call(this),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}]),n}(My);return t.\u0275fac=function(e){return new(e||t)(hs(Cl),hs(pu),hs(Ct(function(){return qA})),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","matTabBodyHost",""]],features:[Xa]}),t}(),YA=function(){var t=function(){function t(e,n,i){var r=this;o(this,t),this._elementRef=e,this._dir=n,this._dirChangeSubscription=M.EMPTY,this._translateTabComplete=new U,this._onCentering=new Bu,this._beforeCentering=new Bu,this._afterLeavingCenter=new Bu,this._onCentered=new Bu(!0),this.animationDuration="500ms",n&&(this._dirChangeSubscription=n.change.subscribe(function(t){r._computePositionAnimationState(t),i.markForCheck()})),this._translateTabComplete.pipe(Pv(function(t,e){return t.fromState===e.fromState&&t.toState===e.toState})).subscribe(function(t){r._isCenterPosition(t.toState)&&r._isCenterPosition(r._position)&&r._onCentered.emit(),r._isCenterPosition(t.fromState)&&!r._isCenterPosition(r._position)&&r._afterLeavingCenter.emit()})}return s(t,[{key:"ngOnInit",value:function(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}},{key:"ngOnDestroy",value:function(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}},{key:"_onTranslateTabStarted",value:function(t){var e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_isCenterPosition",value:function(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}},{key:"_computePositionAnimationState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getLayoutDirection();this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}},{key:"_computePositionFromOrigin",value:function(t){var e=this._getLayoutDirection();return"ltr"==e&&t<=0||"rtl"==e&&t>0?"left-origin-center":"right-origin-center"}},{key:"position",set:function(t){this._positionIndex=t,this._computePositionAnimationState()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(uy,8),hs(eu))},t.\u0275dir=ve({type:t,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),t}(),qA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){return o(this,n),e.call(this,t,i,r)}return n}(YA);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(uy,8),hs(eu))},t.\u0275cmp=he({type:t,selectors:[["mat-tab-body"]],viewQuery:function(t,e){var n;1&t&&Ju(My,1),2&t&&Qu(n=ec())&&(e._portalHost=n.first)},hostAttrs:[1,"mat-tab-body"],features:[Xa],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(t,e){1&t&&(ps(0,"div",0,1),Ss("@translateTab.start",function(t){return e._onTranslateTabStarted(t)})("@translateTab.done",function(t){return e._translateTabComplete.next(t)}),us(2,wA,0,0,"ng-template",2),gs()),2&t&&ds("@translateTab",Du(3,kA,e._position,Tu(1,xA,e.animationDuration)))},directives:[WA],styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}\n"],encapsulation:2,data:{animation:[UA.translateTab]}}),t}(),XA=new wi("MAT_TABS_CONFIG"),ZA=0,KA=function t(){o(this,t)},$A=vk(yk(function t(e){o(this,t),this._elementRef=e}),"primary"),QA=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this,t))._changeDetectorRef=i,s._animationMode=a,s._tabs=new ju,s._indexToSelect=0,s._tabBodyWrapperHeight=0,s._tabsSubscription=M.EMPTY,s._tabLabelSubscription=M.EMPTY,s._selectedIndex=null,s.headerPosition="above",s.selectedIndexChange=new Bu,s.focusChange=new Bu,s.animationDone=new Bu,s.selectedTabChange=new Bu(!0),s._groupId=ZA++,s.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",s.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,s.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,s}return s(n,[{key:"ngAfterContentChecked",value:function(){var t=this,e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){var n=null==this._selectedIndex;if(!n){this.selectedTabChange.emit(this._createChangeEvent(e));var i=this._tabBodyWrapper.nativeElement;i.style.minHeight=i.clientHeight+"px"}Promise.resolve().then(function(){t._tabs.forEach(function(t,n){return t.isActive=n===e}),n||(t.selectedIndexChange.emit(e),t._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach(function(n,i){n.position=i-e,null==t._selectedIndex||0!=n.position||n.origin||(n.origin=e-t._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._changeDetectorRef.markForCheck())}},{key:"ngAfterContentInit",value:function(){var t=this;this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(function(){if(t._clampTabIndex(t._indexToSelect)===t._selectedIndex)for(var e=t._tabs.toArray(),n=0;n.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\n"],encapsulation:2}),t}(),tM=mk(function t(){o(this,t)}),eM=function(){var t=function(t){u(n,t);var e=p(n);function n(t){var i;return o(this,n),(i=e.call(this)).elementRef=t,i}return s(n,[{key:"focus",value:function(){this.elementRef.nativeElement.focus()}},{key:"getOffsetLeft",value:function(){return this.elementRef.nativeElement.offsetLeft}},{key:"getOffsetWidth",value:function(){return this.elementRef.nativeElement.offsetWidth}}]),n}(tM);return t.\u0275fac=function(e){return new(e||t)(hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(t,e){2&t&&(ss("aria-disabled",!!e.disabled),Gs("mat-tab-disabled",e.disabled))},inputs:{disabled:"disabled"},features:[Xa]}),t}(),nM=oy({passive:!0}),iM=function(){var t=function(){function t(e,n,i,r,a,s,l){var u=this;o(this,t),this._elementRef=e,this._changeDetectorRef=n,this._viewportRuler=i,this._dir=r,this._ngZone=a,this._platform=s,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new U,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new U,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new Bu,this.indexFocused=new Bu,a.runOutsideAngular(function(){bv(e.nativeElement,"mouseleave").pipe(Uv(u._destroyed)).subscribe(function(){u._stopInterval()})})}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this;bv(this._previousPaginator.nativeElement,"touchstart",nM).pipe(Uv(this._destroyed)).subscribe(function(){t._handlePaginatorPress("before")}),bv(this._nextPaginator.nativeElement,"touchstart",nM).pipe(Uv(this._destroyed)).subscribe(function(){t._handlePaginatorPress("after")})}},{key:"ngAfterContentInit",value:function(){var t=this,e=this._dir?this._dir.change:Pd(null),n=this._viewportRuler.change(150),i=function(){t.updatePagination(),t._alignInkBarToSelectedTab()};this._keyManager=new j_(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),dt(e,n,this._items.changes).pipe(Uv(this._destroyed)).subscribe(function(){t._ngZone.run(function(){return Promise.resolve().then(i)}),t._keyManager.withHorizontalOrientation(t._getLayoutDirection())}),this._keyManager.change.pipe(Uv(this._destroyed)).subscribe(function(e){t.indexFocused.emit(e),t._setTabFocus(e)})}},{key:"ngAfterContentChecked",value:function(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}},{key:"_handleKeydown",value:function(t){if(!By(t))switch(t.keyCode){case Ey:case Py:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}},{key:"_onContentChanges",value:function(){var t=this,e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(function(){t.updatePagination(),t._alignInkBarToSelectedTab(),t._changeDetectorRef.markForCheck()}))}},{key:"updatePagination",value:function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}},{key:"_isValidIndex",value:function(t){if(!this._items)return!0;var e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}},{key:"_setTabFocus",value:function(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();var e=this._tabListContainer.nativeElement,n=this._getLayoutDirection();e.scrollLeft="ltr"==n?0:e.scrollWidth-e.offsetWidth}}},{key:"_getLayoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_updateTabScrollPosition",value:function(){if(!this.disablePagination){var t=this.scrollDistance,e="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform="translateX(".concat(Math.round(e),"px)"),(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}}},{key:"_scrollHeader",value:function(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}},{key:"_handlePaginatorClick",value:function(t){this._stopInterval(),this._scrollHeader(t)}},{key:"_scrollToLabel",value:function(t){if(!this.disablePagination){var e=this._items?this._items.toArray()[t]:null;if(e){var n,i,r=this._tabListContainer.nativeElement.offsetWidth,o=e.elementRef.nativeElement,a=o.offsetLeft,s=o.offsetWidth;"ltr"==this._getLayoutDirection()?i=(n=a)+s:n=(i=this._tabList.nativeElement.offsetWidth-a)-s;var l=this.scrollDistance,u=this.scrollDistance+r;nu&&(this.scrollDistance+=i-u+60)}}}},{key:"_checkPaginationEnabled",value:function(){if(this.disablePagination)this._showPaginationControls=!1;else{var t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}},{key:"_checkScrollingControls",value:function(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}},{key:"_getMaxScrollDistance",value:function(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}},{key:"_alignInkBarToSelectedTab",value:function(){var t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}},{key:"_stopInterval",value:function(){this._stopScrolling.next()}},{key:"_handlePaginatorPress",value:function(t,e){var n=this;e&&null!=e.button&&0!==e.button||(this._stopInterval(),Hv(650,100).pipe(Uv(dt(this._stopScrolling,this._destroyed))).subscribe(function(){var e=n._scrollHeader(t),i=e.distance;(0===i||i>=e.maxScrollDistance)&&n._stopInterval()}))}},{key:"_scrollTo",value:function(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};var e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}},{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(t){t=pv(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}},{key:"focusIndex",get:function(){return this._keyManager?this._keyManager.activeItemIndex:0},set:function(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}},{key:"scrollDistance",get:function(){return this._scrollDistance},set:function(t){this._scrollTo(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(vy),hs(uy,8),hs(Mc),hs(ey),hs(rk,8))},t.\u0275dir=ve({type:t,inputs:{disablePagination:"disablePagination"}}),t}(),rM=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){var c;return o(this,n),(c=e.call(this,t,i,r,a,s,l,u))._disableRipple=!1,c}return s(n,[{key:"_itemSelected",value:function(t){t.preventDefault()}},{key:"disableRipple",get:function(){return this._disableRipple},set:function(t){this._disableRipple=fv(t)}}]),n}(iM);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(vy),hs(uy,8),hs(Mc),hs(ey),hs(rk,8))},t.\u0275dir=ve({type:t,inputs:{disableRipple:"disableRipple"},features:[Xa]}),t}(),oM=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){return o(this,n),e.call(this,t,i,r,a,s,l,u)}return n}(rM);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(vy),hs(uy,8),hs(Mc),hs(ey),hs(rk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-tab-header"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,eM,0),2&t&&Qu(i=ec())&&(e._items=i)},viewQuery:function(t,e){var n;1&t&&(Ju(NA,3),Ju(EA,3),Ju(OA,3),Ju(PA,1),Ju(RA,1)),2&t&&(Qu(n=ec())&&(e._inkBar=n.first),Qu(n=ec())&&(e._tabListContainer=n.first),Qu(n=ec())&&(e._tabList=n.first),Qu(n=ec())&&(e._nextPaginator=n.first),Qu(n=ec())&&(e._previousPaginator=n.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(t,e){2&t&&Gs("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[Xa],ngContentSelectors:bA,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-labels"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(Os(),ps(0,"div",0,1),Ss("click",function(){return e._handlePaginatorClick("before")})("mousedown",function(t){return e._handlePaginatorPress("before",t)})("touchend",function(){return e._stopInterval()}),ms(2,"div",2),gs(),ps(3,"div",3,4),Ss("keydown",function(t){return e._handleKeydown(t)}),ps(5,"div",5,6),Ss("cdkObserveContent",function(){return e._onContentChanges()}),ps(7,"div",7),Ps(8),gs(),ms(9,"mat-ink-bar"),gs(),gs(),ps(10,"div",8,9),Ss("mousedown",function(t){return e._handlePaginatorPress("after",t)})("click",function(){return e._handlePaginatorClick("after")})("touchend",function(){return e._stopInterval()}),ms(12,"div",2),gs()),2&t&&(Gs("mat-tab-header-pagination-disabled",e._disableScrollBefore),ds("matRippleDisabled",e._disableScrollBefore||e.disableRipple),Oo(5),Gs("_mat-animation-noopable","NoopAnimations"===e._animationMode),Oo(5),Gs("mat-tab-header-pagination-disabled",e._disableScrollAfter),ds("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[Wk,I_,NA],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\n'],encapsulation:2}),t}(),aM=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Kh,gk,Iy,Yk,T_,cb],gk]}),t}();function sM(t,e){if(1&t){var n=bs();ps(0,"uds-field-text",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function lM(t,e){if(1&t){var n=bs();ps(0,"uds-field-textbox",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function uM(t,e){if(1&t){var n=bs();ps(0,"uds-field-numeric",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function cM(t,e){if(1&t){var n=bs();ps(0,"uds-field-password",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function hM(t,e){if(1&t){var n=bs();ps(0,"uds-field-hidden",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function dM(t,e){if(1&t){var n=bs();ps(0,"uds-field-choice",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function fM(t,e){if(1&t){var n=bs();ps(0,"uds-field-multichoice",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function pM(t,e){if(1&t){var n=bs();ps(0,"uds-field-editlist",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function gM(t,e){if(1&t){var n=bs();ps(0,"uds-field-checkbox",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function mM(t,e){if(1&t){var n=bs();ps(0,"uds-field-imgchoice",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function vM(t,e){if(1&t){var n=bs();ps(0,"uds-field-date",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}function yM(t,e){if(1&t){var n=bs();ps(0,"uds-field-tags",2),Ss("changed",function(t){return rn(n),Ds().changed.emit(t)}),gs()}2&t&&ds("field",Ds().field)}var _M=function(){function t(){this.changed=new Bu,this.udsGuiFieldType=WS}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:13,vars:14,consts:[["matTooltipShowDelay","1000",1,"field",3,"ngSwitch","matTooltip"],[3,"field","changed",4,"ngSwitchCase"],[3,"field","changed"]],template:function(t,e){1&t&&(ps(0,"div",0),us(1,sM,1,1,"uds-field-text",1),us(2,lM,1,1,"uds-field-textbox",1),us(3,uM,1,1,"uds-field-numeric",1),us(4,cM,1,1,"uds-field-password",1),us(5,hM,1,1,"uds-field-hidden",1),us(6,dM,1,1,"uds-field-choice",1),us(7,fM,1,1,"uds-field-multichoice",1),us(8,pM,1,1,"uds-field-editlist",1),us(9,gM,1,1,"uds-field-checkbox",1),us(10,mM,1,1,"uds-field-imgchoice",1),us(11,vM,1,1,"uds-field-date",1),us(12,yM,1,1,"uds-field-tags",1),gs()),2&t&&(ds("ngSwitch",e.field.gui.type)("matTooltip",e.field.gui.tooltip),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.TEXT),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.TEXTBOX),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.NUMERIC),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.PASSWORD),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.HIDDEN),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.CHOICE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.MULTI_CHOICE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.EDITLIST),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.CHECKBOX),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.IMAGECHOICE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.DATE),Oo(1),ds("ngSwitchCase",e.udsGuiFieldType.TAGLIST))},styles:["uds-field[_ngcontent-%COMP%]{flex:1 50%} .mat-form-field{width:calc(100% - 1px)} .mat-form-field-flex{padding-top:0!important} .mat-tooltip{font-size:.9rem!important;margin:0!important;max-width:26em!important}"]}),t}();function bM(t,e){1&t&&tl(0),2&t&&nl(" ",Ds().$implicit," ")}function wM(t,e){if(1&t){var n=bs();ps(0,"uds-field",7),Ss("changed",function(t){return rn(n),Ds(3).changed.emit(t)}),gs()}2&t&&ds("field",e.$implicit)}function xM(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,bM,1,1,"ng-template",4),ps(2,"div",5),us(3,wM,1,1,"uds-field",6),gs(),gs()),2&t){var n=e.$implicit,i=Ds(2);Oo(3),ds("ngForOf",i.fieldsByTab[n])}}function kM(t,e){if(1&t&&(ps(0,"mat-tab-group",2),us(1,xM,4,1,"mat-tab",3),gs()),2&t){var n=Ds();ds("disableRipple",!0)("@.disabled",!0),Oo(1),ds("ngForOf",n.tabs)}}function SM(t,e){if(1&t&&(ps(0,"div"),ms(1,"uds-field",8),gs()),2&t){var n=e.$implicit;Oo(1),ds("field",n)}}function CM(t,e){1&t&&us(0,SM,2,1,"div",3),2&t&&ds("ngForOf",Ds().fields)}var AM=django.gettext("Main"),MM=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){var t=this;this.tabs=new Array,this.fieldsByTab={},this.fields.forEach(function(e){var n=void 0===e.gui.tab?AM:e.gui.tab;t.tabs.includes(n)||(t.tabs.push(n),t.fieldsByTab[n]=new Array),t.fieldsByTab[n].push(e)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-form"]],inputs:{fields:"fields"},outputs:{changed:"changed"},decls:3,vars:2,consts:[[3,"disableRipple",4,"ngIf","ngIfElse"],["onlyone",""],[3,"disableRipple"],[4,"ngFor","ngForOf"],["mat-tab-label",""],[1,"content"],[3,"field","changed",4,"ngFor","ngForOf"],[3,"field","changed"],[3,"field"]],template:function(t,e){if(1&t&&(us(0,kM,2,3,"mat-tab-group",0),us(1,CM,1,1,"ng-template",null,1,oc)),2&t){var n=cs(2);ds("ngIf",e.tabs.length>1)("ngIfElse",n)}},directives:[Lh,JA,Ph,GA,zA,_M],styles:[".content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap} .mat-form-field-wrapper{padding-bottom:1em} .mat-tab-label{height:32px!important}"]}),t}();function IM(t,e){if(1&t){var n=bs();ps(0,"button",10),Ss("click",function(){return rn(n),Ds().customButtonClicked()}),tl(1),gs()}if(2&t){var i=Ds();Oo(1),el(i.data.customButton)}}var TM,DM=function(){function t(t,e){this.dialogRef=t,this.data=e,this.onEvent=new Bu(!0),this.saving=!1}return t.prototype.ngOnInit=function(){this.onEvent.emit({type:"init",data:null,dialog:this.dialogRef})},t.prototype.changed=function(t){this.onEvent.emit({type:"changed",data:t,dialog:this.dialogRef})},t.prototype.getFields=function(){var t={},e=[];return this.data.guiFields.forEach(function(n){var i=void 0!==n.values?n.values:n.value;n.gui.required&&0!==i&&(!i||i instanceof Array&&0===i.length)&&e.push(n.gui.label),"number"==typeof i&&(i=i.toString()),t[n.name]=i}),{data:t,errors:e}},t.prototype.save=function(){var t=this.getFields();t.errors.length>0?this.data.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+t.errors.join(", ")):this.onEvent.emit({data:t.data,type:"save",dialog:this.dialogRef})},t.prototype.customButtonClicked=function(){var t=this.getFields();this.onEvent.emit({data:t.data,type:this.data.customButton,errors:t.errors,dialog:this.dialogRef})},t.\u0275fac=function(e){return new(e||t)(hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-modal-form"]],decls:17,vars:7,consts:[["mat-dialog-title","",3,"innerHtml"],["vc",""],["autocomplete","off"],[3,"fields","changed"],[1,"buttons"],[1,"group1"],["ngClass","custom","mat-raised-button","",3,"click",4,"ngIf"],[1,"group2"],["mat-raised-button","",3,"disabled","click"],["mat-raised-button","","color","primary",3,"disabled","click"],["ngClass","custom","mat-raised-button","",3,"click"]],template:function(t,e){1&t&&(ms(0,"h4",0),Ru(1,"safeHtml"),ps(2,"mat-dialog-content",null,1),ps(4,"form",2),ps(5,"uds-form",3),Ss("changed",function(t){return e.changed(t)}),gs(),gs(),gs(),ps(6,"mat-dialog-actions"),ps(7,"div",4),ps(8,"div",5),us(9,IM,2,1,"button",6),gs(),ps(10,"div",7),ps(11,"button",8),Ss("click",function(){return e.dialogRef.close()}),ps(12,"uds-translate"),tl(13,"Discard & close"),gs(),gs(),ps(14,"button",9),Ss("click",function(){return e.save()}),ps(15,"uds-translate"),tl(16,"Save"),gs(),gs(),gs(),gs(),gs()),2&t&&(ds("innerHtml",Lu(1,5,e.data.title),Dr),Oo(5),ds("fields",e.data.guiFields),Oo(4),ds("ngIf",null!=e.data.customButton),Oo(2),ds("disabled",e.saving),Oo(3),ds("disabled",e.saving))},directives:[SS,CS,nA,MC,QC,MM,AS,Lh,LS,VS,Eh],pipes:[zS],styles:["h4[_ngcontent-%COMP%]{margin-bottom:0}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%} uds-field{flex:1 100%}button.custom[_ngcontent-%COMP%]{background-color:#4682b4;color:#fff}"]}),t}(),EM=function(){function t(t){this.gui=t}return t.prototype.modalForm=function(t,e,n,i){void 0===n&&(n=null),e.sort(function(t,e){return t.gui.order>e.gui.order?1:-1});var r=null!=n;n=r?n:{},e.forEach(function(t){!1!==r&&void 0!==t.gui.rdonly||(t.gui.rdonly=!1),t.gui.type===WS.TEXT&&t.gui.multiline&&(t.gui.type=WS.TEXTBOX);var e=n[t.name];void 0!==e&&(e instanceof Array?(t.values=new Array,e.forEach(function(e){return t.values.push(e)})):t.value=e)});var o=window.innerWidth<800?"80%":"50%";return this.gui.dialog.open(DM,{position:{top:"64px"},width:o,data:{title:t,guiFields:e,customButton:i,gui:this.gui},disableClose:!0}).componentInstance.onEvent},t.prototype.typedForm=function(t,e,n,i,r,o,a){var s=this;a=a||{};var l=new Bu,u=n?django.gettext("Test"):void 0,c={},h={},d=function(e){h.hasOwnProperty(e.name)&&""!==e.value&&void 0!==e.value&&s.executeCallback(t,e,c)};return a.snack||(a.snack=this.gui.snackbar.open(django.gettext("Loading data..."),django.gettext("dismiss"))),t.table.rest.gui(o).subscribe(function(n){a.snack.dismiss(),void 0!==i&&i.forEach(function(t){n.push(t)}),n.forEach(function(t){c[t.name]=t,void 0!==t.gui.fills&&(h[t.name]=t.gui.fills)}),s.modalForm(e,n,r,u).subscribe(function(e){switch(e.data&&(e.data.data_type=o),e.type){case u:if(e.errors.length>0)return void s.gui.alert(django.gettext("Error"),django.gettext("Please, fill in require fields: ")+e.errors.join(", "));s.gui.snackbar.open(django.gettext("Testing..."),django.gettext("dismiss")),t.table.rest.test(o,e.data).subscribe(function(t){"ok"!==t?s.gui.snackbar.open(django.gettext("Test failed:")+" "+t,django.gettext("dismiss")):s.gui.snackbar.open(django.gettext("Test passed successfully"),django.gettext("dismiss"),{duration:2e3})});break;case"changed":case"init":if(null===e.data)for(var i=0,h=n;i"+i.join(", ")+"";this.gui.yesno(e,o,!0).subscribe(function(e){if(e){var i=r.length,o=function(){n.gui.snackbar.open(django.gettext("Deletion finished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()};r.forEach(function(e){t.table.rest.delete(e).subscribe(function(t){0==--i&&o()},function(t){0==--i&&o()})})}})},t.prototype.executeCallback=function(t,e,n,i){var r=this;void 0===i&&(i={});var o=new Array;e.gui.fills.parameters.forEach(function(t){o.push(t+"="+encodeURIComponent(n[t].value))}),t.table.rest.callback(e.gui.fills.callbackName,o.join("&")).subscribe(function(e){var o=new Array;e.forEach(function(t){var e=n[t.name];void 0!==e&&(void 0!==e.gui.fills&&o.push(e),e.gui.values.length=0,t.values.forEach(function(t){return e.gui.values.push(t)}),e.value||(e.value=t.values.length>0?t.values[0].id:""))}),o.forEach(function(e){void 0===i[e.name]&&(i[e.name]=!0,r.executeCallback(t,e,n,i))})})},t}(),OM=function(){function t(t,e){this.dialog=t,this.snackbar=e,this.forms=new EM(this)}return t.prototype.alert=function(t,e,n,i){void 0===n&&(n=0);var r=i||(window.innerWidth<800?"80%":"40%");return this.dialog.open(US,{width:r,data:{title:t,body:e,autoclose:n,type:GS.alert},disableClose:!0}).componentInstance.yesno},t.prototype.yesno=function(t,e,n){void 0===n&&(n=!1);var i=window.innerWidth<800?"80%":"40%";return this.dialog.open(US,{width:i,data:{title:t,body:e,type:GS.yesno,warnOnYes:n},disableClose:!0}).componentInstance.yesno},t.prototype.icon=function(t,e){return void 0===e&&(e="24px"),''},t}(),PM=function(t){return t.NUMERIC="numeric",t.ALPHANUMERIC="alphanumeric",t.DATETIME="datetime",t.DATETIMESEC="datetimesec",t.DATE="date",t.TIME="time",t.ICON="iconType",t.CALLBACK="callback",t.DICTIONARY="dict",t.IMAGE="image",t}({}),RM=function(t){return t[t.ALWAYS=0]="ALWAYS",t[t.SINGLE_SELECT=1]="SINGLE_SELECT",t[t.MULTI_SELECT=2]="MULTI_SELECT",t[t.ONLY_MENU=3]="ONLY_MENU",t[t.ACCELERATOR=4]="ACCELERATOR",t}({}),LM="provider",NM="service",FM="pool",VM="user",zM="group",BM="transport",HM="osmanager",jM="calendar",GM="poolgroup",UM={provider:django.gettext("provider"),service:django.gettext("service"),pool:django.gettext("service pool"),authenticator:django.gettext("authenticator"),user:django.gettext("user"),group:django.gettext("group"),transport:django.gettext("transport"),osmanager:django.gettext("OS manager"),calendar:django.gettext("calendar"),poolgroup:django.gettext("pool group")},WM=function(){function t(t){this.router=t}return t.getGotoButton=function(t,e,n){return{id:t,html:'link'+django.gettext("Go to")+" "+UM[t]+"",type:RM.ACCELERATOR,acceleratorProperties:[e,n]}},t.prototype.gotoProvider=function(t){this.router.navigate(void 0!==t?["providers",t]:["providers"])},t.prototype.gotoService=function(t,e){this.router.navigate(void 0!==e?["providers",t,"detail",e]:["providers",t,"detail"])},t.prototype.gotoServicePool=function(t){this.router.navigate(["pools","service-pools",t])},t.prototype.gotoServicePoolDetail=function(t){this.router.navigate(["pools","service-pools",t,"detail"])},t.prototype.gotoMetapool=function(t){this.router.navigate(["pools","meta-pools",t])},t.prototype.gotoMetapoolDetail=function(t){this.router.navigate(["pools","meta-pools",t,"detail"])},t.prototype.gotoCalendar=function(t){this.router.navigate(["pools","calendars",t])},t.prototype.gotoCalendarDetail=function(t){this.router.navigate(["pools","calendars",t,"detail"])},t.prototype.gotoAccount=function(t){this.router.navigate(["pools","accounts",t])},t.prototype.gotoAccountDetail=function(t){this.router.navigate(["pools","accounts",t,"detail"])},t.prototype.gotoPoolGroup=function(t){this.router.navigate(["pools","pool-groups",t=t||""])},t.prototype.gotoAuthenticator=function(t){this.router.navigate(["authenticators",t])},t.prototype.gotoAuthenticatorDetail=function(t){this.router.navigate(["authenticators",t,"detail"])},t.prototype.gotoUser=function(t,e){this.router.navigate(["authenticators",t,"detail","users",e])},t.prototype.gotoGroup=function(t,e){this.router.navigate(["authenticators",t,"detail","groups",e])},t.prototype.gotoTransport=function(t){this.router.navigate(["transports",t])},t.prototype.gotoOSManager=function(t){this.router.navigate(["osmanagers",t])},t.prototype.goto=function(t,e,n){var i=function(t){var i=e;if(n[t].split(".").forEach(function(t){return i=i[t]}),!i)throw new Error("not going :)");return i};try{switch(t){case LM:this.gotoProvider(i(0));break;case NM:this.gotoService(i(0),i(1));break;case FM:this.gotoServicePool(i(0));break;case"authenticator":this.gotoAuthenticator(i(0));break;case VM:this.gotoUser(i(0),i(1));break;case zM:this.gotoGroup(i(0),i(1));break;case BM:this.gotoTransport(i(0));break;case HM:this.gotoOSManager(i(0));break;case jM:this.gotoCalendar(i(0));break;case GM:this.gotoPoolGroup(i(0))}}catch(r){}},t}(),YM=function(){function t(e){o(this,t),this.total=e}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new qM(t,this.total))}}]),t}(),qM=function(t){u(n,t);var e=p(n);function n(t,i){var r;return o(this,n),(r=e.call(this,t)).total=i,r.count=0,r}return s(n,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),n}(R),XM=new Set,ZM=function(){var t=function(){function t(e){o(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):KM}return s(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!XM.has(t))try{TM||((TM=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(TM)),TM.sheet&&(TM.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),XM.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey))},token:t,providedIn:"root"}),t}();function KM(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var $M=function(){var t=function(){function t(e,n){o(this,t),this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new U}return s(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return QM(mv(t)).some(function(t){return e._registerQuery(t).mql.matches})}},{key:"observe",value:function(t){var e=this,n=kf(QM(mv(t)).map(function(t){return e._registerQuery(t).observable}));return(n=If(n.pipe(Nf(1)),n.pipe(function(t){return t.lift(new YM(1))},x_(0)))).pipe(q(function(t){var e={matches:!1,breakpoints:{}};return t.forEach(function(t){var n=t.matches,i=t.query;e.matches=e.matches||n,e.breakpoints[i]=n}),e}))}},{key:"_registerQuery",value:function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i={observable:new z(function(t){var i=function(n){return e._zone.run(function(){return t.next(n)})};return n.addListener(i),function(){n.removeListener(i)}}).pipe(zf(n),q(function(e){return{query:t,matches:e.matches}}),Uv(this._destroySubject)),mql:n};return this._queries.set(t,i),i}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ZM),zi(Mc))},t.\u0275prov=Ot({factory:function(){return new t(zi(ZM),zi(Mc))},token:t,providedIn:"root"}),t}();function QM(t){return t.map(function(t){return t.split(",")}).reduce(function(t,e){return t.concat(e)}).map(function(t){return t.trim()})}function JM(t,e){if(1&t){var n=bs();ps(0,"div",1),ps(1,"button",2),Ss("click",function(){return rn(n),Ds().action()}),tl(2),gs(),gs()}if(2&t){var i=Ds();Oo(2),el(i.data.action)}}function tI(t,e){}var eI=new wi("MatSnackBarData"),nI=function t(){o(this,t),this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},iI=Math.pow(2,31)-1,rI=function(){function t(e,n){var i=this;o(this,t),this._overlayRef=n,this._afterDismissed=new U,this._afterOpened=new U,this._onAction=new U,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe(function(){return i.dismiss()}),e._onExit.subscribe(function(){return i._finishDismiss()})}return s(t,[{key:"dismiss",value:function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}},{key:"dismissWithAction",value:function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete()),clearTimeout(this._durationTimeoutId)}},{key:"closeWithAction",value:function(){this.dismissWithAction()}},{key:"_dismissAfter",value:function(t){var e=this;this._durationTimeoutId=setTimeout(function(){return e.dismiss()},Math.min(t,iI))}},{key:"_open",value:function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}},{key:"_finishDismiss",value:function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}},{key:"afterDismissed",value:function(){return this._afterDismissed}},{key:"afterOpened",value:function(){return this.containerInstance._onEnter}},{key:"onAction",value:function(){return this._onAction}}]),t}(),oI=function(){var t=function(){function t(e,n){o(this,t),this.snackBarRef=e,this.data=n}return s(t,[{key:"action",value:function(){this.snackBarRef.dismissWithAction()}},{key:"hasAction",get:function(){return!!this.data.action}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(rI),hs(eI))},t.\u0275cmp=he({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(ps(0,"span"),tl(1),gs(),us(2,JM,3,1,"div",0)),2&t&&(Oo(1),el(e.data.message),Oo(1),ds("ngIf",e.hasAction))},directives:[Lh,LS],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t}(),aI={snackBarState:gb("state",[_b("void, hidden",yb({transform:"scale(0.8)",opacity:0})),_b("visible",yb({transform:"scale(1)",opacity:1})),wb("* => visible",mb("150ms cubic-bezier(0, 0, 0.2, 1)")),wb("* => void, * => hidden",mb("75ms cubic-bezier(0.4, 0.0, 1, 1)",yb({opacity:0})))])},sI=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s){var l;return o(this,n),(l=e.call(this))._ngZone=t,l._elementRef=i,l._changeDetectorRef=r,l._platform=a,l.snackBarConfig=s,l._announceDelay=150,l._destroyed=!1,l._onAnnounce=new U,l._onExit=new U,l._onEnter=new U,l._animationState="void",l.attachDomPortal=function(t){return l._assertNotAttached(),l._applySnackBarClasses(),l._portalOutlet.attachDomPortal(t)},l._live="assertive"!==s.politeness||s.announcementMessage?"off"===s.politeness?"off":"polite":"assertive",l._platform.FIREFOX&&("polite"===l._live&&(l._role="status"),"assertive"===l._live&&(l._role="alert")),l}return s(n,[{key:"attachComponentPortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}},{key:"onAnimationEnd",value:function(t){var e=t.toState;if(("void"===e&&"void"!==t.fromState||"hidden"===e)&&this._completeExit(),"visible"===e){var n=this._onEnter;this._ngZone.run(function(){n.next(),n.complete()})}}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}},{key:"exit",value:function(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}},{key:"ngOnDestroy",value:function(){this._destroyed=!0,this._completeExit()}},{key:"_completeExit",value:function(){var t=this;this._ngZone.onMicrotaskEmpty.pipe(Nf(1)).subscribe(function(){t._onExit.next(),t._onExit.complete()})}},{key:"_applySnackBarClasses",value:function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(function(e){return t.classList.add(e)}):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}},{key:"_assertNotAttached",value:function(){this._portalOutlet.hasAttached()}},{key:"_screenReaderAnnounce",value:function(){var t=this;this._announceTimeoutId||this._ngZone.runOutsideAngular(function(){t._announceTimeoutId=setTimeout(function(){var e=t._elementRef.nativeElement.querySelector("[aria-hidden]"),n=t._elementRef.nativeElement.querySelector("[aria-live]");if(e&&n){var i=null;t._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(i=document.activeElement),e.removeAttribute("aria-hidden"),n.appendChild(e),null==i||i.focus(),t._onAnnounce.next(),t._onAnnounce.complete()}},t._announceDelay)})}}]),n}(Sy);return t.\u0275fac=function(e){return new(e||t)(hs(Mc),hs(Tl),hs(eu),hs(ey),hs(nI))},t.\u0275cmp=he({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var n;1&t&&Ju(My,3),2&t&&Qu(n=ec())&&(e._portalOutlet=n.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&Cs("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&ol("@state",e._animationState)},features:[Xa],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(ps(0,"div",0),us(1,tI,0,0,"ng-template",1),gs(),ms(2,"div")),2&t&&(Oo(2),ss("aria-live",e._live)("role",e._role))},directives:[My],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[aI.snackBarState]}}),t}(),lI=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[w_,Iy,Kh,FS,gk],gk]}),t}(),uI=new wi("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new nI}}),cI=function(){var t=function(){function t(e,n,i,r,a,s){o(this,t),this._overlay=e,this._live=n,this._injector=i,this._breakpointObserver=r,this._parentSnackBar=a,this._defaultConfig=s,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=oI,this.snackBarContainerComponent=sI,this.handsetCssClass="mat-snack-bar-handset"}return s(t,[{key:"openFromComponent",value:function(t,e){return this._attach(t,e)}},{key:"openFromTemplate",value:function(t,e){return this._attach(t,e)}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=Object.assign(Object.assign({},this._defaultConfig),n);return i.data={message:t,action:e},i.announcementMessage===t&&(i.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,i)}},{key:"dismiss",value:function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}},{key:"ngOnDestroy",value:function(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}},{key:"_attachSnackBarContainer",value:function(t,e){var n=Ya.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:nI,useValue:e}]}),i=new wy(this.snackBarContainerComponent,e.viewContainerRef,n),r=t.attach(i);return r.instance.snackBarConfig=e,r.instance}},{key:"_attach",value:function(t,e){var n=this,i=Object.assign(Object.assign(Object.assign({},new nI),this._defaultConfig),e),r=this._createOverlay(i),o=this._attachSnackBarContainer(r,i),a=new rI(o,r);if(t instanceof lu){var s=new xy(t,null,{$implicit:i.data,snackBarRef:a});a.instance=o.attachTemplatePortal(s)}else{var l=this._createInjector(i,a),u=new wy(t,void 0,l),c=o.attachComponentPortal(u);a.instance=c.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Uv(r.detachments())).subscribe(function(t){var e=r.overlayElement.classList;t.matches?e.add(n.handsetCssClass):e.remove(n.handsetCssClass)}),i.announcementMessage&&o._onAnnounce.subscribe(function(){n._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(a,i),this._openedSnackBarRef=a,this._openedSnackBarRef}},{key:"_animateSnackBar",value:function(t,e){var n=this;t.afterDismissed().subscribe(function(){n._openedSnackBarRef==t&&(n._openedSnackBarRef=null),e.announcementMessage&&n._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(function(){t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(function(){return t._dismissAfter(e.duration)})}},{key:"_createOverlay",value:function(t){var e=new Zy;e.direction=t.direction;var n=this._overlay.position().global(),i="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!i||"end"===t.horizontalPosition&&i,o=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):o?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)}},{key:"_createInjector",value:function(t,e){return Ya.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:rI,useValue:e},{provide:eI,useValue:t.data}]})}},{key:"_openedSnackBarRef",get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(g_),zi($_),zi(Ya),zi($M),zi(t,12),zi(uI))},t.\u0275prov=Ot({factory:function(){return new t(zi(g_),zi($_),zi(Ta),zi($M),zi(t,12),zi(uI))},token:t,providedIn:lI}),t}(),hI=function(){function t(t,e,n,i,r,o){this.http=t,this.router=e,this.dialog=n,this.snackbar=i,this.sanitizer=r,this.dateAdapter=o,this.user=new dv(udsData.profile),this.navigation=new WM(this.router),this.gui=new OM(this.dialog,this.snackbar),this.dateAdapter.setLocale(this.config.language)}return Object.defineProperty(t.prototype,"config",{get:function(){return udsData.config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"notices",{get:function(){return udsData.errors},enumerable:!1,configurable:!0}),t.prototype.restPath=function(t){return this.config.urls.rest+t},t.prototype.staticURL=function(t){return this.config.urls.static+t},t.prototype.logout=function(){window.location.href=this.config.urls.logout},t.prototype.gotoUser=function(){window.location.href=this.config.urls.user},t.prototype.putOnStorage=function(t,e){void 0!==typeof Storage&&sessionStorage.setItem(t,e)},t.prototype.getFromStorage=function(t){return void 0!==typeof Storage?sessionStorage.getItem(t):null},t.prototype.safeString=function(t){return this.sanitizer.bypassSecurityTrustHtml(t)},t.prototype.yesno=function(t){return t?django.gettext("yes"):django.gettext("no")},t.\u0275prov=Ot({token:t,factory:t.\u0275fac=function(e){return new(e||t)(zi(ef),zi(Bm),zi(wS),zi(cI),zi(Id),zi(Sk))},providedIn:"root"}),t}(),dI=function(){function t(t){this.api=t}return t.prototype.canActivate=function(t,e){return!!this.api.user.isStaff||(window.location.href=this.api.config.urls.user,!1)},t.\u0275prov=Ot({token:t,factory:t.\u0275fac=function(e){return new(e||t)(zi(hI))},providedIn:"root"}),t}(),fI=function(t,e){return(fI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function pI(t,e){function n(){this.constructor=t}fI(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function gI(t,e,n,i){return new(n||(n=Promise))(function(r,o){function a(t){try{l(i.next(t))}catch(e){o(e)}}function s(t){try{l(i.throw(t))}catch(e){o(e)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((i=i.apply(t,e||[])).next())})}var mI=function(t){return t[t.NONE=0]="NONE",t[t.READ=32]="READ",t[t.MANAGEMENT=64]="MANAGEMENT",t[t.ALL=96]="ALL",t}({}),vI=function(){function t(t,e,n){this.api=t,void 0===n&&(n={}),void 0===n.base&&(n.base=e);var i=function(t,e){return void 0===t?e:t};this.id=e,this.paths={base:n.base,get:i(n.get,n.base),log:i(n.log,n.base),put:i(n.put,n.base),test:i(n.test,n.base+"/test"),delete:i(n.delete,n.base),types:i(n.types,n.base+"/types"),gui:i(n.gui,n.base+"/gui"),tableInfo:i(n.tableInfo,n.base+"/tableinfo")},this.headers=(new Bd).set("Content-Type","application/json; charset=utf8").set(this.api.config.auth_header,this.api.config.auth_token)}return t.prototype.get=function(t){return this.doGet(this.getPath(this.paths.get,t))},t.prototype.getLogs=function(t){return this.doGet(this.getPath(this.paths.log,t)+"/log")},t.prototype.overview=function(t){return this.get("overview"+(void 0!==t?"?filter="+t:""))},t.prototype.summary=function(t){return this.get("overview?summarize"+(void 0!==t?"&filter="+t:""))},t.prototype.put=function(t,e){var n=this;return this.api.http.put(this.getPath(this.paths.put,e),t,{headers:this.headers}).pipe(Gf(function(t){return n.handleError(t,!0)}))},t.prototype.create=function(t){return this.put(t)},t.prototype.save=function(t,e){return this.put(t,e=void 0!==e?e:t.id)},t.prototype.test=function(t,e){var n=this;return this.api.http.post(this.getPath(this.paths.test,t),e,{headers:this.headers}).pipe(Gf(function(t){return n.handleError(t)}))},t.prototype.delete=function(t){var e=this;return this.api.http.delete(this.getPath(this.paths.delete,t),{headers:this.headers}).pipe(Gf(function(t){return e.handleError(t)}))},t.prototype.permision=function(){return this.api.user.isAdmin?mI.ALL:mI.NONE},t.prototype.getPermissions=function(t){return this.doGet(this.getPath("permissions/"+this.paths.base+"/"+t))},t.prototype.addPermission=function(t,e,n,i){var r=this,o=this.getPath("permissions/"+this.paths.base+"/"+t+"/"+e+"/add/"+n);return this.api.http.put(o,{perm:i},{headers:this.headers}).pipe(Gf(function(t){return r.handleError(t)}))},t.prototype.revokePermission=function(t){var e=this,n=this.getPath("permissions/revoke");return this.api.http.put(n,{items:t},{headers:this.headers}).pipe(Gf(function(t){return e.handleError(t)}))},t.prototype.types=function(){return this.doGet(this.getPath(this.paths.types))},t.prototype.gui=function(t){var e=this.getPath(this.paths.gui+(void 0!==t?"/"+t:""));return this.doGet(e)},t.prototype.callback=function(t,e){var n=this.getPath("gui/callback/"+t+"?"+e);return this.doGet(n)},t.prototype.tableInfo=function(){return this.doGet(this.getPath(this.paths.tableInfo))},t.prototype.detail=function(t,e){return new yI(this,t,e)},t.prototype.invoke=function(t,e){var n=t;return e&&(n=n+"?"+e),this.get(n)},t.prototype.getPath=function(t,e){return this.api.restPath(t+(void 0!==e?"/"+e:""))},t.prototype.doGet=function(t){var e=this;return this.api.http.get(t,{headers:this.headers}).pipe(Gf(function(t){return e.handleError(t)}))},t.prototype.handleError=function(t,e){var n;return void 0===e&&(e=!1),n=t.error instanceof ErrorEvent?t.error.message:e?django.gettext("Error saving: ")+t.error:"Error "+t.status+": "+t.error,this.api.gui.alert(e?django.gettext("Error saving element"):django.gettext("Error handling your request"),n),qv(n)},t}(),yI=function(t){function e(e,n,i,r){var o=t.call(this,e.api,[e.paths.base,n,i].join("/"))||this;return o.parentModel=e,o.parentId=n,o.model=i,o.perm=r,o}return pI(e,t),e.prototype.permision=function(){return this.perm||mI.ALL},e}(vI),_I=function(t){function e(e){var n=t.call(this,e,"providers")||this;return n.api=e,n}return pI(e,t),e.prototype.allServices=function(){return this.get("allservices")},e.prototype.service=function(t){return this.get("service/"+t)},e.prototype.maintenance=function(t){return this.get(t+"/maintenance")},e}(vI),bI=function(t){function e(e){var n=t.call(this,e,"authenticators")||this;return n.api=e,n}return pI(e,t),e.prototype.search=function(t,e,n,i){return void 0===i&&(i=12),this.get(t+"/search?type="+encodeURIComponent(e)+"&term="+encodeURIComponent(n)+"&limit="+i)},e}(vI),wI=function(t){function e(e){var n=t.call(this,e,"osmanagers")||this;return n.api=e,n}return pI(e,t),e}(vI),xI=function(t){function e(e){var n=t.call(this,e,"transports")||this;return n.api=e,n}return pI(e,t),e}(vI),kI=function(t){function e(e){var n=t.call(this,e,"networks")||this;return n.api=e,n}return pI(e,t),e}(vI),SI=function(t){function e(e){var n=t.call(this,e,"servicespools")||this;return n.api=e,n}return pI(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e.prototype.actionsList=function(t){return this.get(t+"/actionsList")},e.prototype.listAssignables=function(t){return this.get(t+"/listAssignables")},e.prototype.createFromAssignable=function(t,e,n){return this.get(t+"/createFromAssignable?user_id="+encodeURIComponent(e)+"&assignable_id="+encodeURIComponent(n))},e}(vI),CI=function(t){function e(e){var n=t.call(this,e,"metapools")||this;return n.api=e,n}return pI(e,t),e.prototype.setFallbackAccess=function(t,e){return this.get(t+"/setFallbackAccess?fallbackAccess="+e)},e.prototype.getFallbackAccess=function(t){return this.get(t+"/getFallbackAccess")},e}(vI),AI=function(t){function e(e){var n=t.call(this,e,"config")||this;return n.api=e,n}return pI(e,t),e}(vI),MI=function(t){function e(e){var n=t.call(this,e,"gallery/images")||this;return n.api=e,n}return pI(e,t),e}(vI),II=function(t){function e(e){var n=t.call(this,e,"gallery/servicespoolgroups")||this;return n.api=e,n}return pI(e,t),e}(vI),TI=function(t){function e(e){var n=t.call(this,e,"system")||this;return n.api=e,n}return pI(e,t),e.prototype.information=function(){return this.get("overview")},e.prototype.stats=function(t,e){var n="stats/"+t;return e&&(n+="/"+e),this.get(n)},e.prototype.flushCache=function(){return this.doGet(this.getPath("cache","flush"))},e}(vI),DI=function(t){function e(e){var n=t.call(this,e,"reports")||this;return n.api=e,n}return pI(e,t),e.prototype.types=function(){return Pd([])},e}(vI),EI=function(t){function e(e){var n=t.call(this,e,"calendars")||this;return n.api=e,n}return pI(e,t),e}(vI),OI=function(t){function e(e){var n=t.call(this,e,"accounts")||this;return n.api=e,n}return pI(e,t),e.prototype.timemark=function(t){return this.get(t+"/timemark")},e}(vI),PI=function(t){function e(e){var n=t.call(this,e,"proxies")||this;return n.api=e,n}return pI(e,t),e}(vI),RI=function(t){function e(e){var n=t.call(this,e,"actortokens")||this;return n.api=e,n}return pI(e,t),e}(vI),LI=function(){function t(t){this.api=t,this.providers=new _I(t),this.authenticators=new bI(t),this.osManagers=new wI(t),this.transports=new xI(t),this.networks=new kI(t),this.servicesPools=new SI(t),this.metaPools=new CI(t),this.gallery=new MI(t),this.servicesPoolGroups=new II(t),this.calendars=new EI(t),this.accounts=new OI(t),this.proxy=new PI(t),this.system=new TI(t),this.configuration=new AI(t),this.actorToken=new RI(t),this.reports=new DI(t)}return t.\u0275prov=Ot({token:t,factory:t.\u0275fac=function(e){return new(e||t)(zi(hI))},providedIn:"root"}),t}(),NI=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")],FI=[django.gettext("January"),django.gettext("February"),django.gettext("March"),django.gettext("April"),django.gettext("May"),django.gettext("June"),django.gettext("July"),django.gettext("August"),django.gettext("September"),django.gettext("October"),django.gettext("November"),django.gettext("December")],VI=function(t){var e=[];return t.forEach(function(t){e.push(t.substr(0,3))}),e},zI=function(t,e,n){return BI(t,e,n)},BI=function(t,e,n,i){i=i||{},e=e||new Date,(n=n||ZI).formats=n.formats||{};var r=e.getTime();return(i.utc||"number"==typeof i.timezone)&&(e=HI(e)),"number"==typeof i.timezone&&(e=new Date(e.getTime()+6e4*i.timezone)),t.replace(/%([-_0]?.)/g,function(t,o){var a,s,l,u,c,h,d,f;if(l=null,c=null,2===o.length){if("-"===(l=o[0]))c="";else if("_"===l)c=" ";else{if("0"!==l)return t;c="0"}o=o[1]}switch(o){case"A":return n.days[e.getDay()];case"a":return n.shortDays[e.getDay()];case"B":return n.months[e.getMonth()];case"b":return n.shortMonths[e.getMonth()];case"C":return jI(Math.floor(e.getFullYear()/100),c);case"D":return BI(n.formats.D||"%m/%d/%y",e,n);case"d":return jI(e.getDate(),c);case"e":return e.getDate();case"F":return BI(n.formats.F||"%Y-%m-%d",e,n);case"H":return jI(e.getHours(),c);case"h":return n.shortMonths[e.getMonth()];case"I":return jI(GI(e),c);case"j":return d=new Date(e.getFullYear(),0,1),a=Math.ceil((e.getTime()-d.getTime())/864e5),jI(a,3);case"k":return jI(e.getHours(),void 0===c?" ":c);case"L":return jI(Math.floor(r%1e3),3);case"l":return jI(GI(e),void 0===c?" ":c);case"M":return jI(e.getMinutes(),c);case"m":return jI(e.getMonth()+1,c);case"n":return"\n";case"o":return String(e.getDate())+UI(e.getDate());case"P":case"p":return"";case"R":return BI(n.formats.R||"%H:%M",e,n);case"r":return BI(n.formats.r||"%I:%M:%S %p",e,n);case"S":return jI(e.getSeconds(),c);case"s":return Math.floor(r/1e3);case"T":return BI(n.formats.T||"%H:%M:%S",e,n);case"t":return"\t";case"U":return jI(WI(e,"sunday"),c);case"u":return 0===(s=e.getDay())?7:s;case"v":return BI(n.formats.v||"%e-%b-%Y",e,n);case"W":return jI(WI(e,"monday"),c);case"w":return e.getDay();case"Y":return e.getFullYear();case"y":return(f=String(e.getFullYear())).slice(f.length-2);case"Z":return i.utc?"GMT":(h=e.toString().match(/\((\w+)\)/))&&h[1]||"";case"z":return i.utc?"+0000":((u="number"==typeof i.timezone?i.timezone:-e.getTimezoneOffset())<0?"-":"+")+jI(Math.abs(u/60))+jI(u%60);default:return o}})},HI=function(t){var e=6e4*(t.getTimezoneOffset()||0);return new Date(t.getTime()+e)},jI=function(t,e,n){"number"==typeof e&&(n=e,e="0"),e=null==e?"0":e,n=null==n?2:n;var i=String(t);if(e)for(;i.length12&&(e-=12),e},UI=function(t){var e=t%10,n=t%100;if(n>=11&&n<=13||0===e||e>=4)return"th";switch(e){case 1:return"st";case 2:return"nd";case 3:return"rd"}},WI=function(t,e){e=e||"sunday";var n=t.getDay();"monday"===e&&(0===n?n=6:n--);var i=new Date(t.getFullYear(),0,1),r=Math.floor((t.getTime()-i.getTime())/864e5);return Math.floor((r+7-n)/7)},YI=function(t){return t.replace(/./g,function(t){switch(t){case"a":case"A":return"%p";case"b":case"d":case"m":case"w":case"W":case"y":case"Y":return"%"+t;case"c":return"%FT%TZ";case"D":return"%a";case"e":return"%z";case"f":return"%I:%M";case"F":return"%F";case"h":case"g":return"%I";case"H":case"G":return"%H";case"i":return"%M";case"I":return"";case"j":return"%d";case"l":return"%A";case"L":return"";case"M":return"%b";case"n":return"%m";case"N":return"%b";case"o":return"%W";case"O":return"%z";case"P":return"%R %p";case"r":return"%a, %d %b %Y %T %z";case"s":return"%S";case"S":case"t":return"";case"T":return"%Z";case"u":return"0";case"U":return"";case"z":return"%j";case"Z":return"z";default:return t}})},qI=function(t,e,n){var i;if(void 0===n&&(n=null),"None"===e||null==e)e=7226578800,i=django.gettext("Never");else{var r=django.get_format(t);n&&(r+=n),i=zI(YI(r),new Date(1e3*e))}return i},XI=function(t){return"yes"===t||!0===t||"true"===t||1===t},ZI={days:NI,shortDays:VI(NI),months:FI,shortMonths:VI(FI),AM:"AM",PM:"PM",am:"am",pm:"pm"},KI=n("o0o1"),$I=n.n(KI),QI=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,i){return t[0]===e&&(n=i,!0)}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n0},t.prototype.connect_=function(){JI&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),iT?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){JI&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;nT.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),oT=function(t,e){for(var n=0,i=Object.keys(e);n0},t}(),gT="undefined"!=typeof WeakMap?new WeakMap:new QI,mT=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=rT.getInstance(),i=new pT(e,n,this);gT.set(this,i)};["observe","unobserve","disconnect"].forEach(function(t){mT.prototype[t]=function(){var e;return(e=gT.get(this))[t].apply(e,arguments)}});var vT=void 0!==tT.ResizeObserver?tT.ResizeObserver:mT,yT=function(){function t(e){o(this,t),this.changes=e}return s(t,[{key:"notEmpty",value:function(t){if(this.changes[t]){var e=this.changes[t].currentValue;if(null!=e)return Pd(e)}return Tf}},{key:"has",value:function(t){return this.changes[t]?Pd(this.changes[t].currentValue):Tf}},{key:"notFirst",value:function(t){return this.changes[t]&&!this.changes[t].isFirstChange()?Pd(this.changes[t].currentValue):Tf}},{key:"notFirstAndEmpty",value:function(t){if(this.changes[t]&&!this.changes[t].isFirstChange()){var e=this.changes[t].currentValue;if(null!=e)return Pd(e)}return Tf}}],[{key:"of",value:function(e){return new t(e)}}]),t}(),_T=new wi("NGX_ECHARTS_CONFIG"),bT=function(){var t=function(){function t(e,n,i){o(this,t),this.el=n,this.ngZone=i,this.autoResize=!0,this.loadingType="default",this.chartInit=new Bu,this.optionsError=new Bu,this.chartClick=this.createLazyEvent("click"),this.chartDblClick=this.createLazyEvent("dblclick"),this.chartMouseDown=this.createLazyEvent("mousedown"),this.chartMouseMove=this.createLazyEvent("mousemove"),this.chartMouseUp=this.createLazyEvent("mouseup"),this.chartMouseOver=this.createLazyEvent("mouseover"),this.chartMouseOut=this.createLazyEvent("mouseout"),this.chartGlobalOut=this.createLazyEvent("globalout"),this.chartContextMenu=this.createLazyEvent("contextmenu"),this.chartLegendSelectChanged=this.createLazyEvent("legendselectchanged"),this.chartLegendSelected=this.createLazyEvent("legendselected"),this.chartLegendUnselected=this.createLazyEvent("legendunselected"),this.chartLegendScroll=this.createLazyEvent("legendscroll"),this.chartDataZoom=this.createLazyEvent("datazoom"),this.chartDataRangeSelected=this.createLazyEvent("datarangeselected"),this.chartTimelineChanged=this.createLazyEvent("timelinechanged"),this.chartTimelinePlayChanged=this.createLazyEvent("timelineplaychanged"),this.chartRestore=this.createLazyEvent("restore"),this.chartDataViewChanged=this.createLazyEvent("dataviewchanged"),this.chartMagicTypeChanged=this.createLazyEvent("magictypechanged"),this.chartPieSelectChanged=this.createLazyEvent("pieselectchanged"),this.chartPieSelected=this.createLazyEvent("pieselected"),this.chartPieUnselected=this.createLazyEvent("pieunselected"),this.chartMapSelectChanged=this.createLazyEvent("mapselectchanged"),this.chartMapSelected=this.createLazyEvent("mapselected"),this.chartMapUnselected=this.createLazyEvent("mapunselected"),this.chartAxisAreaSelected=this.createLazyEvent("axisareaselected"),this.chartFocusNodeAdjacency=this.createLazyEvent("focusnodeadjacency"),this.chartUnfocusNodeAdjacency=this.createLazyEvent("unfocusnodeadjacency"),this.chartBrush=this.createLazyEvent("brush"),this.chartBrushEnd=this.createLazyEvent("brushend"),this.chartBrushSelected=this.createLazyEvent("brushselected"),this.chartRendered=this.createLazyEvent("rendered"),this.chartFinished=this.createLazyEvent("finished"),this.animationFrameID=null,this.echarts=e.echarts}return s(t,[{key:"ngOnChanges",value:function(t){var e=this,n=yT.of(t);n.notFirstAndEmpty("options").subscribe(function(t){return e.onOptionsChange(t)}),n.notFirstAndEmpty("merge").subscribe(function(t){return e.setOption(t)}),n.has("loading").subscribe(function(t){return e.toggleLoading(!!t)}),n.notFirst("theme").subscribe(function(){return e.refreshChart()})}},{key:"ngOnInit",value:function(){var t=this;this.autoResize&&(this.resizeSub=new vT(function(){t.animationFrameID=window.requestAnimationFrame(function(){return t.resize()})}),this.resizeSub.observe(this.el.nativeElement))}},{key:"ngOnDestroy",value:function(){this.resizeSub&&(this.resizeSub.unobserve(this.el.nativeElement),window.cancelAnimationFrame(this.animationFrameID)),this.dispose()}},{key:"ngAfterViewInit",value:function(){var t=this;setTimeout(function(){return t.initChart()})}},{key:"dispose",value:function(){this.chart&&(this.chart.isDisposed()||this.chart.dispose(),this.chart=null)}},{key:"resize",value:function(){this.chart&&this.chart.resize()}},{key:"toggleLoading",value:function(t){this.chart&&(t?this.chart.showLoading(this.loadingType,this.loadingOpts):this.chart.hideLoading())}},{key:"setOption",value:function(t,e){if(this.chart)try{this.chart.setOption(t,e)}catch(n){console.error(n),this.optionsError.emit(n)}}},{key:"refreshChart",value:function(){return gI(this,void 0,void 0,$I.a.mark(function t(){return $I.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.dispose(),t.next=3,this.initChart();case 3:case"end":return t.stop()}},t,this)}))}},{key:"createChart",value:function(){var t=this,e=this.el.nativeElement;if(window&&window.getComputedStyle){var n=window.getComputedStyle(e,null).getPropertyValue("height");n&&"0px"!==n||e.style.height&&"0px"!==e.style.height||(e.style.height="400px")}return this.ngZone.runOutsideAngular(function(){return("function"==typeof t.echarts?t.echarts:function(){return Promise.resolve(t.echarts)})().then(function(n){return(0,n.init)(e,t.theme,t.initOpts)})})}},{key:"initChart",value:function(){return gI(this,void 0,void 0,$I.a.mark(function t(){return $I.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.onOptionsChange(this.options);case 2:this.merge&&this.chart&&this.setOption(this.merge);case 3:case"end":return t.stop()}},t,this)}))}},{key:"onOptionsChange",value:function(t){return gI(this,void 0,void 0,$I.a.mark(function e(){return $I.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(!this.chart){e.next=6;break}this.setOption(this.options,!0),e.next=11;break;case 6:return e.next=8,this.createChart();case 8:this.chart=e.sent,this.chartInit.emit(this.chart),this.setOption(this.options,!0);case 11:case"end":return e.stop()}},e,this)}))}},{key:"createLazyEvent",value:function(t){var e=this;return this.chartInit.pipe(Of(function(n){return new z(function(i){return n.on(t,function(t){return e.ngZone.run(function(){return i.next(t)})}),function(){e.chart&&(e.chart.isDisposed()||n.off(t))}})}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(_T),hs(Tl),hs(Mc))},t.\u0275dir=ve({type:t,selectors:[["echarts"],["","echarts",""]],inputs:{autoResize:"autoResize",loadingType:"loadingType",options:"options",theme:"theme",loading:"loading",initOpts:"initOpts",merge:"merge",loadingOpts:"loadingOpts"},outputs:{chartInit:"chartInit",optionsError:"optionsError",chartClick:"chartClick",chartDblClick:"chartDblClick",chartMouseDown:"chartMouseDown",chartMouseMove:"chartMouseMove",chartMouseUp:"chartMouseUp",chartMouseOver:"chartMouseOver",chartMouseOut:"chartMouseOut",chartGlobalOut:"chartGlobalOut",chartContextMenu:"chartContextMenu",chartLegendSelectChanged:"chartLegendSelectChanged",chartLegendSelected:"chartLegendSelected",chartLegendUnselected:"chartLegendUnselected",chartLegendScroll:"chartLegendScroll",chartDataZoom:"chartDataZoom",chartDataRangeSelected:"chartDataRangeSelected",chartTimelineChanged:"chartTimelineChanged",chartTimelinePlayChanged:"chartTimelinePlayChanged",chartRestore:"chartRestore",chartDataViewChanged:"chartDataViewChanged",chartMagicTypeChanged:"chartMagicTypeChanged",chartPieSelectChanged:"chartPieSelectChanged",chartPieSelected:"chartPieSelected",chartPieUnselected:"chartPieUnselected",chartMapSelectChanged:"chartMapSelectChanged",chartMapSelected:"chartMapSelected",chartMapUnselected:"chartMapUnselected",chartAxisAreaSelected:"chartAxisAreaSelected",chartFocusNodeAdjacency:"chartFocusNodeAdjacency",chartUnfocusNodeAdjacency:"chartUnfocusNodeAdjacency",chartBrush:"chartBrush",chartBrushEnd:"chartBrushEnd",chartBrushSelected:"chartBrushSelected",chartRendered:"chartRendered",chartFinished:"chartFinished"},exportAs:["echarts"],features:[Ee]}),t}(),wT=function(){var t=function(){function t(){o(this,t)}return s(t,null,[{key:"forRoot",value:function(e){return{ngModule:t,providers:[{provide:_T,useValue:e}]}}},{key:"forChild",value:function(){return{ngModule:t}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[]]}),t}();function xT(t,e){if(1&t&&(ps(0,"div",21),ps(1,"div",11),ms(2,"img",3),ps(3,"div",12),tl(4),gs(),gs(),ps(5,"div",13),ps(6,"a",15),ps(7,"uds-translate"),tl(8,"View service pools"),gs(),gs(),gs(),gs()),2&t){var n=Ds(2);Oo(2),ds("src",n.api.staticURL("admin/img/icons/logs.png"),Er),Oo(2),nl(" ",n.data.restrained," ")}}function kT(t,e){if(1&t){var n=bs();ps(0,"div"),ps(1,"div",8),ps(2,"div",9),ps(3,"div",10),ps(4,"div",11),ms(5,"img",3),ps(6,"div",12),tl(7),gs(),gs(),ps(8,"div",13),ps(9,"a",14),ps(10,"uds-translate"),tl(11,"View authenticators"),gs(),gs(),gs(),gs(),ps(12,"div",10),ps(13,"div",11),ms(14,"img",3),ps(15,"div",12),tl(16),gs(),gs(),ps(17,"div",13),ps(18,"a",15),ps(19,"uds-translate"),tl(20,"View service pools"),gs(),gs(),gs(),gs(),ps(21,"div",10),ps(22,"div",11),ms(23,"img",3),ps(24,"div",12),tl(25),gs(),gs(),ps(26,"div",13),ps(27,"a",15),ps(28,"uds-translate"),tl(29,"View service pools"),gs(),gs(),gs(),gs(),us(30,xT,9,2,"div",16),gs(),ps(31,"div",17),ps(32,"div",18),ps(33,"div",19),ps(34,"uds-translate"),tl(35,"Assigned services chart"),gs(),gs(),ps(36,"div",20),Ss("chartInit",function(t){return rn(n),Ds().chartInit("assigned",t)}),gs(),gs(),ps(37,"div",18),ps(38,"div",19),ps(39,"uds-translate"),tl(40,"In use services chart"),gs(),gs(),ps(41,"div",20),Ss("chartInit",function(t){return rn(n),Ds().chartInit("inuse",t)}),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(5),ds("src",i.api.staticURL("admin/img/icons/authenticators.png"),Er),Oo(2),nl(" ",i.data.users," "),Oo(7),ds("src",i.api.staticURL("admin/img/icons/pools.png"),Er),Oo(2),nl(" ",i.data.pools," "),Oo(7),ds("src",i.api.staticURL("admin/img/icons/services.png"),Er),Oo(2),nl(" ",i.data.user_services," "),Oo(5),ds("ngIf",i.data.restrained),Oo(6),ds("options",i.assignedChartOpts),Oo(5),ds("options",i.inuseChartOpts)}}function ST(t,e){1&t&&(ps(0,"div",22),ps(1,"div",23),ps(2,"div",24),ps(3,"uds-translate"),tl(4,"UDS Administration"),gs(),gs(),ps(5,"div",25),ps(6,"p"),ps(7,"uds-translate"),tl(8,"You are accessing UDS Administration as staff member."),gs(),gs(),ps(9,"p"),ps(10,"uds-translate"),tl(11,"This means that you have restricted access to elements."),gs(),gs(),ps(12,"p"),ps(13,"uds-translate"),tl(14,"In order to increase your access privileges, please contact your local UDS administrator. "),gs(),gs(),ms(15,"br"),ps(16,"p"),ps(17,"uds-translate"),tl(18,"Thank you."),gs(),gs(),gs(),gs(),gs())}var CT=function(){function t(t,e){this.api=t,this.rest=e,this.data={},this.assignedChartInstance=null,this.assignedChartOpts={},this.inuseChartOpts={},this.inuseChartInstance=null}return t.prototype.onResize=function(t){this.assignedChartInstance&&this.assignedChartInstance.resize(),this.inuseChartInstance&&this.inuseChartInstance.resize()},t.prototype.ngOnInit=function(){var t=this;this.api.user.isAdmin&&this.rest.system.information().subscribe(function(e){t.data={users:django.gettext("#USR_NUMBER# users, #GRP_NUMBER# groups").replace("#USR_NUMBER#",e.users).replace("#GRP_NUMBER#",e.groups),pools:django.gettext("#POOLS_NUMBER# service pools").replace("#POOLS_NUMBER#",e.service_pools),user_services:django.gettext("#SERVICES_NUMBER# user services").replace("#SERVICES_NUMBER#",e.user_services)},e.restrained_services_pools>0&&(t.data.restrained=django.gettext("#RESTRAINED_NUMBER# restrained services!").replace("#RESTRAINED_NUMBER#",e.restrained_services_pools))});for(var e=function(e){n.rest.system.stats(e).subscribe(function(n){var i={tooltip:{trigger:"axis"},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},restore:{},saveAsImage:{}}},xAxis:{type:"category",data:n.map(function(t){return qI("SHORT_DATE_FORMAT",new Date(t.stamp))}),boundaryGap:!1},yAxis:{type:"value",boundaryGap:!1},series:[{name:"assigned"===e?django.gettext("Assigned services"):django.gettext("Services in use"),type:"line",smooth:!0,areaStyle:{},data:n.map(function(t){return t.value})}]};"assigned"===e?t.assignedChartOpts=i:t.inuseChartOpts=i})},n=this,i=0,r=["assigned","inuse"];i enter",[yb({opacity:0,transform:"translateY(-5px)"}),mb("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},WT=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t}),t}(),YT=new wi("MatHint"),qT=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-label"]]}),t}(),XT=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-placeholder"]]}),t}(),ZT=new wi("MatPrefix"),KT=new wi("MatSuffix"),$T=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["","matSuffix",""]],features:[wl([{provide:KT,useExisting:t}])]}),t}(),QT=0,JT=vk(function t(e){o(this,t),this._elementRef=e},"primary"),tD=new wi("MAT_FORM_FIELD_DEFAULT_OPTIONS"),eD=new wi("MatFormField"),nD=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c){var h;return o(this,n),(h=e.call(this,t))._elementRef=t,h._changeDetectorRef=i,h._dir=a,h._defaults=s,h._platform=l,h._ngZone=u,h._outlineGapCalculationNeededImmediately=!1,h._outlineGapCalculationNeededOnStable=!1,h._destroyed=new U,h._showAlwaysAnimate=!1,h._subscriptAnimationState="",h._hintLabel="",h._hintLabelId="mat-hint-".concat(QT++),h._labelId="mat-form-field-label-".concat(QT++),h.floatLabel=h._getDefaultFloatLabelState(),h._animationsEnabled="NoopAnimations"!==c,h.appearance=s&&s.appearance?s.appearance:"legacy",h._hideRequiredMarker=!(!s||null==s.hideRequiredMarker)&&s.hideRequiredMarker,h}return s(n,[{key:"_shouldAlwaysFloat",value:function(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}},{key:"_canLabelFloat",value:function(){return"never"!==this.floatLabel}},{key:"getLabelId",value:function(){return this._hasFloatingLabel()?this._labelId:null}},{key:"getConnectedOverlayOrigin",value:function(){return this._connectionContainerRef||this._elementRef}},{key:"ngAfterContentInit",value:function(){var t=this;this._validateControlChild();var e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-".concat(e.controlType)),e.stateChanges.pipe(zf(null)).subscribe(function(){t._validatePlaceholders(),t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(Uv(this._destroyed)).subscribe(function(){return t._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.pipe(Uv(t._destroyed)).subscribe(function(){t._outlineGapCalculationNeededOnStable&&t.updateOutlineGap()})}),dt(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(function(){t._outlineGapCalculationNeededOnStable=!0,t._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(zf(null)).subscribe(function(){t._processHints(),t._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(zf(null)).subscribe(function(){t._syncDescribedByIds(),t._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Uv(this._destroyed)).subscribe(function(){"function"==typeof requestAnimationFrame?t._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return t.updateOutlineGap()})}):t.updateOutlineGap()})}},{key:"ngAfterContentChecked",value:function(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}},{key:"ngAfterViewInit",value:function(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_shouldForward",value:function(t){var e=this._control?this._control.ngControl:null;return e&&e[t]}},{key:"_hasPlaceholder",value:function(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}},{key:"_hasLabel",value:function(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}},{key:"_shouldLabelFloat",value:function(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}},{key:"_hideControlPlaceholder",value:function(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}},{key:"_hasFloatingLabel",value:function(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}},{key:"_getDisplayedMessages",value:function(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}},{key:"_animateAndLockLabel",value:function(){var t=this;this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,bv(this._label.nativeElement,"transitionend").pipe(Nf(1)).subscribe(function(){t._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}},{key:"_validatePlaceholders",value:function(){}},{key:"_processHints",value:function(){this._validateHints(),this._syncDescribedByIds()}},{key:"_validateHints",value:function(){}},{key:"_getDefaultFloatLabelState",value:function(){return this._defaults&&this._defaults.floatLabel||"auto"}},{key:"_syncDescribedByIds",value:function(){if(this._control){var t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push.apply(t,b(this._control.userAriaDescribedBy.split(" "))),"hint"===this._getDisplayedMessages()){var e=this._hintChildren?this._hintChildren.find(function(t){return"start"===t.align}):null,n=this._hintChildren?this._hintChildren.find(function(t){return"end"===t.align}):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),n&&t.push(n.id)}else this._errorChildren&&t.push.apply(t,b(this._errorChildren.map(function(t){return t.id})));this._control.setDescribedByIds(t)}}},{key:"_validateControlChild",value:function(){}},{key:"updateOutlineGap",value:function(){var t=this._label?this._label.nativeElement:null;if("outline"===this.appearance&&t&&t.children.length&&t.textContent.trim()&&this._platform.isBrowser)if(this._isAttachedToDOM()){var e=0,n=0,i=this._connectionContainerRef.nativeElement,r=i.querySelectorAll(".mat-form-field-outline-start"),o=i.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){var a=i.getBoundingClientRect();if(0===a.width&&0===a.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);for(var s=this._getStartEnd(a),l=t.children,u=this._getStartEnd(l[0].getBoundingClientRect()),c=0,h=0;h0?.75*c+10:0}for(var d=0;d void",kb("@transformPanel",[xb()],{optional:!0}))]),transformPanel:gb("transformPanel",[_b("void",yb({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),_b("showing",yb({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),_b("showing-multiple",yb({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),wb("void => *",mb("120ms cubic-bezier(0, 0, 0.2, 1)")),wb("* => void",mb("100ms 25ms linear",yb({opacity:0})))])},pD=0,gD=256,mD=new wi("mat-select-scroll-strategy"),vD=new wi("MAT_SELECT_CONFIG"),yD={provide:mD,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},_D=function t(e,n){o(this,t),this.source=e,this.value=n},bD=yk(_k(mk(bk(function t(e,n,i,r,a){o(this,t),this._elementRef=e,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=r,this.ngControl=a})))),wD=new wi("MatSelectTrigger"),xD=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-select-trigger"]],features:[wl([{provide:wD,useExisting:t}])]}),t}(),kD=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c,h,f,p,g,m,v){var y,_,w,x;return o(this,n),(y=e.call(this,s,a,u,c,f))._viewportRuler=t,y._changeDetectorRef=i,y._ngZone=r,y._dir=l,y._parentFormField=h,y.ngControl=f,y._liveAnnouncer=m,y._defaultOptions=v,y._panelOpen=!1,y._compareWith=function(t,e){return t===e},y._uid="mat-select-".concat(pD++),y._triggerAriaLabelledBy=null,y._destroy=new U,y._onChange=function(){},y._onTouched=function(){},y._valueId="mat-select-value-".concat(pD++),y._panelDoneAnimatingStream=new U,y._overlayPanelClass=(null===(_=y._defaultOptions)||void 0===_?void 0:_.overlayPanelClass)||"",y._focused=!1,y.controlType="mat-select",y._required=!1,y._multiple=!1,y._disableOptionCentering=null!==(x=null===(w=y._defaultOptions)||void 0===w?void 0:w.disableOptionCentering)&&void 0!==x&&x,y.ariaLabel="",y.optionSelectionChanges=Ef(function(){var t=y.options;return t?t.changes.pipe(zf(t),Of(function(){return dt.apply(void 0,b(t.map(function(t){return t.onSelectionChange})))})):y._ngZone.onStable.pipe(Nf(1),Of(function(){return y.optionSelectionChanges}))}),y.openedChange=new Bu,y._openedStream=y.openedChange.pipe(Ld(function(t){return t}),q(function(){})),y._closedStream=y.openedChange.pipe(Ld(function(t){return!t}),q(function(){})),y.selectionChange=new Bu,y.valueChange=new Bu,y.ngControl&&(y.ngControl.valueAccessor=d(y)),null!=(null==v?void 0:v.typeaheadDebounceInterval)&&(y._typeaheadDebounceInterval=v.typeaheadDebounceInterval),y._scrollStrategyFactory=g,y._scrollStrategy=y._scrollStrategyFactory(),y.tabIndex=parseInt(p)||0,y.id=y.id,y}return s(n,[{key:"ngOnInit",value:function(){var t=this;this._selectionModel=new py(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Pv(),Uv(this._destroy)).subscribe(function(){return t._panelDoneAnimating(t.panelOpen)})}},{key:"ngAfterContentInit",value:function(){var t=this;this._initKeyManager(),this._selectionModel.changed.pipe(Uv(this._destroy)).subscribe(function(t){t.added.forEach(function(t){return t.select()}),t.removed.forEach(function(t){return t.deselect()})}),this.options.changes.pipe(zf(null),Uv(this._destroy)).subscribe(function(){t._resetOptions(),t._initializeSelection()})}},{key:"ngDoCheck",value:function(){var t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){var e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}},{key:"ngOnDestroy",value:function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}},{key:"toggle",value:function(){this.panelOpen?this.close():this.open()}},{key:"open",value:function(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}},{key:"close",value:function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}},{key:"writeValue",value:function(t){this.value=t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}},{key:"_handleClosedKeydown",value:function(t){var e=t.keyCode,n=e===zy||e===Fy||e===Ny||e===Vy,i=e===Ey||e===Py,r=this._keyManager;if(!r.isTyping()&&i&&!By(t)||(this.multiple||t.altKey)&&n)t.preventDefault(),this.open();else if(!this.multiple){var o=this.selected;r.onKeydown(t);var a=this.selected;a&&o!==a&&this._liveAnnouncer.announce(a.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(t){var e=this._keyManager,n=t.keyCode,i=n===zy||n===Fy,r=e.isTyping();if(i&&t.altKey)t.preventDefault(),this.close();else if(r||n!==Ey&&n!==Py||!e.activeItem||By(t))if(!r&&this._multiple&&65===n&&t.ctrlKey){t.preventDefault();var o=this.options.some(function(t){return!t.disabled&&!t.selected});this.options.forEach(function(t){t.disabled||(o?t.select():t.deselect())})}else{var a=e.activeItemIndex;e.onKeydown(t),this._multiple&&i&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==a&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}},{key:"_onFocus",value:function(){this.disabled||(this._focused=!0,this.stateChanges.next())}},{key:"_onBlur",value:function(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}},{key:"_onAttached",value:function(){var t=this;this.overlayDir.positionChange.pipe(Nf(1)).subscribe(function(){t._changeDetectorRef.detectChanges(),t._positioningSettled()})}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-".concat(this._parentFormField.color):""}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then(function(){t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value),t.stateChanges.next()})}},{key:"_setSelectionByValue",value:function(t){var e=this;if(this._selectionModel.selected.forEach(function(t){return t.setInactiveStyles()}),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(function(t){return e._selectValue(t)}),this._sortValues();else{var n=this._selectValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(t){var e=this,n=this.options.find(function(n){if(e._selectionModel.isSelected(n))return!1;try{return null!=n.value&&e._compareWith(n.value,t)}catch(i){return!1}});return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var t=this;this._keyManager=new H_(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Uv(this._destroy)).subscribe(function(){t.panelOpen&&(!t.multiple&&t._keyManager.activeItem&&t._keyManager.activeItem._selectViaInteraction(),t.focus(),t.close())}),this._keyManager.change.pipe(Uv(this._destroy)).subscribe(function(){t._panelOpen&&t.panel?t._scrollOptionIntoView(t._keyManager.activeItemIndex||0):t._panelOpen||t.multiple||!t._keyManager.activeItem||t._keyManager.activeItem._selectViaInteraction()})}},{key:"_resetOptions",value:function(){var t=this,e=dt(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Uv(e)).subscribe(function(e){t._onSelect(e.source,e.isUserInput),e.isUserInput&&!t.multiple&&t._panelOpen&&(t.close(),t.focus())}),dt.apply(void 0,b(this.options.map(function(t){return t._stateChanges}))).pipe(Uv(e)).subscribe(function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()})}},{key:"_onSelect",value:function(t,e){var n=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(n!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),n!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;if(this.multiple){var e=this.options.toArray();this._selectionModel.sort(function(n,i){return t.sortComparator?t.sortComparator(n,i,e):e.indexOf(n)-e.indexOf(i)}),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(t){var e;e=this.multiple?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(this._getChangeEvent(e)),this._changeDetectorRef.markForCheck()}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_canOpen",value:function(){var t;return!this._panelOpen&&!this.disabled&&(null===(t=this.options)||void 0===t?void 0:t.length)>0}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_getPanelAriaLabelledby",value:function(){var t;if(this.ariaLabel)return null;var e=null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_getTriggerAriaLabelledby",value:function(){var t;if(this.ariaLabel)return null;var e=null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId(),n=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(n+=" "+this.ariaLabelledby),n}},{key:"_panelDoneAnimating",value:function(t){this.openedChange.emit(t)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"focused",get:function(){return this._focused||this._panelOpen}},{key:"placeholder",get:function(){return this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=fv(t)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(t){this._disableOptionCentering=fv(t)}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(t){this._typeaheadDebounceInterval=pv(t)}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid,this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var t=this._selectionModel.selected.map(function(t){return t.viewValue});return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}]),n}(bD);return t.\u0275fac=function(e){return new(e||t)(hs(vy),hs(eu),hs(Mc),hs(Lk),hs(Tl),hs(uy,8),hs(QC,8),hs(lA,8),hs(eD,8),hs(SC,10),yi("tabindex"),hs(mD),hs($_),hs(vD,8))},t.\u0275dir=ve({type:t,viewQuery:function(t,e){var n;1&t&&(Ju(rD,1),Ju(oD,1),Ju(__,1)),2&t&&(Qu(n=ec())&&(e.trigger=n.first),Qu(n=ec())&&(e.panel=n.first),Qu(n=ec())&&(e.overlayDir=n.first))},inputs:{ariaLabel:["aria-label","ariaLabel"],id:"id",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",typeaheadDebounceInterval:"typeaheadDebounceInterval",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[Xa,Ee]}),t}(),SD=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._scrollTop=0,t._triggerFontSize=0,t._transformOrigin="top",t._offsetY=0,t._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],t}return s(n,[{key:"_calculateOverlayScroll",value:function(t,e,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*t-e+i/2),n)}},{key:"ngOnInit",value:function(){var t=this;r(i(n.prototype),"ngOnInit",this).call(this),this._viewportRuler.change().pipe(Uv(this._destroy)).subscribe(function(){t.panelOpen&&(t._triggerRect=t.trigger.nativeElement.getBoundingClientRect(),t._changeDetectorRef.markForCheck())})}},{key:"open",value:function(){var t=this;r(i(n.prototype),"_canOpen",this).call(this)&&(r(i(n.prototype),"open",this).call(this),this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._calculateOverlayPosition(),this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize="".concat(t._triggerFontSize,"px"))}))}},{key:"_scrollOptionIntoView",value:function(t){var e=rS(t,this.options,this.optionGroups),n=this._getItemHeight();this.panel.nativeElement.scrollTop=oS((t+e)*n,n,this.panel.nativeElement.scrollTop,gD)}},{key:"_positioningSettled",value:function(){this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop}},{key:"_panelDoneAnimating",value:function(t){this.panelOpen?this._scrollTop=0:(this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck()),r(i(n.prototype),"_panelDoneAnimating",this).call(this,t)}},{key:"_getChangeEvent",value:function(t){return new _D(this,t)}},{key:"_calculateOverlayOffsetX",value:function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),r=this.multiple?56:32;if(this.multiple)t=40;else if(this.disableOptionCentering)t=16;else{var o=this._selectionModel.selected[0]||this.options.first;t=o&&o.group?32:16}i||(t*=-1);var a=0-(e.left+t-(i?r:0)),s=e.right+t-n.width+(i?0:r);a>0?t+=a+8:s>0&&(t-=s+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(t,e,n){var i,r=this._getItemHeight(),o=(r-this._triggerRect.height)/2,a=Math.floor(gD/r);return this.disableOptionCentering?0:(i=0===this._scrollTop?t*r:this._scrollTop===n?(t-(this._getItemCount()-a))*r+(r-(this._getItemCount()*r-gD)%r):e-r/2,Math.round(-1*i-o))}},{key:"_checkOverlayWithinViewport",value:function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,r=n.height-this._triggerRect.bottom-8,o=Math.abs(this._offsetY),a=Math.min(this._getItemCount()*e,gD)-o-this._triggerRect.height;a>r?this._adjustPanelUp(a,r):o>i?this._adjustPanelDown(o,i,t):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(t,e,n){var i=Math.round(t-e);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_calculateOverlayPosition",value:function(){var t,e=this._getItemHeight(),n=this._getItemCount(),i=Math.min(n*e,gD),r=n*e-i;t=this.empty?0:Math.max(this.options.toArray().indexOf(this._selectionModel.selected[0]),0),t+=rS(t,this.options,this.optionGroups);var o=i/2;this._scrollTop=this._calculateOverlayScroll(t,o,r),this._offsetY=this._calculateOverlayOffsetY(t,o,r),this._checkOverlayWithinViewport(r)}},{key:"_getOriginBasedOnOption",value:function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2,n=Math.abs(this._offsetY)-e+t/2;return"50% ".concat(n,"px 0px")}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}}]),n}(kD);return t.\u0275fac=function(e){return CD(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,wD,1),tc(n,iS,1),tc(n,Jk,1)),2&t&&(Qu(i=ec())&&(e.customTrigger=i.first),Qu(i=ec())&&(e.options=i),Qu(i=ec())&&(e.optionGroups=i))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&Ss("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e._onFocus()})("blur",function(){return e._onBlur()}),2&t&&(ss("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),Gs("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matSelect"],features:[wl([{provide:WT,useExisting:t},{provide:Zk,useExisting:t}]),Xa],ngContentSelectors:dD,decls:9,vars:12,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder mat-select-min-line",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder","mat-select-min-line"],[1,"mat-select-value-text",3,"ngSwitch"],["class","mat-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-min-line"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(Os(hD),ps(0,"div",0,1),Ss("click",function(){return e.toggle()}),ps(3,"div",2),us(4,aD,2,1,"span",3),us(5,uD,3,2,"span",4),gs(),ps(6,"div",5),ms(7,"div",6),gs(),gs(),us(8,cD,4,14,"ng-template",7),Ss("backdropClick",function(){return e.close()})("attach",function(){return e._onAttached()})("detach",function(){return e.close()})),2&t){var n=cs(1);ss("aria-owns",e.panelOpen?e.id+"-panel":null),Oo(3),ds("ngSwitch",e.empty),ss("id",e._valueId),Oo(1),ds("ngSwitchCase",!0),Oo(1),ds("ngSwitchCase",!1),Oo(3),ds("cdkConnectedOverlayPanelClass",e._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[y_,zh,Bh,__,Hh,Eh],styles:['.mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px;outline:0}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}.mat-select-min-line:empty::before{content:" ";white-space:pre;width:1px}\n'],encapsulation:2,data:{animation:[fD.transformPanelWrap,fD.transformPanel]},changeDetection:0}),t}(),CD=mi(SD),AD=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[yD],imports:[[Kh,w_,aS,gk],yy,iD,aS,gk]}),t}(),MD={tooltipState:gb("state",[_b("initial, void, hidden",yb({opacity:0,transform:"scale(0)"})),_b("visible",yb({transform:"scale(1)"})),wb("* => visible",mb("200ms cubic-bezier(0, 0, 0.2, 1)",bb([yb({opacity:0,transform:"scale(0)",offset:0}),yb({opacity:.5,transform:"scale(0.99)",offset:.5}),yb({opacity:1,transform:"scale(1)",offset:1})]))),wb("* => hidden",mb("100ms cubic-bezier(0, 0, 0.2, 1)",yb({opacity:0})))])},ID=oy({passive:!0}),TD=new wi("mat-tooltip-scroll-strategy"),DD={provide:TD,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},ED=new wi("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),OD=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d,f){var p=this;o(this,t),this._overlay=e,this._elementRef=n,this._scrollDispatcher=i,this._viewContainerRef=r,this._ngZone=a,this._platform=s,this._ariaDescriber=l,this._focusMonitor=u,this._dir=h,this._defaultOptions=d,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new U,this._handleKeydown=function(t){p._isTooltipVisible()&&t.keyCode===Oy&&!By(t)&&(t.preventDefault(),t.stopPropagation(),p._ngZone.run(function(){return p.hide(0)}))},this._scrollStrategy=c,d&&(d.position&&(this.position=d.position),d.touchGestures&&(this.touchGestures=d.touchGestures)),a.runOutsideAngular(function(){n.nativeElement.addEventListener("keydown",p._handleKeydown)})}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this;this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Uv(this._destroyed)).subscribe(function(e){e?"keyboard"===e&&t._ngZone.run(function(){return t.show()}):t._ngZone.run(function(){return t.hide(0)})})}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(function(e){var n=y(e,2);t.removeEventListener(n[0],n[1],ID)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new wy(PD,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Uv(this._destroyed)).subscribe(function(){return t._detach()}),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(e)}}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(t)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(e);return n.positionChanges.pipe(Uv(this._destroyed)).subscribe(function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run(function(){return t.hide(0)})}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Uv(this._destroyed)).subscribe(function(){return t._detach()}),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),n.main),Object.assign(Object.assign({},e.fallback),n.fallback)])}},{key:"_getOrigin",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n||"below"==n?t={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={originX:"start",originY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={originX:"end",originY:"center"});var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}}},{key:"_getOverlayPosition",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n?t={overlayX:"center",overlayY:"bottom"}:"below"==n?t={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={overlayX:"start",overlayY:"center"});var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}}},{key:"_updateTooltipMessage",value:function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Nf(1),Uv(this._destroyed)).subscribe(function(){t._tooltipInstance&&t._overlayRef.updatePosition()}))}},{key:"_setTooltipClass",value:function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}},{key:"_setupPointerEnterEventsIfNeeded",value:function(){var t=this;!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",function(){t._setupPointerExitEventsIfNeeded(),t.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",function(){t._setupPointerExitEventsIfNeeded(),clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout(function(){return t.show()},500)}])),this._addListeners(this._passiveListeners))}},{key:"_setupPointerExitEventsIfNeeded",value:function(){var t,e=this;if(!this._pointerExitEventsInitialized){this._pointerExitEventsInitialized=!0;var n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",function(){return e.hide()}],["wheel",function(t){return e._wheelListener(t)}]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var i=function(){clearTimeout(e._touchstartTimeout),e.hide(e._defaultOptions.touchendHideDelay)};n.push(["touchend",i],["touchcancel",i])}this._addListeners(n),(t=this._passiveListeners).push.apply(t,n)}}},{key:"_addListeners",value:function(t){var e=this;t.forEach(function(t){var n=y(t,2);e._elementRef.nativeElement.addEventListener(n[0],n[1],ID)})}},{key:"_platformSupportsMouseEvents",value:function(){return!this._platform.IOS&&!this._platform.ANDROID}},{key:"_wheelListener",value:function(t){if(this._isTooltipVisible()){var e=(this._document||document).elementFromPoint(t.clientX,t.clientY),n=this._elementRef.nativeElement;e===n||n.contains(e)||this.hide()}}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this.touchGestures;if("off"!==t){var e=this._elementRef.nativeElement,n=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),"on"!==t&&e.draggable||(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}},{key:"position",get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=fv(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}},{key:"message",get:function(){return this._message},set:function(t){var e=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(function(){Promise.resolve().then(function(){e._ariaDescriber.describe(e._elementRef.nativeElement,e.message,"tooltip")})}))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(Tl),hs(my),hs(pu),hs(Mc),hs(ey),hs(F_),hs(ib),hs(TD),hs(uy,8),hs(ED,8),hs(uh))},t.\u0275dir=ve({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t}(),PD=function(){var t=function(){function t(e,n){o(this,t),this._changeDetectorRef=e,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new U,this._isHandset=this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)")}return s(t,[{key:"show",value:function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()},t)}},{key:"hide",value:function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()},t)}},{key:"afterHidden",value:function(){return this._onHide}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs($M))},t.\u0275cmp=he({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&Ss("click",function(){return e._handleBodyInteraction()},!1,Br)("auxclick",function(){return e._handleBodyInteraction()},!1,Br),2&t&&js("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var n;1&t&&(ps(0,"div",0),Ss("@state.start",function(){return e._animationStart()})("@state.done",function(t){return e._animationDone(t)}),Ru(1,"async"),tl(2),gs()),2&t&&(Gs("mat-tooltip-handset",null==(n=Lu(1,5,e._isHandset))?null:n.matches),ds("ngClass",e.tooltipClass)("@state",e._visibility),Oo(2),el(e.message))},directives:[Eh],pipes:[Yh],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[MD.tooltipState]},changeDetection:0}),t}(),RD=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[DD],imports:[[cb,Kh,w_,gk],gk,yy]}),t}();function LD(t,e){if(1&t&&(ps(0,"mat-option",19),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n),Oo(1),nl(" ",n," ")}}function ND(t,e){if(1&t){var n=bs();ps(0,"mat-form-field",16),ps(1,"mat-select",17),Ss("selectionChange",function(t){return rn(n),Ds(2)._changePageSize(t.value)}),us(2,LD,2,2,"mat-option",18),gs(),gs()}if(2&t){var i=Ds(2);ds("appearance",i._formFieldAppearance)("color",i.color),Oo(1),ds("value",i.pageSize)("disabled",i.disabled)("aria-label",i._intl.itemsPerPageLabel),Oo(1),ds("ngForOf",i._displayedPageSizeOptions)}}function FD(t,e){if(1&t&&(ps(0,"div",20),tl(1),gs()),2&t){var n=Ds(2);Oo(1),el(n.pageSize)}}function VD(t,e){if(1&t&&(ps(0,"div",12),ps(1,"div",13),tl(2),gs(),us(3,ND,3,6,"mat-form-field",14),us(4,FD,2,1,"div",15),gs()),2&t){var n=Ds();Oo(2),nl(" ",n._intl.itemsPerPageLabel," "),Oo(1),ds("ngIf",n._displayedPageSizeOptions.length>1),Oo(1),ds("ngIf",n._displayedPageSizeOptions.length<=1)}}function zD(t,e){if(1&t){var n=bs();ps(0,"button",21),Ss("click",function(){return rn(n),Ds().firstPage()}),On(),ps(1,"svg",7),ms(2,"path",22),gs(),gs()}if(2&t){var i=Ds();ds("matTooltip",i._intl.firstPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),ss("aria-label",i._intl.firstPageLabel)}}function BD(t,e){if(1&t){var n=bs();On(),Pn(),ps(0,"button",23),Ss("click",function(){return rn(n),Ds().lastPage()}),On(),ps(1,"svg",7),ms(2,"path",24),gs(),gs()}if(2&t){var i=Ds();ds("matTooltip",i._intl.lastPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),ss("aria-label",i._intl.lastPageLabel)}}var HD=function(){var t=function t(){o(this,t),this.changes=new U,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=function(t,e,n){if(0==n||0==e)return"0 of ".concat(n);var i=t*e,r=i<(n=Math.max(n,0))?Math.min(i+e,n):i+e;return"".concat(i+1," \u2013 ").concat(r," of ").concat(n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),jD={provide:HD,deps:[[new qi,new Xi,HD]],useFactory:function(t){return t||new HD}},GD=new wi("MAT_PAGINATOR_DEFAULT_OPTIONS"),UD=mk(wk(function t(){o(this,t)})),WD=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;if(o(this,n),(a=e.call(this))._intl=t,a._changeDetectorRef=i,a._pageIndex=0,a._length=0,a._pageSizeOptions=[],a._hidePageSize=!1,a._showFirstLastButtons=!1,a.page=new Bu,a._intlChanges=t.changes.subscribe(function(){return a._changeDetectorRef.markForCheck()}),r){var s=r.pageSize,l=r.pageSizeOptions,u=r.hidePageSize,c=r.showFirstLastButtons;null!=s&&(a._pageSize=s),null!=l&&(a._pageSizeOptions=l),null!=u&&(a._hidePageSize=u),null!=c&&(a._showFirstLastButtons=c)}return a}return s(n,[{key:"ngOnInit",value:function(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}},{key:"ngOnDestroy",value:function(){this._intlChanges.unsubscribe()}},{key:"nextPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}}},{key:"previousPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}}},{key:"firstPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}}},{key:"lastPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}}},{key:"hasPreviousPage",value:function(){return this.pageIndex>=1&&0!=this.pageSize}},{key:"hasNextPage",value:function(){var t=this.getNumberOfPages()-1;return this.pageIndex=o.length&&(a=0),o[a]}},{key:"ngOnInit",value:function(){this._markInitialized()}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"direction",get:function(){return this._direction},set:function(t){this._direction=t}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=fv(t)}}]),n}(QD);return t.\u0275fac=function(e){return new(e||t)(hs($D,8))},t.\u0275dir=ve({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[Xa,Ee]}),t}(),tE=dk.ENTERING+" "+hk.STANDARD_CURVE,eE={indicator:gb("indicator",[_b("active-asc, asc",yb({transform:"translateY(0px)"})),_b("active-desc, desc",yb({transform:"translateY(10px)"})),wb("active-asc <=> active-desc",mb(tE))]),leftPointer:gb("leftPointer",[_b("active-asc, asc",yb({transform:"rotate(-45deg)"})),_b("active-desc, desc",yb({transform:"rotate(45deg)"})),wb("active-asc <=> active-desc",mb(tE))]),rightPointer:gb("rightPointer",[_b("active-asc, asc",yb({transform:"rotate(45deg)"})),_b("active-desc, desc",yb({transform:"rotate(-45deg)"})),wb("active-asc <=> active-desc",mb(tE))]),arrowOpacity:gb("arrowOpacity",[_b("desc-to-active, asc-to-active, active",yb({opacity:1})),_b("desc-to-hint, asc-to-hint, hint",yb({opacity:.54})),_b("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",yb({opacity:0})),wb("* => asc, * => desc, * => active, * => hint, * => void",mb("0ms")),wb("* <=> *",mb(tE))]),arrowPosition:gb("arrowPosition",[wb("* => desc-to-hint, * => desc-to-active",mb(tE,bb([yb({transform:"translateY(-25%)"}),yb({transform:"translateY(0)"})]))),wb("* => hint-to-desc, * => active-to-desc",mb(tE,bb([yb({transform:"translateY(0)"}),yb({transform:"translateY(25%)"})]))),wb("* => asc-to-hint, * => asc-to-active",mb(tE,bb([yb({transform:"translateY(25%)"}),yb({transform:"translateY(0)"})]))),wb("* => hint-to-asc, * => active-to-asc",mb(tE,bb([yb({transform:"translateY(0)"}),yb({transform:"translateY(-25%)"})]))),_b("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",yb({transform:"translateY(0)"})),_b("hint-to-desc, active-to-desc, desc",yb({transform:"translateY(-25%)"})),_b("hint-to-asc, active-to-asc, asc",yb({transform:"translateY(25%)"}))]),allowChildren:gb("allowChildren",[wb("* <=> *",[kb("@*",xb(),{optional:!0})])])},nE=function(){var t=function t(){o(this,t),this.changes=new U,this.sortButtonLabel=function(t){return"Change sorting for ".concat(t)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),iE={provide:nE,deps:[[new qi,new Xi,nE]],useFactory:function(t){return t||new nE}},rE=mk(function t(){o(this,t)}),oE=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this))._intl=t,u._changeDetectorRef=i,u._sort=r,u._columnDef=a,u._focusMonitor=s,u._elementRef=l,u._showIndicatorHint=!1,u._arrowDirection="",u._disableViewStateAnimation=!1,u.arrowPosition="after",u._handleStateChanges(),u}return s(n,[{key:"ngOnInit",value:function(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){var n=!!e;n!==t._showIndicatorHint&&(t._setIndicatorHintVisible(n),t._changeDetectorRef.markForCheck())})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}},{key:"_setIndicatorHintVisible",value:function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}},{key:"_setAnimationTransitionState",value:function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}},{key:"_toggleOnInteraction",value:function(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0)}},{key:"_handleClick",value:function(){this._isDisabled()||this._sort.sort(this)}},{key:"_handleKeydown",value:function(t){this._isDisabled()||t.keyCode!==Py&&t.keyCode!==Ey||(t.preventDefault(),this._toggleOnInteraction())}},{key:"_isSorted",value:function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}},{key:"_getArrowDirectionState",value:function(){return"".concat(this._isSorted()?"active-":"").concat(this._arrowDirection)}},{key:"_getArrowViewState",value:function(){var t=this._viewState.fromState;return(t?"".concat(t,"-to-"):"")+this._viewState.toState}},{key:"_updateArrowDirection",value:function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}},{key:"_isDisabled",value:function(){return this._sort.disabled||this.disabled}},{key:"_getAriaSortAttribute",value:function(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}},{key:"_renderArrow",value:function(){return!this._isDisabled()||this._isSorted()}},{key:"_handleStateChanges",value:function(){var t=this;this._rerenderSubscription=dt(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(function(){t._isSorted()&&(t._updateArrowDirection(),"hint"!==t._viewState.toState&&"active"!==t._viewState.toState||(t._disableViewStateAnimation=!0),t._setAnimationTransitionState({fromState:t._arrowDirection,toState:"active"}),t._showIndicatorHint=!1),!t._isSorted()&&t._viewState&&"active"===t._viewState.toState&&(t._disableViewStateAnimation=!1,t._setAnimationTransitionState({fromState:"active",toState:t._arrowDirection})),t._changeDetectorRef.markForCheck()})}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=fv(t)}}]),n}(rE);return t.\u0275fac=function(e){return new(e||t)(hs(nE),hs(eu),hs(JD,8),hs("MAT_SORT_HEADER_COLUMN_DEF",8),hs(ib),hs(Tl))},t.\u0275cmp=he({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&Ss("click",function(){return e._handleClick()})("keydown",function(t){return e._handleKeydown(t)})("mouseenter",function(){return e._setIndicatorHintVisible(!0)})("mouseleave",function(){return e._setIndicatorHintVisible(!1)}),2&t&&(ss("aria-sort",e._getAriaSortAttribute()),Gs("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[Xa],attrs:XD,ngContentSelectors:KD,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(Os(),ps(0,"div",0),ps(1,"div",1),Ps(2),gs(),us(3,ZD,6,6,"div",2),gs()),2&t&&(Gs("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),ss("tabindex",e._isDisabled()?null:0),Oo(3),ds("ngIf",e._renderArrow()))},directives:[Lh],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[eE.indicator,eE.leftPointer,eE.rightPointer,eE.arrowOpacity,eE.arrowPosition,eE.allowChildren]},changeDetection:0}),t}(),aE=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[iE],imports:[[Kh,gk]]}),t}(),sE=[[["caption"]],[["colgroup"],["col"]]],lE=["caption","colgroup, col"];function uE(t){return function(t){u(n,t);var e=p(n);function n(){var t;o(this,n);for(var i=arguments.length,r=new Array(i),a=0;a4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=arguments.length>6?arguments[6]:void 0;o(this,t),this._isNativeHtmlTable=e,this._stickCellCss=n,this.direction=i,this._coalescedStyleScheduler=r,this._isBrowser=a,this._needsPositionStickyOnElement=s,this._positionListener=l,this._cachedCellWidths=[],this._borderCellCss={top:"".concat(n,"-border-elem-top"),bottom:"".concat(n,"-border-elem-bottom"),left:"".concat(n,"-border-elem-left"),right:"".concat(n,"-border-elem-right")}}return s(t,[{key:"clearStickyPositioning",value:function(t,e){var n,i=this,r=[],o=v(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;if(a.nodeType===a.ELEMENT_NODE){r.push(a);for(var s=0;s3&&void 0!==arguments[3])||arguments[3];if(t.length&&this._isBrowser&&(e.some(function(t){return t})||n.some(function(t){return t}))){var o=t[0],a=o.children.length,s=this._getCellWidths(o,r),l=this._getStickyStartColumnPositions(s,e),u=this._getStickyEndColumnPositions(s,n),c=e.lastIndexOf(!0),h=n.indexOf(!0);this._scheduleStyleChanges(function(){var r,o="rtl"===i.direction,d=o?"right":"left",f=o?"left":"right",p=v(t);try{for(p.s();!(r=p.n()).done;)for(var g=r.value,m=0;m1&&void 0!==arguments[1])||arguments[1];if(!e&&this._cachedCellWidths.length)return this._cachedCellWidths;for(var n=[],i=t.children,r=0;r0;r--)e[r]&&(n[r]=i,i+=t[r]);return n}},{key:"_scheduleStyleChanges",value:function(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}]),t}(),RE=new wi("CDK_SPL"),LE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","rowOutlet",""]]}),t}(),NE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","headerRowOutlet",""]]}),t}(),FE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","footerRowOutlet",""]]}),t}(),VE=function(){var t=function t(e,n){o(this,t),this.viewContainer=e,this.elementRef=n};return t.\u0275fac=function(e){return new(e||t)(hs(pu),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","noDataRowOutlet",""]]}),t}(),zE=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d){o(this,t),this._differs=e,this._changeDetectorRef=n,this._elementRef=i,this._dir=a,this._platform=l,this._viewRepeater=u,this._coalescedStyleScheduler=c,this._stickyPositioningListener=h,this._viewportRuler=d,this._onDestroy=new U,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.viewChange=new yf({start:0,end:Number.MAX_VALUE}),r||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return s(t,[{key:"ngOnInit",value:function(){var t=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create(function(e,n){return t.trackBy?t.trackBy(n.dataIndex,n.data):n}),this._viewportRuler&&this._viewportRuler.change().pipe(Uv(this._onDestroy)).subscribe(function(){t._forceRecalculateCellWidths=!0})}},{key:"ngAfterContentChecked",value:function(){this._cacheRowDefs(),this._cacheColumnDefs();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||t,this._forceRecalculateCellWidths=t,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}},{key:"ngOnDestroy",value:function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),dy(this.dataSource)&&this.dataSource.disconnect(this)}},{key:"renderRows",value:function(){var t=this;this._renderRows=this._getAllRenderRows();var e=this._dataDiffer.diff(this._renderRows);if(e){var n=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(e,n,function(e,n,i){return t._getEmbeddedViewArgs(e.item,i)},function(t){return t.item.data},function(e){1===e.operation&&e.context&&t._renderCellTemplateForItem(e.record.item.rowDef,e.context)}):e.forEachOperation(function(e,i,r){if(null==e.previousIndex){var o=e.item;t._renderRow(t._rowOutlet,o.rowDef,r,{$implicit:o.data})}else if(null==r)n.remove(i);else{var a=n.get(i);n.move(a,r)}}),this._updateRowIndexContext(),e.forEachIdentityChange(function(t){n.get(t.currentIndex).context.$implicit=t.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()}},{key:"addColumnDef",value:function(t){this._customColumnDefs.add(t)}},{key:"removeColumnDef",value:function(t){this._customColumnDefs.delete(t)}},{key:"addRowDef",value:function(t){this._customRowDefs.add(t)}},{key:"removeRowDef",value:function(t){this._customRowDefs.delete(t)}},{key:"addHeaderRowDef",value:function(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}},{key:"removeHeaderRowDef",value:function(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}},{key:"addFooterRowDef",value:function(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}},{key:"removeFooterRowDef",value:function(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}},{key:"setNoDataRow",value:function(t){this._customNoDataRow=t}},{key:"updateStickyHeaderRowStyles",value:function(){var t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");var n=this._headerRowDefs.map(function(t){return t.sticky});this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach(function(t){return t.resetStickyChanged()})}},{key:"updateStickyFooterRowStyles",value:function(){var t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");var n=this._footerRowDefs.map(function(t){return t.sticky});this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(function(t){return t.resetStickyChanged()})}},{key:"updateStickyColumnStyles",value:function(){var t=this,e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([].concat(b(e),b(n),b(i)),["left","right"]),this._stickyColumnStylesNeedReset=!1),e.forEach(function(e,n){t._addStickyColumnStyles([e],t._headerRowDefs[n])}),this._rowDefs.forEach(function(e){for(var i=[],r=0;r0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach(function(e,n){return t._renderRow(t._headerRowOutlet,e,n)}),this.updateStickyHeaderRowStyles()}},{key:"_forceRenderFooterRows",value:function(){var t=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach(function(e,n){return t._renderRow(t._footerRowOutlet,e,n)}),this.updateStickyFooterRowStyles()}},{key:"_addStickyColumnStyles",value:function(t,e){var n=this,i=Array.from(e.columns||[]).map(function(t){return n._columnDefsByName.get(t)}),r=i.map(function(t){return t.sticky}),o=i.map(function(t){return t.stickyEnd});this._stickyStyler.updateStickyColumns(t,r,o,!this._fixedLayout||this._forceRecalculateCellWidths)}},{key:"_getRenderedRows",value:function(t){for(var e=[],n=0;n3&&void 0!==arguments[3]?arguments[3]:{},r=t.viewContainer.createEmbeddedView(e.template,i,n);return this._renderCellTemplateForItem(e,i),r}},{key:"_renderCellTemplateForItem",value:function(t,e){var n,i=v(this._getCellTemplates(t));try{for(i.s();!(n=i.n()).done;)IE.mostRecentCellOutlet&&IE.mostRecentCellOutlet._viewContainer.createEmbeddedView(n.value,e)}catch(r){i.e(r)}finally{i.f()}this._changeDetectorRef.markForCheck()}},{key:"_updateRowIndexContext",value:function(){for(var t=this._rowOutlet.viewContainer,e=0,n=t.length;e0&&void 0!==arguments[0]?arguments[0]:[];return o(this,n),(t=e.call(this))._renderData=new yf([]),t._filter=new yf(""),t._internalPageChanges=new U,t._renderChangesSubscription=null,t.sortingDataAccessor=function(t,e){var n=t[e];if(gv(n)){var i=Number(n);return ia?u=1:o0)){var i=Math.ceil(n.length/n.pageSize)-1||0,r=Math.min(n.pageIndex,i);r!==n.pageIndex&&(n.pageIndex=r,e._internalPageChanges.next())}})}},{key:"connect",value:function(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}},{key:"disconnect",value:function(){var t;null===(t=this._renderChangesSubscription)||void 0===t||t.unsubscribe(),this._renderChangesSubscription=null}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t),this._renderChangesSubscription||this._filterData(t)}},{key:"filter",get:function(){return this._filter.value},set:function(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}},{key:"sort",get:function(){return this._sort},set:function(t){this._sort=t,this._updateChangeSubscription()}},{key:"paginator",get:function(){return this._paginator},set:function(t){this._paginator=t,this._updateChangeSubscription()}}]),n}(hy));function fO(t){return t instanceof Date&&!isNaN(+t)}function pO(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nv,n=fO(t),i=n?+t-e.now():Math.abs(t);return function(t){return t.lift(new gO(i,e))}}var gO=function(){function t(e,n){o(this,t),this.delay=e,this.scheduler=n}return s(t,[{key:"call",value:function(t,e){return e.subscribe(new mO(t,this.delay,this.scheduler))}}]),t}(),mO=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t)).delay=i,a.scheduler=r,a.queue=[],a.active=!1,a.errored=!1,a}return s(n,[{key:"_schedule",value:function(t){this.active=!0,this.destination.add(t.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}},{key:"scheduleNotification",value:function(t){if(!0!==this.errored){var e=this.scheduler,n=new vO(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(Kv.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(Kv.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){for(var e=t.source,n=e.queue,i=t.scheduler,r=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){var o=Math.max(0,n[0].time-i.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1}}]),n}(R),vO=function t(e,n){o(this,t),this.time=e,this.notification=n},yO=oy({passive:!0}),_O=function(){var t=function(){function t(e,n){o(this,t),this._platform=e,this._ngZone=n,this._monitoredElements=new Map}return s(t,[{key:"monitor",value:function(t){var e=this;if(!this._platform.isBrowser)return Tf;var n=yv(t),i=this._monitoredElements.get(n);if(i)return i.subject;var r=new U,o="cdk-text-field-autofilled",a=function(t){"cdk-text-field-autofill-start"!==t.animationName||n.classList.contains(o)?"cdk-text-field-autofill-end"===t.animationName&&n.classList.contains(o)&&(n.classList.remove(o),e._ngZone.run(function(){return r.next({target:t.target,isAutofilled:!1})})):(n.classList.add(o),e._ngZone.run(function(){return r.next({target:t.target,isAutofilled:!0})}))};return this._ngZone.runOutsideAngular(function(){n.addEventListener("animationstart",a,yO),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:r,unlisten:function(){n.removeEventListener("animationstart",a,yO)}}),r}},{key:"stopMonitoring",value:function(t){var e=yv(t),n=this._monitoredElements.get(e);n&&(n.unlisten(),n.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}},{key:"ngOnDestroy",value:function(){var t=this;this._monitoredElements.forEach(function(e,n){return t.stopMonitoring(n)})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(ey),zi(Mc))},t.\u0275prov=Ot({factory:function(){return new t(zi(ey),zi(Mc))},token:t,providedIn:"root"}),t}(),bO=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[ny]]}),t}(),wO=new wi("MAT_INPUT_VALUE_ACCESSOR"),xO=["button","checkbox","file","hidden","image","radio","range","reset","submit"],kO=0,SO=bk(function t(e,n,i,r){o(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r}),CO=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c,h,d){var f;o(this,n),(f=e.call(this,l,a,s,r))._elementRef=t,f._platform=i,f.ngControl=r,f._autofillMonitor=c,f._formField=d,f._uid="mat-input-".concat(kO++),f.focused=!1,f.stateChanges=new U,f.controlType="mat-input",f.autofilled=!1,f._disabled=!1,f._required=!1,f._type="text",f._readonly=!1,f._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(function(t){return ry().has(t)});var p=f._elementRef.nativeElement,g=p.nodeName.toLowerCase();return f._inputValueAccessor=u||p,f._previousNativeValue=f.value,f.id=f.id,i.IOS&&h.runOutsideAngular(function(){t.nativeElement.addEventListener("keyup",function(t){var e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),f._isServer=!f._platform.isBrowser,f._isNativeSelect="select"===g,f._isTextarea="textarea"===g,f._isNativeSelect&&(f.controlType=p.multiple?"mat-native-select-multiple":"mat-native-select"),f}return s(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(function(e){t.autofilled=e.isAutofilled,t.stateChanges.next()})}},{key:"ngOnChanges",value:function(){this.stateChanges.next()}},{key:"ngOnDestroy",value:function(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}},{key:"ngDoCheck",value:function(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_focusChanged",value:function(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}},{key:"_onInput",value:function(){}},{key:"_dirtyCheckPlaceholder",value:function(){var t,e,n=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(n!==this._previousPlaceholder){var i=this._elementRef.nativeElement;this._previousPlaceholder=n,n?i.setAttribute("placeholder",n):i.removeAttribute("placeholder")}}},{key:"_dirtyCheckNativeValue",value:function(){var t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}},{key:"_validateType",value:function(){xO.indexOf(this._type)}},{key:"_isNeverEmpty",value:function(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}},{key:"_isBadInput",value:function(){var t=this._elementRef.nativeElement.validity;return t&&t.badInput}},{key:"setDescribedByIds",value:function(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}},{key:"onContainerClick",value:function(){this.focused||this.focus()}},{key:"disabled",get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(t){this._disabled=fv(t),this.focused&&(this.focused=!1,this.stateChanges.next())}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t)}},{key:"type",get:function(){return this._type},set:function(t){this._type=t||"text",this._validateType(),!this._isTextarea&&ry().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}},{key:"value",get:function(){return this._inputValueAccessor.value},set:function(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}},{key:"readonly",get:function(){return this._readonly},set:function(t){this._readonly=fv(t)}},{key:"empty",get:function(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}},{key:"shouldLabelFloat",get:function(){if(this._isNativeSelect){var t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}}]),n}(SO);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ey),hs(SC,10),hs(QC,8),hs(lA,8),hs(Lk),hs(wO,10),hs(_O),hs(Mc),hs(eD,8))},t.\u0275dir=ve({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&Ss("focus",function(){return e._focusChanged(!0)})("blur",function(){return e._focusChanged(!1)})("input",function(){return e._onInput()}),2&t&&(rl("disabled",e.disabled)("required",e.required),ss("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState&&!e.empty)("aria-required",e.required),Gs("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[wl([{provide:WT,useExisting:t}]),Xa,Ee]}),t}(),AO=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[Lk],imports:[[bO,iD,gk],bO,iD]}),t}(),MO=["searchSelectInput"],IO=["innerSelectSearch"];function TO(t,e){if(1&t){var n=bs();ps(0,"button",6),Ss("click",function(){return rn(n),Ds()._reset(!0)}),ps(1,"i",7),tl(2,"close"),gs(),gs()}}var DO=function(t){return{"mat-select-search-inner-multiple":t}},EO=function(){function t(t,e){this.matSelect=t,this.changeDetectorRef=e,this.placeholderLabel=django.gettext("Filter"),this.noEntriesFoundLabel=django.gettext("No entries found"),this.clearSearchInput=!0,this.disableInitialFocus=!1,this.changed=new Bu,this.overlayClassSet=!1,this.change=new Bu,this._onDestroy=new U}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){var t=this,e="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(e):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,e]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[e]=!0):this.matSelect.panelClass=e,this.matSelect.openedChange.pipe(pO(1),Uv(this._onDestroy)).subscribe(function(e){e?(t.getWidth(),t.disableInitialFocus||t._focus()):t.clearSearchInput&&t._reset()}),this.matSelect.openedChange.pipe(Nf(1)).pipe(Uv(this._onDestroy)).subscribe(function(){t._options=t.matSelect.options,t._options.changes.pipe(Uv(t._onDestroy)).subscribe(function(){var e=t.matSelect._keyManager;e&&t.matSelect.panelOpen&&setTimeout(function(){e.setFirstItemActive(),t.getWidth()},1)})}),this.change.pipe(Uv(this._onDestroy)).subscribe(function(){t.changeDetectorRef.detectChanges()}),this.initMultipleHandling()},t.prototype.ngOnDestroy=function(){this._onDestroy.next(),this._onDestroy.complete()},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout(function(){t.setOverlayClass()}),this.matSelect.openedChange.pipe(Nf(1),Uv(this._onDestroy)).subscribe(function(){t.matSelect.options.changes.pipe(Uv(t._onDestroy)).subscribe(function(){t.changeDetectorRef.markForCheck()})})},t.prototype._handleKeydown=function(t){(t.key&&1===t.key.length||t.keyCode>=65&&t.keyCode<=90||t.keyCode>=48&&t.keyCode<=57||t.keyCode===Py)&&t.stopPropagation()},t.prototype.writeValue=function(t){t!==this._value&&(this._value=t,this.change.emit(t))},t.prototype.onInputChange=function(t){t.value!==this._value&&(this.initMultiSelectedValues(),this._value=t.value,this.changed.emit(t.value),this.change.emit(t.value))},t.prototype.onBlur=function(t){this.writeValue(t.value)},t.prototype._focus=function(){if(this.searchSelectInput&&this.matSelect.panel){var t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.searchSelectInput.nativeElement.focus(),t.scrollTop=e}},t.prototype._reset=function(t){this.searchSelectInput&&(this.searchSelectInput.nativeElement.value="",this.onInputChange(""),t&&this._focus())},t.prototype.initMultiSelectedValues=function(){this.matSelect.multiple&&!this._value&&(this.previousSelectedValues=this.matSelect.options.filter(function(t){return t.selected}).map(function(t){return t.value}))},t.prototype.setOverlayClass=function(){var t=this;this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(Uv(this._onDestroy)).subscribe(function(){for(var e,n=t.searchSelectInput.nativeElement;n=n.parentElement;)if(n.classList.contains("cdk-overlay-pane")){e=n;break}e&&e.classList.add("cdk-overlay-pane-select-search")}),this.overlayClassSet=!0)},t.prototype.initMultipleHandling=function(){var t=this;this.matSelect.valueChange.pipe(Uv(this._onDestroy)).subscribe(function(e){if(t.matSelect.multiple){var n=!1;if(t._value&&t._value.length&&t.previousSelectedValues&&Array.isArray(t.previousSelectedValues)){e&&Array.isArray(e)||(e=[]);var i=t.matSelect.options.map(function(t){return t.value});t.previousSelectedValues.forEach(function(t){-1===e.indexOf(t)&&-1===i.indexOf(t)&&(e.push(t),n=!0)})}n&&t.matSelect._onChange(e),t.previousSelectedValues=e}})},t.prototype.getWidth=function(){if(this.innerSelectSearch&&this.innerSelectSearch.nativeElement){for(var t,e=this.innerSelectSearch.nativeElement;e=e.parentElement;)if(e.classList.contains("mat-select-panel")){t=e;break}t&&(this.innerSelectSearch.nativeElement.style.width=t.clientWidth+"px")}},t.\u0275fac=function(e){return new(e||t)(hs(SD),hs(eu))},t.\u0275cmp=he({type:t,selectors:[["uds-mat-select-search"]],viewQuery:function(t,e){if(1&t&&(Ju(MO,3,Tl),Ju(IO,3,Tl)),2&t){var n=void 0;Qu(n=ec())&&(e.searchSelectInput=n.first),Qu(n=ec())&&(e.innerSelectSearch=n.first)}},inputs:{placeholderLabel:"placeholderLabel",noEntriesFoundLabel:"noEntriesFoundLabel",clearSearchInput:"clearSearchInput",disableInitialFocus:"disableInitialFocus"},outputs:{changed:"changed"},features:[wl([{provide:ZS,useExisting:Ct(function(){return t}),multi:!0}])],decls:6,vars:5,consts:[["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner","mat-typography","mat-datepicker-content","mat-tab-header",3,"ngClass"],["innerSelectSearch",""],["matInput","","autocomplete","off",1,"mat-select-search-input",3,"placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ms(0,"input",0),ps(1,"div",1,2),ps(3,"input",3,4),Ss("keydown",function(t){return e._handleKeydown(t)})("input",function(t){return e.onInputChange(t.target)})("blur",function(t){return e.onBlur(t.target)}),gs(),us(5,TO,3,0,"button",5),gs()),2&t&&(Oo(1),ds("ngClass",Tu(3,DO,e.matSelect.multiple)),Oo(2),ds("placeholder",e.placeholderLabel),Oo(2),ds("ngIf",e.value))},directives:[CO,Eh,Lh,LS],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:100%;border-bottom-width:1px;border-bottom-style:solid;z-index:100;font-size:inherit;box-shadow:none;border-radius:0}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:100%} .mat-select-search-panel{transform:none!important;overflow-x:hidden}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:4px;top:5px} .cdk-overlay-pane-select-search{margin-top:-50px}"],changeDetection:0}),t}();function OO(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New user permission for"),gs())}function PO(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New group permission for"),gs())}function RO(t,e){if(1&t&&(ps(0,"mat-option",11),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),el(n.text)}}function LO(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",12),Ss("changed",function(t){return rn(n),Ds().filterUser=t}),gs()}}function NO(t,e){if(1&t&&(ps(0,"mat-option",11),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),el(n.text)}}function FO(t,e){if(1&t&&(ps(0,"mat-option",11),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),el(n.text)}}var VO=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.filterUser="",this.authenticators=[],this.entities=[],this.permissions=[{id:"1",text:django.gettext("Read only")},{id:"2",text:django.gettext("Full Access")}],this.authenticator="",this.entity="",this.permission="1",this.onSave=new Bu(!0)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"50%";return e.gui.dialog.open(t,{width:r,data:{type:n,item:i},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){e.forEach(function(e){t.authenticators.push({id:e.id,text:e.name})})})},t.prototype.changeAuth=function(t){var e=this;this.entities.length=0,this.entity="",this.rest.authenticators.detail(t,this.data.type+"s").summary().subscribe(function(t){t.forEach(function(t){e.entities.push({id:t.id,text:t.name})})})},t.prototype.save=function(){this.onSave.emit({authenticator:this.authenticator,entity:this.entity,permissision:this.permission}),this.dialogRef.close()},t.prototype.filteredEntities=function(){var t=this,e=new Array;return this.entities.forEach(function(n){t.filterUser&&!n.text.toLocaleLowerCase().includes(t.filterUser.toLocaleLowerCase())||e.push(n)}),e},t.prototype.getFieldLabel=function(t){return"user"===t?django.gettext("User"):"group"===t?django.gettext("Group"):"auth"===t?django.gettext("Authenticator"):django.gettext("Permission")},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-new-permission"]],decls:24,vars:13,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],[3,"innerHTML"],["titleGroup",""],[1,"container"],[3,"placeholder","ngModel","valueChange","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"placeholder","ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,OO,2,0,"uds-translate",1),ms(2,"b",2),us(3,PO,2,0,"ng-template",null,3,oc),gs(),ps(5,"mat-dialog-content"),ps(6,"div",4),ps(7,"mat-form-field"),ps(8,"mat-select",5),Ss("valueChange",function(t){return e.changeAuth(t)})("ngModelChange",function(t){return e.authenticator=t}),us(9,RO,2,2,"mat-option",6),gs(),gs(),ps(10,"mat-form-field"),ps(11,"mat-select",7),Ss("ngModelChange",function(t){return e.entity=t}),us(12,LO,1,0,"uds-mat-select-search",8),us(13,NO,2,2,"mat-option",6),gs(),gs(),ps(14,"mat-form-field"),ps(15,"mat-select",7),Ss("ngModelChange",function(t){return e.permission=t}),us(16,FO,2,2,"mat-option",6),gs(),gs(),gs(),gs(),ps(17,"mat-dialog-actions"),ps(18,"button",9),ps(19,"uds-translate"),tl(20,"Cancel"),gs(),gs(),ps(21,"button",10),Ss("click",function(){return e.save()}),ps(22,"uds-translate"),tl(23,"Ok"),gs(),gs(),gs()),2&t){var n=cs(4);Oo(1),ds("ngIf","user"===e.data.type)("ngIfElse",n),Oo(1),ds("innerHTML",e.data.item.name,Dr),Oo(6),ds("placeholder",e.getFieldLabel("auth"))("ngModel",e.authenticator),Oo(1),ds("ngForOf",e.authenticators),Oo(2),ds("placeholder",e.getFieldLabel(e.data.type))("ngModel",e.entity),Oo(1),ds("ngIf",e.entities.length>10),Oo(1),ds("ngForOf",e.filteredEntities()),Oo(2),ds("placeholder",e.getFieldLabel("perm"))("ngModel",e.permission),Oo(1),ds("ngForOf",e.permissions)}},directives:[SS,Lh,CS,nD,SD,AC,eA,Ph,AS,LS,kS,VS,iS,EO],styles:[".container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.container[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function zO(t,e){if(1&t){var n=bs();ps(0,"div",11),ps(1,"div",12),tl(2),gs(),ps(3,"div",13),tl(4),ps(5,"a",14),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(2).revokePermission(t)}),ps(6,"i",15),tl(7,"close"),gs(),gs(),gs(),gs()}if(2&t){var i=e.$implicit;Oo(2),il(" ",i.entity_name,"@",i.auth_name," "),Oo(2),nl(" ",i.perm_name," \xa0")}}function BO(t,e){if(1&t){var n=bs();ps(0,"div",7),ps(1,"div",8),ps(2,"div",9),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds().newPermission(i),t.preventDefault()}),ps(3,"uds-translate"),tl(4,"New permission..."),gs(),gs(),us(5,zO,8,3,"div",10),gs(),gs()}if(2&t){var i=e.$implicit;Oo(5),ds("ngForOf",i)}}var HO=function(t,e){return[t,e]},jO=function(){function t(t,e,n){this.api=t,this.dialogRef=e,this.data=n,this.userPermissions=[],this.groupPermissions=[]}return t.launch=function(e,n,i){var r=window.innerWidth<800?"90%":"60%";e.gui.dialog.open(t,{width:r,data:{rest:n,item:i},disableClose:!1})},t.prototype.ngOnInit=function(){this.reload()},t.prototype.reload=function(){var t=this;this.data.rest.getPermissions(this.data.item.id).subscribe(function(e){t.updatePermissions(e)})},t.prototype.updatePermissions=function(t){var e=this;this.userPermissions.length=0,this.groupPermissions.length=0,t.forEach(function(t){"user"===t.type?e.userPermissions.push(t):e.groupPermissions.push(t)})},t.prototype.revokePermission=function(t){var e=this;this.api.gui.yesno(django.gettext("Remove"),django.gettext("Confirm revokation of permission")+" "+t.entity_name+"@"+t.auth_name+" "+t.perm_name+"").subscribe(function(n){n&&e.data.rest.revokePermission([t.id]).subscribe(function(t){e.reload()})})},t.prototype.newPermission=function(t){var e=this,n=t===this.userPermissions?"user":"group";VO.launch(this.api,n,this.data.item).subscribe(function(t){e.data.rest.addPermission(e.data.item.id,n+"s",t.entity,t.permissision).subscribe(function(t){e.reload()})})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-permissions-form"]],decls:17,vars:5,consts:[["mat-dialog-title",""],[3,"innerHTML"],[1,"titles"],[1,"title"],[1,"permissions"],["class","content",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","primary"],[1,"content"],[1,"perms"],[1,"perm","new",3,"click"],["class","perm",4,"ngFor","ngForOf"],[1,"perm"],[1,"owner"],[1,"permission"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Permissions for"),gs(),tl(3,"\xa0"),ms(4,"b",1),gs(),ps(5,"mat-dialog-content"),ps(6,"div",2),ps(7,"uds-translate",3),tl(8,"Users"),gs(),ps(9,"uds-translate",3),tl(10,"Groups"),gs(),gs(),ps(11,"div",4),us(12,BO,6,1,"div",5),gs(),gs(),ps(13,"mat-dialog-actions"),ps(14,"button",6),ps(15,"uds-translate"),tl(16,"Ok"),gs(),gs(),gs()),2&t&&(Oo(4),ds("innerHTML",e.data.item.name,Dr),Oo(8),ds("ngForOf",Du(2,HO,e.userPermissions,e.groupPermissions)))},directives:[SS,VS,CS,Ph,AS,LS,kS],styles:[".titles[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-around;margin-bottom:.4rem}.title[_ngcontent-%COMP%]{font-size:1.4rem}.permissions[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start}.perms[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);margin-bottom:1rem;margin-right:1rem;padding:.5rem}.perm[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.perm[_ngcontent-%COMP%]:hover:not(.new){background-color:#333;color:#fff;cursor:default}.owner[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.new[_ngcontent-%COMP%]{color:#00f;justify-content:center}.new[_ngcontent-%COMP%]:hover{color:#fff;background-color:#00f;cursor:pointer}.content[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;justify-content:space-between}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),GO=n("dunZ"),UO=function(t){return void 0!==t.changingThisBreaksApplicationSecurity&&(t=t.changingThisBreaksApplicationSecurity.replace(/<.*>/g,"")),'"'+(t=""+t).replace('"','""')+'"'},WO=function(t){var e="";t.columns.forEach(function(t){e+=UO(t.title)+","}),e=e.slice(0,-1)+"\r\n",t.dataSource.data.forEach(function(n){t.columns.forEach(function(t){var i=n[t.name];switch(t.type){case PM.DATE:i=qI("SHORT_DATE_FORMAT",i);break;case PM.DATETIME:i=qI("SHORT_DATETIME_FORMAT",i);break;case PM.DATETIMESEC:i=qI("SHORT_DATE_FORMAT",i," H:i:s");break;case PM.TIME:i=qI("TIME_FORMAT",i)}e+=UO(i)+","}),e=e.slice(0,-1)+"\r\n"});var n=new Blob([e],{type:"text/csv"});setTimeout(function(){Object(GO.saveAs)(n,t.title+".csv")},100)};function YO(t,e){if(1&t&&(On(),ms(0,"circle",3)),2&t){var n=Ds();js("animation-name","mat-progress-spinner-stroke-rotate-"+n._spinnerAnimationLabel)("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),ss("r",n._getCircleRadius())}}function qO(t,e){if(1&t&&(On(),ms(0,"circle",3)),2&t){var n=Ds();js("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),ss("r",n._getCircleRadius())}}var XO=vk(function t(e){o(this,t),this._elementRef=e},"primary"),ZO=new wi("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}}),KO=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s){var l;o(this,n),(l=e.call(this,t))._elementRef=t,l._document=r,l._diameter=100,l._value=0,l._fallbackAnimation=!1,l.mode="determinate";var u=n._diameters;return l._spinnerAnimationLabel=l._getSpinnerAnimationLabel(),u.has(r.head)||u.set(r.head,new Set([100])),l._fallbackAnimation=i.EDGE||i.TRIDENT,l._noopAnimations="NoopAnimations"===a&&!!s&&!s._forceAnimations,s&&(s.diameter&&(l.diameter=s.diameter),s.strokeWidth&&(l.strokeWidth=s.strokeWidth)),l}return s(n,[{key:"ngOnInit",value:function(){var t=this._elementRef.nativeElement;this._styleRoot=sy(t)||this._document.head,this._attachStyleNode();var e="mat-progress-spinner-indeterminate".concat(this._fallbackAnimation?"-fallback":"","-animation");t.classList.add(e)}},{key:"_getCircleRadius",value:function(){return(this.diameter-10)/2}},{key:"_getViewBox",value:function(){var t=2*this._getCircleRadius()+this.strokeWidth;return"0 0 ".concat(t," ").concat(t)}},{key:"_getStrokeCircumference",value:function(){return 2*Math.PI*this._getCircleRadius()}},{key:"_getStrokeDashOffset",value:function(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}},{key:"_getCircleStrokeWidth",value:function(){return this.strokeWidth/this.diameter*100}},{key:"_attachStyleNode",value:function(){var t=this._styleRoot,e=this._diameter,i=n._diameters,r=i.get(t);if(!r||!r.has(e)){var o=this._document.createElement("style");o.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),o.textContent=this._getAnimationText(),t.appendChild(o),r||(r=new Set,i.set(t,r)),r.add(e)}}},{key:"_getAnimationText",value:function(){var t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,"".concat(.95*t)).replace(/END_VALUE/g,"".concat(.2*t)).replace(/DIAMETER/g,"".concat(this._spinnerAnimationLabel))}},{key:"_getSpinnerAnimationLabel",value:function(){return this.diameter.toString().replace(".","_")}},{key:"diameter",get:function(){return this._diameter},set:function(t){this._diameter=pv(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}},{key:"strokeWidth",get:function(){return this._strokeWidth||this.diameter/10},set:function(t){this._strokeWidth=pv(t)}},{key:"value",get:function(){return"determinate"===this.mode?this._value:0},set:function(t){this._value=Math.max(0,Math.min(100,pv(t)))}}]),n}(XO);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ey),hs(uh,8),hs(rk,8),hs(ZO))},t.\u0275cmp=he({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar","tabindex","-1",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(ss("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),js("width",e.diameter,"px")("height",e.diameter,"px"),Gs("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[Xa],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false","aria-hidden","true",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(On(),ps(0,"svg",0),us(1,YO,1,9,"circle",1),us(2,qO,1,7,"circle",2),gs()),2&t&&(js("width",e.diameter,"px")("height",e.diameter,"px"),ds("ngSwitch","indeterminate"===e.mode),ss("viewBox",e._getViewBox()),Oo(1),ds("ngSwitchCase",!0),Oo(1),ds("ngSwitchCase",!1))},directives:[zh,Bh],styles:[".mat-progress-spinner{display:block;position:relative;overflow:hidden}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor;stroke:CanvasText}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] svg{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n"],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t}(),$O=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk,Kh],gk]}),t}(),QO=["mat-menu-item",""],JO=["*"];function tP(t,e){if(1&t){var n=bs();ps(0,"div",0),Ss("keydown",function(t){return rn(n),Ds()._handleKeydown(t)})("click",function(){return rn(n),Ds().closed.emit("click")})("@transformMenu.start",function(t){return rn(n),Ds()._onAnimationStart(t)})("@transformMenu.done",function(t){return rn(n),Ds()._onAnimationDone(t)}),ps(1,"div",1),Ps(2),gs(),gs()}if(2&t){var i=Ds();ds("id",i.panelId)("ngClass",i._classList)("@transformMenu",i._panelAnimationState),ss("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null)("aria-describedby",i.ariaDescribedby||null)}}var eP={transformMenu:gb("transformMenu",[_b("void",yb({opacity:0,transform:"scale(0.8)"})),wb("void => enter",mb("120ms cubic-bezier(0, 0, 0.2, 1)",yb({opacity:1,transform:"scale(1)"}))),wb("* => void",mb("100ms 25ms linear",yb({opacity:0})))]),fadeInItems:gb("fadeInItems",[_b("showing",yb({opacity:1})),wb("void => *",[yb({opacity:0}),mb("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},nP=new wi("MatMenuContent"),iP=function(){var t=function(){function t(e,n,i,r,a,s,l){o(this,t),this._template=e,this._componentFactoryResolver=n,this._appRef=i,this._injector=r,this._viewContainerRef=a,this._document=s,this._changeDetectorRef=l,this._attached=new U}return s(t,[{key:"attach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._portal||(this._portal=new xy(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new Cy(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}},{key:"detach",value:function(){this._portal.isAttached&&this._portal.detach()}},{key:"ngOnDestroy",value:function(){this._outlet&&this._outlet.dispose()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(lu),hs(Cl),hs(Kc),hs(Ya),hs(pu),hs(uh),hs(eu))},t.\u0275dir=ve({type:t,selectors:[["ng-template","matMenuContent",""]],features:[wl([{provide:nP,useExisting:t}])]}),t}(),rP=new wi("MAT_MENU_PANEL"),oP=yk(mk(function t(){o(this,t)})),aP=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this))._elementRef=t,s._focusMonitor=r,s._parentMenu=a,s.role="menuitem",s._hovered=new U,s._focused=new U,s._highlighted=!1,s._triggersSubmenu=!1,a&&a.addItem&&a.addItem(d(s)),s}return s(n,[{key:"focus",value:function(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}},{key:"ngAfterViewInit",value:function(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}},{key:"ngOnDestroy",value:function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_checkDisabled",value:function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}},{key:"_handleMouseEnter",value:function(){this._hovered.next(this)}},{key:"getLabel",value:function(){for(var t,e,n=this._elementRef.nativeElement.cloneNode(!0),i=n.querySelectorAll("mat-icon, .material-icons"),r=0;r0&&void 0!==arguments[0]?arguments[0]:"program";this.lazyContent?this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){return t._focusFirstItem(e)}):this._focusFirstItem(e)}},{key:"_focusFirstItem",value:function(t){var e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}}},{key:"resetActiveItem",value:function(){this._keyManager.setActiveItem(-1)}},{key:"setElevation",value:function(t){var e=Math.min(4+t,24),n="mat-elevation-z".concat(e),i=Object.keys(this._classList).find(function(t){return t.startsWith("mat-elevation-z")});i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[n]=!0,this._previousElevation=n)}},{key:"setPositionClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.xPosition,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.yPosition,n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e}},{key:"_startAnimation",value:function(){this._panelAnimationState="enter"}},{key:"_resetAnimation",value:function(){this._panelAnimationState="void"}},{key:"_onAnimationDone",value:function(t){this._animationDone.next(t),this._isAnimating=!1}},{key:"_onAnimationStart",value:function(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}},{key:"_updateDirectDescendants",value:function(){var t=this;this._allItems.changes.pipe(zf(this._allItems)).subscribe(function(e){t._directDescendantItems.reset(e.filter(function(e){return e._parentMenu===t})),t._directDescendantItems.notifyOnChanges()})}},{key:"xPosition",get:function(){return this._xPosition},set:function(t){this._xPosition=t,this.setPositionClasses()}},{key:"yPosition",get:function(){return this._yPosition},set:function(t){this._yPosition=t,this.setPositionClasses()}},{key:"overlapTrigger",get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=fv(t)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=fv(t)}},{key:"panelClass",set:function(t){var e=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach(function(t){e._classList[t]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(function(t){e._classList[t]=!0}),this._elementRef.nativeElement.className="")}},{key:"classList",get:function(){return this.panelClass},set:function(t){this.panelClass=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(sP))},t.\u0275dir=ve({type:t,contentQueries:function(t,e,n){var i;1&t&&(tc(n,nP,1),tc(n,aP,1),tc(n,aP,0)),2&t&&(Qu(i=ec())&&(e.lazyContent=i.first),Qu(i=ec())&&(e._allItems=i),Qu(i=ec())&&(e.items=i))},viewQuery:function(t,e){var n;1&t&&Ju(lu,1),2&t&&Qu(n=ec())&&(e.templateRef=n.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t}(),cP=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){return o(this,n),e.call(this,t,i,r)}return n}(uP);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(sP))},t.\u0275cmp=he({type:t,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(t,e){2&t&&ss("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[wl([{provide:rP,useExisting:t}]),Xa],ngContentSelectors:JO,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(Os(),us(0,tP,3,6,"ng-template"))},directives:[Eh],styles:['mat-menu{display:none}.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item{margin-top:1px}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[eP.transformMenu,eP.fadeInItems]},changeDetection:0}),t}(),hP=new wi("mat-menu-scroll-strategy"),dP={provide:hP,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},fP=oy({passive:!0}),pP=function(){var t=function(){function t(e,n,i,r,a,s,l,u){var c=this;o(this,t),this._overlay=e,this._element=n,this._viewContainerRef=i,this._menuItemInstance=s,this._dir=l,this._focusMonitor=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=M.EMPTY,this._hoverSubscription=M.EMPTY,this._menuCloseSubscription=M.EMPTY,this._handleTouchStart=function(t){tb(t)||(c._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Bu,this.onMenuOpen=this.menuOpened,this.menuClosed=new Bu,this.onMenuClose=this.menuClosed,this._scrollStrategy=r,this._parentMaterialMenu=a instanceof uP?a:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,fP),s&&(s._triggersSubmenu=this.triggersSubmenu())}return s(t,[{key:"ngAfterContentInit",value:function(){this._checkMenu(),this._handleHover()}},{key:"ngOnDestroy",value:function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,fP),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}},{key:"triggersSubmenu",value:function(){return!(!this._menuItemInstance||!this._parentMaterialMenu)}},{key:"toggleMenu",value:function(){return this._menuOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay(),n=e.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,e.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(function(){return t.closeMenu()}),this._initMenu(),this.menu instanceof uP&&this.menu._startAnimation()}}},{key:"closeMenu",value:function(){this.menu.close.emit()}},{key:"focus",value:function(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}},{key:"_destroyMenu",value:function(t){var e=this;if(this._overlayRef&&this.menuOpen){var n=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),!this.restoreFocus||"keydown"!==t&&this._openedBy&&this.triggersSubmenu()||this.focus(this._openedBy),this._openedBy=void 0,n instanceof uP?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(Ld(function(t){return"void"===t.toState}),Nf(1),Uv(n.lazyContent._attached)).subscribe({next:function(){return n.lazyContent.detach()},complete:function(){return e._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),n.lazyContent&&n.lazyContent.detach())}}},{key:"_initMenu",value:function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this.menu.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}},{key:"_setMenuElevation",value:function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}},{key:"_setIsMenuOpen",value:function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}},{key:"_checkMenu",value:function(){}},{key:"_createOverlay",value:function(){if(!this._overlayRef){var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}},{key:"_getOverlayConfig",value:function(){return new Zy({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}},{key:"_subscribeToPositions",value:function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe(function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}},{key:"_setPosition",value:function(t){var e=y("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],i=e[1],r=y("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),o=r[0],a=r[1],s=o,l=a,u=n,c=i,h=0;this.triggersSubmenu()?(c=n="before"===this.menu.xPosition?"start":"end",i=u="end"===n?"start":"end",h="bottom"===o?8:-8):this.menu.overlapTrigger||(s="top"===o?"bottom":"top",l="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:u,overlayY:o,offsetY:h},{originX:i,originY:s,overlayX:c,overlayY:o,offsetY:h},{originX:n,originY:l,overlayX:u,overlayY:a,offsetY:-h},{originX:i,originY:l,overlayX:c,overlayY:a,offsetY:-h}])}},{key:"_menuClosingActions",value:function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return dt(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:Pd(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Ld(function(e){return e!==t._menuItemInstance}),Ld(function(){return t._menuOpen})):Pd(),n)}},{key:"_handleMousedown",value:function(t){J_(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;e!==Ey&&e!==Py||(this._openedBy="keyboard"),this.triggersSubmenu()&&(e===Vy&&"ltr"===this.dir||e===Ny&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}},{key:"_handleClick",value:function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}},{key:"_handleHover",value:function(){var t=this;this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(Ld(function(e){return e===t._menuItemInstance&&!e.disabled}),pO(0,Ov)).subscribe(function(){t._openedBy="mouse",t.menu instanceof uP&&t.menu._isAnimating?t.menu._animationDone.pipe(Nf(1),pO(0,Ov),Uv(t._parentMaterialMenu._hovered())).subscribe(function(){return t.openMenu()}):t.openMenu()}))}},{key:"_getPortal",value:function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new xy(this.menu.templateRef,this._viewContainerRef)),this._portal}},{key:"_deprecatedMatMenuTriggerFor",get:function(){return this.menu},set:function(t){this.menu=t}},{key:"menu",get:function(){return this._menu},set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(function(t){e._destroyMenu(t),"click"!==t&&"tab"!==t||!e._parentMaterialMenu||e._parentMaterialMenu.closed.emit(t)})))}},{key:"menuOpen",get:function(){return this._menuOpen}},{key:"dir",get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(g_),hs(Tl),hs(pu),hs(hP),hs(rP,8),hs(aP,10),hs(uy,8),hs(ib))},t.\u0275dir=ve({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&Ss("mousedown",function(t){return e._handleMousedown(t)})("keydown",function(t){return e._handleKeydown(t)})("click",function(t){return e._handleClick(t)}),2&t&&ss("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t}(),gP=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[dP],imports:[gk]}),t}(),mP=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[dP],imports:[[Kh,gk,Yk,w_,gP],yy,gk,gP]}),t}(),vP=function(){var t=function(){function t(){o(this,t),this._vertical=!1,this._inset=!1}return s(t,[{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=fv(t)}},{key:"inset",get:function(){return this._inset},set:function(t){this._inset=fv(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(ss("aria-orientation",e.vertical?"vertical":"horizontal"),Gs("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\n"],encapsulation:2,changeDetection:0}),t}(),yP=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk],gk]}),t}(),_P=function(){function t(){}return t.prototype.transform=function(t,e){return t.sort(void 0===e?function(t,e){return t>e?1:-1}:function(t,n){return t[e]>n[e]?1:-1})},t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=ye({name:"sort",type:t,pure:!0}),t}(),bP=["trigger"];function wP(t,e){1&t&&ms(0,"img",36),2&t&&ds("src",Ds().icon,Er)}function xP(t,e){if(1&t){var n=bs();ps(0,"button",46),Ss("click",function(){rn(n);var t=e.$implicit,i=Ds(5);return i.newAction.emit({param:t,table:i})}),gs()}if(2&t){var i=e.$implicit,r=Ds(5);ds("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Dr)}}function kP(t,e){if(1&t&&(vs(0),ps(1,"button",42),tl(2),gs(),ps(3,"mat-menu",43,44),us(5,xP,1,1,"button",45),Ru(6,"sort"),gs(),ys()),2&t){var n=e.$implicit,i=cs(4);Oo(1),ds("matMenuTriggerFor",i),Oo(1),el(n.key),Oo(1),ds("overlapTrigger",!1),Oo(2),ds("ngForOf",Nu(6,4,n.value,"name"))}}function SP(t,e){if(1&t&&(vs(0),ps(1,"mat-menu",37,38),us(3,kP,7,7,"ng-container",39),Ru(4,"keyvalue"),gs(),ps(5,"a",40),ps(6,"i",17),tl(7,"insert_drive_file"),gs(),ps(8,"span",41),ps(9,"uds-translate"),tl(10,"New"),gs(),gs(),ps(11,"i",17),tl(12,"arrow_drop_down"),gs(),gs(),ys()),2&t){var n=cs(2),i=Ds(3);Oo(1),ds("overlapTrigger",!1),Oo(2),ds("ngForOf",Lu(4,3,i.grpTypes)),Oo(2),ds("matMenuTriggerFor",n)}}function CP(t,e){if(1&t){var n=bs();ps(0,"button",46),Ss("click",function(){rn(n);var t=e.$implicit,i=Ds(4);return i.newAction.emit({param:t,table:i})}),gs()}if(2&t){var i=e.$implicit,r=Ds(4);ds("innerHTML",r.api.safeString(r.api.gui.icon(i.icon)+i.name),Dr)}}function AP(t,e){if(1&t&&(vs(0),ps(1,"mat-menu",37,38),us(3,CP,1,1,"button",45),Ru(4,"sort"),gs(),ps(5,"a",40),ps(6,"i",17),tl(7,"insert_drive_file"),gs(),ps(8,"span",41),ps(9,"uds-translate"),tl(10,"New"),gs(),gs(),ps(11,"i",17),tl(12,"arrow_drop_down"),gs(),gs(),ys()),2&t){var n=cs(2),i=Ds(3);Oo(1),ds("overlapTrigger",!1),Oo(2),ds("ngForOf",Nu(4,3,i.oTypes,"name")),Oo(2),ds("matMenuTriggerFor",n)}}function MP(t,e){if(1&t&&(vs(0),us(1,SP,13,5,"ng-container",8),us(2,AP,13,6,"ng-container",8),ys()),2&t){var n=Ds(2);Oo(1),ds("ngIf",n.newGrouped),Oo(1),ds("ngIf",!n.newGrouped)}}function IP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",47),Ss("click",function(){rn(n);var t=Ds(2);return t.newAction.emit({param:void 0,table:t})}),ps(2,"i",17),tl(3,"insert_drive_file"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"New"),gs(),gs(),gs(),ys()}}function TP(t,e){if(1&t&&(vs(0),us(1,MP,3,2,"ng-container",8),us(2,IP,7,0,"ng-container",8),ys()),2&t){var n=Ds();Oo(1),ds("ngIf",null!=n.oTypes&&0!=n.oTypes.length),Oo(1),ds("ngIf",null!=n.oTypes&&0==n.oTypes.length)}}function DP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",48),Ss("click",function(){rn(n);var t=Ds();return t.emitIfSelection(t.editAction)}),ps(2,"i",17),tl(3,"edit"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Edit"),gs(),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(1),ds("disabled",1!=i.selection.selected.length)}}function EP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",48),Ss("click",function(){return rn(n),Ds().permissions()}),ps(2,"i",17),tl(3,"perm_identity"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Permissions"),gs(),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(1),ds("disabled",1!=i.selection.selected.length)}}function OP(t,e){if(1&t){var n=bs();ps(0,"a",50),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(2).emitCustom(t)}),gs()}if(2&t){var i=e.$implicit;ds("disabled",Ds(2).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function PP(t,e){if(1&t&&(vs(0),us(1,OP,1,2,"a",49),ys()),2&t){var n=Ds();Oo(1),ds("ngForOf",n.getcustomButtons())}}function RP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",51),Ss("click",function(){return rn(n),Ds().export()}),ps(2,"i",17),tl(3,"import_export"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Export"),gs(),gs(),gs(),ys()}}function LP(t,e){if(1&t){var n=bs();vs(0),ps(1,"a",52),Ss("click",function(){rn(n);var t=Ds();return t.emitIfSelection(t.deleteAction,!0)}),ps(2,"i",17),tl(3,"delete_forever"),gs(),ps(4,"span",41),ps(5,"uds-translate"),tl(6,"Delete"),gs(),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(1),ds("disabled",i.selection.isEmpty())}}function NP(t,e){if(1&t){var n=bs();ps(0,"button",53),Ss("click",function(){rn(n);var t=Ds();return t.filterText="",t.applyFilter()}),ps(1,"i",17),tl(2,"close"),gs(),gs()}}function FP(t,e){1&t&&ms(0,"mat-header-cell")}function VP(t,e){1&t&&(ps(0,"i",17),tl(1,"check_box"),gs())}function zP(t,e){1&t&&(ps(0,"i",17),tl(1,"check_box_outline_blank"),gs())}function BP(t,e){if(1&t){var n=bs();ps(0,"mat-cell",56),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds(2).clickRow(i,t)}),us(1,VP,2,0,"i",57),us(2,zP,2,0,"ng-template",null,58,oc),gs()}if(2&t){var i=e.$implicit,r=cs(3),o=Ds(2);Oo(1),ds("ngIf",o.selection.isSelected(i))("ngIfElse",r)}}function HP(t,e){1&t&&(vs(0,54),us(1,FP,1,0,"mat-header-cell",22),us(2,BP,4,2,"mat-cell",55),ys())}function jP(t,e){1&t&&ms(0,"mat-header-cell")}function GP(t,e){if(1&t){var n=bs();ps(0,"mat-cell"),ps(1,"div",59),Ss("click",function(t){rn(n);var i=e.$implicit,r=Ds();return r.detailAction.emit({param:i,table:r}),t.stopPropagation()}),ps(2,"i",17),tl(3,"subdirectory_arrow_right"),gs(),gs(),gs()}}function UP(t,e){if(1&t&&(ps(0,"mat-header-cell",63),tl(1),gs()),2&t){var n=Ds().$implicit;Oo(1),el(n.title)}}function WP(t,e){if(1&t){var n=bs();ps(0,"mat-cell",64),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds(2).clickRow(i,t)})("contextmenu",function(t){rn(n);var i=e.$implicit;return Ds(2).onContextMenu(i,t)}),ms(1,"div",65),gs()}if(2&t){var i=e.$implicit,r=Ds().$implicit,o=Ds();Oo(1),ds("innerHtml",o.getRowColumn(i,r),Dr)}}function YP(t,e){1&t&&(vs(0,60),us(1,UP,2,1,"mat-header-cell",61),us(2,WP,2,1,"mat-cell",62),ys()),2&t&&Rs("matColumnDef",e.$implicit.name)}function qP(t,e){1&t&&ms(0,"mat-header-row")}function XP(t,e){if(1&t&&ms(0,"mat-row",66),2&t){var n=e.$implicit;ds("ngClass",Ds().rowClass(n))}}function ZP(t,e){if(1&t&&(ps(0,"div",67),tl(1),ps(2,"uds-translate"),tl(3,"Selected items"),gs(),gs()),2&t){var n=Ds();Oo(1),nl(" ",n.selection.selected.length," ")}}function KP(t,e){if(1&t){var n=bs();ps(0,"button",71),Ss("click",function(){rn(n);var t=Ds().item,e=Ds();return e.detailAction.emit({param:t,table:e})}),ps(1,"i",72),tl(2,"subdirectory_arrow_right"),gs(),ps(3,"uds-translate"),tl(4,"Detail"),gs(),gs()}}function $P(t,e){if(1&t){var n=bs();ps(0,"button",71),Ss("click",function(){rn(n);var t=Ds(2);return t.emitIfSelection(t.editAction)}),ps(1,"i",72),tl(2,"edit"),gs(),ps(3,"uds-translate"),tl(4,"Edit"),gs(),gs()}}function QP(t,e){if(1&t){var n=bs();ps(0,"button",71),Ss("click",function(){return rn(n),Ds(2).permissions()}),ps(1,"i",72),tl(2,"perm_identity"),gs(),ps(3,"uds-translate"),tl(4,"Permissions"),gs(),gs()}}function JP(t,e){if(1&t){var n=bs();ps(0,"button",73),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(2).emitCustom(t)}),gs()}if(2&t){var i=e.$implicit;ds("disabled",Ds(2).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function tR(t,e){if(1&t){var n=bs();ps(0,"button",74),Ss("click",function(){rn(n);var t=Ds(2);return t.emitIfSelection(t.deleteAction)}),ps(1,"i",72),tl(2,"delete_forever"),gs(),ps(3,"uds-translate"),tl(4,"Delete"),gs(),gs()}}function eR(t,e){if(1&t){var n=bs();ps(0,"button",73),Ss("click",function(){rn(n);var t=e.$implicit;return Ds(3).emitCustom(t)}),gs()}if(2&t){var i=e.$implicit;ds("disabled",Ds(3).isCustomDisabled(i))("innerHTML",i.html,Dr)}}function nR(t,e){if(1&t&&(vs(0),ms(1,"mat-divider"),us(2,eR,1,2,"button",69),ys()),2&t){var n=Ds(2);Oo(2),ds("ngForOf",n.getCustomAccelerators())}}function iR(t,e){if(1&t&&(us(0,KP,5,0,"button",68),us(1,$P,5,0,"button",68),us(2,QP,5,0,"button",68),us(3,JP,1,2,"button",69),us(4,tR,5,0,"button",70),us(5,nR,3,1,"ng-container",8)),2&t){var n=Ds();ds("ngIf",n.detailAction.observers.length>0),Oo(1),ds("ngIf",n.editAction.observers.length>0),Oo(1),ds("ngIf",!0===n.hasPermissions),Oo(1),ds("ngForOf",n.getCustomMenu()),Oo(1),ds("ngIf",n.deleteAction.observers.length>0),Oo(1),ds("ngIf",n.hasAccelerators)}}var rR=function(){return[5,10,25,100,1e3]},oR=function(){function t(t){this.api=t,this.pageSize=10,this.newGrouped=!1,this.loaded=new Bu,this.rowSelected=new Bu,this.newAction=new Bu,this.editAction=new Bu,this.deleteAction=new Bu,this.customButtonAction=new Bu,this.detailAction=new Bu,this.title="",this.subtitle="",this.displayedColumns=[],this.columns=[],this.rowStyleInfo=null,this.dataSource=new dO([]),this.firstLoad=!0,this.loading=!1,this.lastClickInfo={time:0,x:-1e4,y:-1e4},this.contextMenuPosition={x:"0px",y:"0px"},this.filterText=""}return t.prototype.ngOnInit=function(){var t=this;this.hasCustomButtons=void 0!==this.customButtons&&0!==this.customButtons.length&&0!==this.customButtonAction.observers.length&&this.getcustomButtons().length>0,this.hasAccelerators=this.getCustomAccelerators().length>0,this.hasButtons=this.hasCustomButtons||0!==this.detailAction.observers.length||0!==this.editAction.observers.length||this.hasPermissions||0!==this.deleteAction.observers.length,this.hasActions=this.hasButtons||void 0!==this.customButtons&&this.customButtons.length>0,this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=function(t,e){if(!(e in t))return"";var n=t[e];return"number"==typeof n?n:"string"==typeof n?n.toLocaleLowerCase():(null===n&&(n=7226578800),n.changingThisBreaksApplicationSecurity&&(n=n.changingThisBreaksApplicationSecurity),(""+n).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase())},this.dataSource.filterPredicate=function(e,n){try{t.columns.forEach(function(t){if((""+e[t.name]).replace(/<(span|\/span)[^>]*>/g,"").toLocaleLowerCase().includes(n))throw Error()})}catch(i){return!0}return!1},this.dataSource.sort.active=this.api.getFromStorage(this.tableId+"sort-column")||"name",this.dataSource.sort.direction=this.api.getFromStorage(this.tableId+"sort-direction")||"asc",this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.selection=new py(!0===this.multiSelect,[]);var e=this.rest.permision();0==(e&mI.MANAGEMENT)&&(this.newAction.observers.length=0,this.editAction.observers.length=0,this.deleteAction.observers.length=0,this.customButtonAction.observers.length=0),e!==mI.ALL&&(this.hasPermissions=!1),void 0!==this.icon&&(this.icon=this.api.staticURL("admin/img/icons/"+this.icon+".png")),this.rest.types().subscribe(function(e){t.rest.tableInfo().subscribe(function(n){t.initialize(n,e)})})},t.prototype.initialize=function(t,e){var n=this;this.oTypes=e,this.types=new Map,this.grpTypes=new Map,e.forEach(function(t){n.types.set(t.type,t),void 0!==t.group&&(n.grpTypes.has(t.group)||n.grpTypes.set(t.group,[]),n.grpTypes.get(t.group).push(t))}),this.rowStyleInfo=void 0!==t["row-style"]&&void 0!==t["row-style"].field?t["row-style"]:null,this.title=t.title,this.subtitle=t.subtitle||"",this.hasButtons&&this.displayedColumns.push("selection-column");var i=[];t.fields.forEach(function(t){for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];i.push({name:e,title:r.title,type:void 0===r.type?PM.ALPHANUMERIC:r.type,dict:r.dict}),(void 0===r.visible||r.visible)&&n.displayedColumns.push(e)}}),this.columns=i,this.detailAction.observers.length>0&&this.displayedColumns.push("detail-column"),this.overview()},t.prototype.overview=function(){var t=this;this.loading||(this.selection.clear(),this.dataSource.data=[],this.loading=!0,this.rest.overview().subscribe(function(e){t.loading=!1,void 0!==t.onItem&&e.forEach(function(e){t.onItem(e)}),t.dataSource.data=e,t.loaded.emit({param:t.firstLoad,table:t}),t.firstLoad=!1},function(e){t.loading=!1}))},t.prototype.getcustomButtons=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type!==RM.ONLY_MENU&&t.type!==RM.ACCELERATOR}):[]},t.prototype.getCustomMenu=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type!==RM.ACCELERATOR}):[]},t.prototype.getCustomAccelerators=function(){return this.customButtons?this.customButtons.filter(function(t){return t.type===RM.ACCELERATOR}):[]},t.prototype.getRowColumn=function(t,e){var n=t[e.name];switch(e.type){case PM.IMAGE:return this.api.safeString(this.api.gui.icon(n,"48px"));case PM.DATE:n=qI("SHORT_DATE_FORMAT",n);break;case PM.DATETIME:n=qI("SHORT_DATETIME_FORMAT",n);break;case PM.TIME:n=qI("TIME_FORMAT",n);break;case PM.DATETIMESEC:n=qI("SHORT_DATE_FORMAT",n," H:i:s");break;case PM.ICON:try{n=this.api.gui.icon(this.types.get(t.type).icon)+n}catch(i){}return this.api.safeString(n);case PM.CALLBACK:break;case PM.DICTIONARY:try{n=e.dict[n]}catch(i){n=""}}return n},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage(this.tableId+"sort-column",t.active),this.api.putOnStorage(this.tableId+"sort-direction",t.direction)},t.prototype.rowClass=function(t){var e=[];return this.selection.isSelected(t)&&e.push("selected"),null!==this.rowStyleInfo&&e.push(this.rowStyleInfo.prefix+t[this.rowStyleInfo.field]),e},t.prototype.emitIfSelection=function(t,e){void 0===e&&(e=!1);var n=this.selection.selected.length;n>0&&(!0!==e&&1!==n||t.emit({table:this,param:n}))},t.prototype.isCustomDisabled=function(t){switch(t.type){case void 0:case RM.SINGLE_SELECT:return 1!==this.selection.selected.length||!0===t.disabled;case RM.MULTI_SELECT:return this.selection.isEmpty()||!0===t.disabled;default:return!1}},t.prototype.emitCustom=function(t){(this.selection.selected.length||t.type===RM.ALWAYS)&&(t.type===RM.ACCELERATOR?this.api.navigation.goto(t.id,this.selection.selected[0],t.acceleratorProperties):this.customButtonAction.emit({param:t,table:this}))},t.prototype.clickRow=function(t,e){var n=(new Date).getTime();if((this.detailAction.observers.length||this.editAction.observers.length)&&Math.abs(this.lastClickInfo.x-e.x)<16&&Math.abs(this.lastClickInfo.y-e.y)<16&&n-this.lastClickInfo.time<250)return this.selection.clear(),this.selection.select(t),void(this.detailAction.observers.length?this.detailAction.emit({param:t,table:this}):this.emitIfSelection(this.editAction,!1));this.lastClickInfo={time:n,x:e.x,y:e.y},this.doSelect(t,e)},t.prototype.doSelect=function(t,e){if(e.ctrlKey)this.lastSel=t,this.selection.toggle(t);else if(e.shiftKey){if(this.selection.isEmpty())this.selection.toggle(t);else if(this.selection.clear(),this.lastSel!==t)for(var n=!1,i=0,r=this.dataSource.sortData(this.dataSource.data,this.dataSource.sort);i0),Oo(1),ds("ngIf",e.editAction.observers.length>0),Oo(1),ds("ngIf",!0===e.hasPermissions),Oo(1),ds("ngIf",e.hasCustomButtons),Oo(1),ds("ngIf",1==e.allowExport),Oo(1),ds("ngIf",e.deleteAction.observers.length>0),Oo(7),ds("ngModel",e.filterText),Oo(1),ds("ngIf",e.filterText),Oo(2),ds("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",Iu(27,rR))("showFirstLastButtons",!0),Oo(6),ds("dataSource",e.dataSource),Oo(1),ds("ngIf",e.hasButtons),Oo(4),ds("ngForOf",e.columns),Oo(1),ds("matHeaderRowDef",e.displayedColumns),Oo(1),ds("matRowDefColumns",e.displayedColumns),Oo(1),ds("hidden",!e.loading),Oo(5),ds("ngIf",e.hasButtons&&e.selection.selected.length>0),Oo(1),js("left",e.contextMenuPosition.x)("top",e.contextMenuPosition.y),ds("matMenuTriggerFor",n)}},directives:[Lh,VS,nD,CO,QS,AC,eA,YD,NS,UE,JD,KE,XE,YE,Ph,nO,rO,KO,pP,cP,iP,aP,LS,$T,QE,tO,oE,aO,lO,Eh,vP],pipes:[Xh,_P],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.buttons[_ngcontent-%COMP%], .header[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.buttons[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.buttons[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-right:1em;margin-bottom:1em}.buttons[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{margin-right:.4rem}.buttons[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]:hover:not([disabled]){background-color:#000;color:#fff}button.mat-menu-item[_ngcontent-%COMP%]{height:32px;line-height:32px}.navigation[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.footer[_ngcontent-%COMP%]{margin:1em;display:flex;justify-content:flex-end}mat-cell[_ngcontent-%COMP%]:first-of-type, mat-header-cell[_ngcontent-%COMP%]:first-of-type{padding-left:.5rem}mat-row[_ngcontent-%COMP%]:hover{background-color:#f0f8ff;cursor:pointer}mat-table[_ngcontent-%COMP%]{width:100%;font-weight:300}.mat-column-detail-column[_ngcontent-%COMP%]{max-width:1.5rem;justify-content:center;color:#000!important;padding-right:.5rem}.detail-launcher[_ngcontent-%COMP%]{display:none}.mat-row[_ngcontent-%COMP%]:hover .detail-launcher[_ngcontent-%COMP%]{display:block}.mat-column-selection-column[_ngcontent-%COMP%]{max-width:2rem;justify-content:center;color:#000!important}.menu-warn[_ngcontent-%COMP%]{color:red}.menu-link[_ngcontent-%COMP%]{color:#00f}.loading[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2rem;display:flex;justify-content:center} .mat-menu-panel{min-height:48px} .mat-paginator-range-label{min-width:6em}"]}),t}(),aR='pause'+django.gettext("Maintenance")+"",sR='pause'+django.gettext("Exit maintenance mode")+"",lR='pause'+django.gettext("Enter maintenance mode")+"",uR=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"maintenance",html:aR,type:RM.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New provider"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit provider"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete provider"))},t.prototype.onMaintenance=function(t){var e=this,n=t.table.selection.selected[0],i=n.maintenance_mode?django.gettext("Exit maintenance mode?"):django.gettext("Enter maintenance mode?");this.api.gui.yesno(django.gettext("Maintenance mode for")+" "+n.name,i).subscribe(function(i){i&&e.rest.providers.maintenance(n.id).subscribe(function(){t.table.overview()})})},t.prototype.onRowSelect=function(t){var e=t.table;this.customButtons[0].html=e.selection.selected.length>1||0===e.selection.selected.length?aR:e.selection.selected[0].maintenance_mode?sR:lR},t.prototype.onDetail=function(t){this.api.navigation.gotoService(t.param.id)},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("provider"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-services"]],decls:1,vars:7,consts:[["tableId","service-providers","icon","providers",3,"rest","onItem","multiSelect","allowExport","hasPermissions","customButtons","pageSize","customButtonAction","newAction","editAction","deleteAction","rowSelected","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("customButtonAction",function(t){return e.onMaintenance(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("rowSelected",function(t){return e.onRowSelect(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.providers)("onItem",e.processElement)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".row-maintenance-true>mat-cell{color:orange!important} .mat-column-maintenance_state, .mat-column-services_count, .mat-column-user_services_count{max-width:7rem;justify-content:center}"]}),t}(),cR=function(){function t(t,e,n,i){this.title=t,this.data=e,this.columns=n,this.id=i,this.columnsDefinition=Array.from(n,function(t){var e={};return e[t.field]={visible:!0,title:t.title,type:void 0===t.type?PM.ALPHANUMERIC:t.type},e})}return t.prototype.get=function(t){return Tf},t.prototype.getLogs=function(t){return Tf},t.prototype.overview=function(t){return"function"==typeof this.data?this.data():Pd([])},t.prototype.summary=function(t){return this.overview()},t.prototype.put=function(t,e){return Tf},t.prototype.create=function(t){return Tf},t.prototype.save=function(t,e){return Tf},t.prototype.test=function(t,e){return Tf},t.prototype.delete=function(t){return Tf},t.prototype.permision=function(){return mI.ALL},t.prototype.getPermissions=function(t){return Tf},t.prototype.addPermission=function(t,e,n,i){return Tf},t.prototype.revokePermission=function(t){return Tf},t.prototype.types=function(){return Pd([])},t.prototype.gui=function(t){return Tf},t.prototype.callback=function(t,e){return Tf},t.prototype.tableInfo=function(){return Pd({fields:this.columnsDefinition,title:this.title})},t.prototype.detail=function(t,e){return null},t.prototype.invoke=function(t,e){return Tf},t}();function hR(t,e){if(1&t){var n=bs();ps(0,"button",24),Ss("click",function(){rn(n);var t=Ds();return t.filterText="",t.applyFilter()}),ps(1,"i",8),tl(2,"close"),gs(),gs()}}function dR(t,e){if(1&t&&(ps(0,"mat-header-cell",28),tl(1),gs()),2&t){var n=Ds().$implicit;Oo(1),el(n)}}function fR(t,e){if(1&t&&(ps(0,"mat-cell"),ms(1,"div",29),gs()),2&t){var n=e.$implicit,i=Ds().$implicit,r=Ds();Oo(1),ds("innerHtml",r.getRowColumn(n,i),Dr)}}function pR(t,e){1&t&&(vs(0,25),us(1,dR,2,1,"mat-header-cell",26),us(2,fR,2,1,"mat-cell",27),ys()),2&t&&ds("matColumnDef",e.$implicit)}function gR(t,e){1&t&&ms(0,"mat-header-row")}function mR(t,e){if(1&t&&ms(0,"mat-row",30),2&t){var n=e.$implicit;ds("ngClass",Ds().rowClass(n))}}var vR=function(){return[5,10,25,100,1e3]},yR=function(){function t(t){this.api=t,this.pageSize=10,this.filterText="",this.title="Logs",this.displayedColumns=["date","level","source","message"],this.columns=[],this.dataSource=new dO([]),this.selection=new py}return t.prototype.ngOnInit=function(){var t=this;this.tableId=this.tableId||this.rest.id,this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sort.active=this.api.getFromStorage("logs-sort-column")||"date",this.dataSource.sort.direction=this.api.getFromStorage("logs-sort-direction")||"desc",this.displayedColumns.forEach(function(e){t.columns.push({name:e,title:e,type:"date"===e?PM.DATETIMESEC:PM.ALPHANUMERIC})}),this.filterText=this.api.getFromStorage(this.tableId+"filterValue")||"",this.applyFilter(),this.overview()},t.prototype.overview=function(){var t=this;this.rest.getLogs(this.itemId).subscribe(function(e){t.dataSource.data=e})},t.prototype.selectElement=function(t,e){},t.prototype.getRowColumn=function(t,e){var n=t[e];return"date"===e?n=qI("SHORT_DATE_FORMAT",n," H:i:s"):"level"===e&&(n={1e4:"OTHER",2e4:"DEBUG",3e4:"INFO",4e4:"WARN",5e4:"ERROR",6e4:"FATAL"}[n]||"OTHER"),n},t.prototype.rowClass=function(t){return["level-"+t.level]},t.prototype.applyFilter=function(){this.api.putOnStorage(this.tableId+"filterValue",this.filterText),this.dataSource.filter=this.filterText.trim().toLowerCase()},t.prototype.sortChanged=function(t){this.api.putOnStorage("logs-sort-column",t.active),this.api.putOnStorage("logs-sort-direction",t.direction)},t.prototype.export=function(){WO(this)},t.prototype.keyDown=function(t){switch(t.keyCode){case Ly:this.paginator.firstPage(),t.preventDefault();break;case Ry:this.paginator.lastPage(),t.preventDefault();break;case Vy:this.paginator.nextPage(),t.preventDefault();break;case Ny:this.paginator.previousPage(),t.preventDefault()}},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-logs-table"]],viewQuery:function(t,e){if(1&t&&(Ju(YD,3),Ju(JD,3)),2&t){var n=void 0;Qu(n=ec())&&(e.paginator=n.first),Qu(n=ec())&&(e.sort=n.first)}},inputs:{rest:"rest",itemId:"itemId",tableId:"tableId",pageSize:"pageSize"},decls:36,vars:12,consts:[[1,"card"],[1,"card-header"],[1,"card-title"],[3,"src"],[1,"card-content"],[1,"header"],[1,"buttons"],["mat-raised-button","",3,"click"],[1,"material-icons"],[1,"button-text"],[1,"navigation"],[1,"filter"],["matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"paginator"],[3,"pageSize","hidePageSize","pageSizeOptions","showFirstLastButtons"],[1,"reload"],["mat-icon-button","",3,"click"],["tabindex","0",1,"table",3,"keydown"],["matSort","",3,"dataSource","matSortChange"],[3,"matColumnDef",4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[3,"ngClass",4,"matRowDef","matRowDefColumns"],[1,"footer"],["mat-button","","matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"matColumnDef"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["mat-sort-header",""],[3,"innerHtml"],[3,"ngClass"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"div",2),ms(3,"img",3),tl(4," \xa0"),ps(5,"uds-translate"),tl(6,"Logs"),gs(),gs(),gs(),ps(7,"div",4),ps(8,"div",5),ps(9,"div",6),ps(10,"a",7),Ss("click",function(){return e.export()}),ps(11,"i",8),tl(12,"import_export"),gs(),ps(13,"span",9),ps(14,"uds-translate"),tl(15,"Export"),gs(),gs(),gs(),gs(),ps(16,"div",10),ps(17,"div",11),ps(18,"uds-translate"),tl(19,"Filter"),gs(),tl(20,"\xa0 "),ps(21,"mat-form-field"),ps(22,"input",12),Ss("keyup",function(){return e.applyFilter()})("ngModelChange",function(t){return e.filterText=t}),gs(),us(23,hR,3,0,"button",13),gs(),gs(),ps(24,"div",14),ms(25,"mat-paginator",15),gs(),ps(26,"div",16),ps(27,"a",17),Ss("click",function(){return e.overview()}),ps(28,"i",8),tl(29,"autorenew"),gs(),gs(),gs(),gs(),gs(),ps(30,"div",18),Ss("keydown",function(t){return e.keyDown(t)}),ps(31,"mat-table",19),Ss("matSortChange",function(t){return e.sortChanged(t)}),us(32,pR,3,1,"ng-container",20),us(33,gR,1,0,"mat-header-row",21),us(34,mR,1,1,"mat-row",22),gs(),gs(),ms(35,"div",23),gs(),gs()),2&t&&(Oo(3),ds("src",e.api.staticURL("admin/img/icons/logs.png"),Er),Oo(19),ds("ngModel",e.filterText),Oo(1),ds("ngIf",e.filterText),Oo(2),ds("pageSize",e.pageSize)("hidePageSize",!0)("pageSizeOptions",Iu(11,vR))("showFirstLastButtons",!0),Oo(6),ds("dataSource",e.dataSource),Oo(1),ds("ngForOf",e.displayedColumns),Oo(1),ds("matHeaderRowDef",e.displayedColumns),Oo(1),ds("matRowDefColumns",e.displayedColumns))},directives:[VS,NS,nD,CO,QS,AC,eA,Lh,YD,UE,JD,Ph,nO,rO,LS,$T,KE,XE,YE,QE,oE,tO,aO,lO,Eh],styles:[".header[_ngcontent-%COMP%]{justify-content:space-between;margin:1rem 1rem 0}.header[_ngcontent-%COMP%], .navigation[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.navigation[_ngcontent-%COMP%]{justify-content:flex-start}.reload[_ngcontent-%COMP%]{margin-top:.5rem}.table[_ngcontent-%COMP%]{margin:0 1rem;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.mat-column-date[_ngcontent-%COMP%]{max-width:160px}.mat-column-level[_ngcontent-%COMP%]{max-width:96px;text-align:center}.mat-column-source[_ngcontent-%COMP%]{max-width:128px} .level-50000>.mat-cell, .level-60000>.mat-cell{color:#ff1e1e!important} .level-40000>.mat-cell{color:#d65014!important}"]}),t}();function _R(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services pools"),gs())}function bR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}var wR=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],xR=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.customButtons=[WM.getGotoButton(FM,"id")],this.services=i.services,this.service=i.service}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{service:i,services:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.servicePools=new cR(django.gettext("Service pools"),function(){return t.services.invoke(t.service.id+"/servicesPools")},wR,this.service.id+"infopsls")},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-information"]],decls:17,vars:8,consts:[["mat-dialog-title",""],["mat-tab-label",""],[3,"rest","customButtons","pageSize"],[1,"content"],[3,"rest","itemId","tableId","pageSize"],["mat-raised-button","","mat-dialog-close","","color","primary"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Information for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"mat-tab-group"),ps(6,"mat-tab"),us(7,_R,2,0,"ng-template",1),ms(8,"uds-table",2),gs(),ps(9,"mat-tab"),us(10,bR,2,0,"ng-template",1),ps(11,"div",3),ms(12,"uds-logs-table",4),gs(),gs(),gs(),gs(),ps(13,"mat-dialog-actions"),ps(14,"button",5),ps(15,"uds-translate"),tl(16,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.service.name,"\n"),Oo(5),ds("rest",e.servicePools)("customButtons",e.customButtons)("pageSize",6),Oo(4),ds("rest",e.services)("itemId",e.service.id)("tableId","serviceInfo-d-log"+e.service.id)("pageSize",5))},directives:[SS,VS,CS,JA,GA,zA,oR,yR,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.mat-column-count[_ngcontent-%COMP%], .mat-column-image[_ngcontent-%COMP%], .mat-column-state[_ngcontent-%COMP%]{max-width:7rem;justify-content:center}.navigation[_ngcontent-%COMP%]{margin-top:1rem;display:flex;justify-content:flex-end;flex-wrap:wrap}.reload[_ngcontent-%COMP%]{margin-top:.5rem}"]}),t}();function kR(t,e){if(1&t&&(ps(0,"div",3),ms(1,"div",4),ms(2,"div",5),gs()),2&t){var n=e.$implicit;Oo(1),ds("innerHTML",n.gui.label,Dr),Oo(1),ds("innerHTML",n.value,Dr)}}var SR=function(){function t(t){this.api=t,this.displayables=null}return t.prototype.ngOnInit=function(){this.processFields()},t.prototype.processFields=function(){var t=this;if(!this.gui||!this.value)return[];var e=this.gui.filter(function(t){return t.gui.type!==WS.HIDDEN});e.forEach(function(e){var n=t.value[e.name];switch(e.gui.type){case WS.CHECKBOX:e.value=n?django.gettext("Yes"):django.gettext("No");break;case WS.PASSWORD:e.value=django.gettext("(hidden)");break;case WS.CHOICE:var i=YS.locateChoice(n,e);e.value=i.text;break;case WS.MULTI_CHOICE:e.value=django.gettext("Selected items :")+n.length;break;case WS.IMAGECHOICE:i=YS.locateChoice(n,e),e.value=t.api.safeString(t.api.gui.icon(i.img)+" "+i.text);break;default:e.value=n}""!==e.value&&null!=e.value||(e.value="(empty)")}),this.displayables=e},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-information"]],inputs:{value:"value",gui:"gui"},decls:4,vars:1,consts:[[1,"card"],[1,"card-content"],["class","item",4,"ngFor","ngForOf"],[1,"item"],[1,"label",3,"innerHTML"],[1,"value",3,"innerHTML"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),us(2,kR,3,2,"div",2),gs(),ms(3,"div"),gs()),2&t&&(Oo(2),ds("ngForOf",e.displayables))},directives:[Ph],styles:[".card-content[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column}.item[_ngcontent-%COMP%]{padding-bottom:.5rem;display:flex}.label[_ngcontent-%COMP%]{font-weight:700;width:32rem;overflow-x:hidden;text-overflow:ellipsis;text-align:end;margin-right:1rem;align-self:center}"]}),t}();function CR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function AR(t,e){if(1&t&&ms(0,"uds-information",15),2&t){var n=Ds(2);ds("value",n.provider)("gui",n.gui)}}function MR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services"),gs())}function IR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Usage"),gs())}function TR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function DR(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,CR,2,0,"ng-template",9),ps(5,"div",10),us(6,AR,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,MR,2,0,"ng-template",9),ps(9,"div",10),ps(10,"uds-table",12),Ss("newAction",function(t){return rn(n),Ds().onNewService(t)})("editAction",function(t){return rn(n),Ds().onEditService(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteService(t)})("customButtonAction",function(t){return rn(n),Ds().onInformation(t)})("loaded",function(t){return rn(n),Ds().onLoad(t)}),gs(),gs(),gs(),ps(11,"mat-tab"),us(12,IR,2,0,"ng-template",9),ps(13,"div",10),ps(14,"uds-table",13),Ss("deleteAction",function(t){return rn(n),Ds().onDeleteUsage(t)}),gs(),gs(),gs(),ps(15,"mat-tab"),us(16,TR,2,0,"ng-template",9),ps(17,"div",10),ms(18,"uds-logs-table",14),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("selectedIndex",i.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",i.provider&&i.gui),Oo(4),ds("rest",i.services)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-services"+i.provider.id),Oo(4),ds("rest",i.usage)("multiSelect",!0)("allowExport",!0)("pageSize",i.api.config.admin.page_size)("tableId","providers-d-usage"+i.provider.id),Oo(4),ds("rest",i.services.parentModel)("itemId",i.provider.id)("tableId","providers-d-log"+i.provider.id)}}var ER=function(t){return["/providers",t]},OR=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:RM.ONLY_MENU}],this.provider=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("provider");this.services=this.rest.providers.detail(e,"services"),this.usage=this.rest.providers.detail(e,"usage"),this.services.parentModel.get(e).subscribe(function(e){t.provider=e,t.services.parentModel.gui(e.type).subscribe(function(e){t.gui=e})})},t.prototype.onInformation=function(t){xR.launch(this.api,this.services,t.table.selection.selected[0])},t.prototype.onNewService=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New service"),!1)},t.prototype.onEditService=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit service"),!1)},t.prototype.onDeleteService=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service"))},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user service"))},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("service");if(void 0!==e){this.selectedTab=1;var n=t.table;n.dataSource.data.forEach(function(t){t.id===e&&n.selection.select(t)})}}},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-services-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","providers",3,"rest","multiSelect","allowExport","customButtons","pageSize","tableId","newAction","editAction","deleteAction","customButtonAction","loaded"],["icon","usage",3,"rest","multiSelect","allowExport","pageSize","tableId","deleteAction"],[3,"rest","itemId","tableId"],[3,"value","gui"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,DR,19,17,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,ER,e.services.parentId)),Oo(4),ds("src",e.api.staticURL("admin/img/icons/services.png"),Er),Oo(1),nl(" \xa0",null==e.provider?null:e.provider.name," "),Oo(1),ds("ngIf",null!==e.provider))},directives:[Gm,Lh,JA,GA,zA,oR,yR,VS,SR],styles:[""]}),t}(),PR=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("authenticator")},t.prototype.onDetail=function(t){this.api.navigation.gotoAuthenticatorDetail(t.param.id)},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Authenticator"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Authenticator"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Authenticator"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("authenticator"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible)},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-authenticators"]],decls:2,vars:6,consts:[["icon","authenticators",3,"rest","multiSelect","allowExport","hasPermissions","onItem","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.authenticators)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),RR=["panel"];function LR(t,e){if(1&t&&(ps(0,"div",0,1),Ps(2),gs()),2&t){var n=e.id,i=Ds();ds("id",i.id)("ngClass",i._classList),ss("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(n))}}var NR=["*"],FR=0,VR=function t(e,n){o(this,t),this.source=e,this.option=n},zR=yk(function t(){o(this,t)}),BR=new wi("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}}),HR=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a){var s;return o(this,n),(s=e.call(this))._changeDetectorRef=t,s._elementRef=i,s._activeOptionChanges=M.EMPTY,s.showPanel=!1,s._isOpen=!1,s.displayWith=null,s.optionSelected=new Bu,s.opened=new Bu,s.closed=new Bu,s.optionActivated=new Bu,s._classList={},s.id="mat-autocomplete-".concat(FR++),s.inertGroups=(null==a?void 0:a.SAFARI)||!1,s._autoActiveFirstOption=!!r.autoActiveFirstOption,s}return s(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new H_(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(function(e){t.optionActivated.emit({source:t,option:t.options.toArray()[e]||null})}),this._setVisibility()}},{key:"ngOnDestroy",value:function(){this._activeOptionChanges.unsubscribe()}},{key:"_setScrollTop",value:function(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}},{key:"_getScrollTop",value:function(){return this.panel?this.panel.nativeElement.scrollTop:0}},{key:"_setVisibility",value:function(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}},{key:"_emitSelectEvent",value:function(t){var e=new VR(this,t);this.optionSelected.emit(e)}},{key:"_getPanelAriaLabelledby",value:function(t){return this.ariaLabel?null:this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}},{key:"_setVisibilityClasses",value:function(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}},{key:"isOpen",get:function(){return this._isOpen&&this.showPanel}},{key:"autoActiveFirstOption",get:function(){return this._autoActiveFirstOption},set:function(t){this._autoActiveFirstOption=fv(t)}},{key:"classList",set:function(t){this._classList=t&&t.length?_v(t).reduce(function(t,e){return t[e]=!0,t},{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}}]),n}(zR);return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs(Tl),hs(BR),hs(ey))},t.\u0275dir=ve({type:t,viewQuery:function(t,e){var n;1&t&&(Ju(lu,3),Ju(RR,1)),2&t&&(Qu(n=ec())&&(e.template=n.first),Qu(n=ec())&&(e.panel=n.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[Xa]}),t}(),jR=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._visibleClass="mat-autocomplete-visible",t._hiddenClass="mat-autocomplete-hidden",t}return n}(HR);return t.\u0275fac=function(e){return GR(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,Jk,1),tc(n,iS,1)),2&t&&(Qu(i=ec())&&(e.optionGroups=i),Qu(i=ec())&&(e.options=i))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[wl([{provide:Zk,useExisting:t}]),Xa],ngContentSelectors:NR,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(Os(),us(0,LR,3,4,"ng-template"))},directives:[Eh],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"],encapsulation:2,changeDetection:0}),t}(),GR=mi(jR),UR=new wi("mat-autocomplete-scroll-strategy"),WR={provide:UR,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},YR={provide:ZS,useExisting:Ct(function(){return XR}),multi:!0},qR=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c,h,d){var f=this;o(this,t),this._element=e,this._overlay=n,this._viewContainerRef=i,this._zone=r,this._changeDetectorRef=a,this._dir=l,this._formField=u,this._document=c,this._viewportRuler=h,this._defaults=d,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=M.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new U,this._windowBlurHandler=function(){f._canOpenOnNextFocus=f._document.activeElement!==f._element.nativeElement||f.panelOpen},this._onChange=function(){},this._onTouched=function(){},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Ef(function(){return f.autocomplete&&f.autocomplete.options?dt.apply(void 0,b(f.autocomplete.options.map(function(t){return t.onSelectionChange}))):f._zone.onStable.pipe(Nf(1),Of(function(){return f.optionSelections}))}),this._scrollStrategy=s}return s(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular(function(){return e.addEventListener("blur",t._windowBlurHandler)})}},{key:"ngOnChanges",value:function(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}},{key:"ngOnDestroy",value:function(){var t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}},{key:"openPanel",value:function(){this._attachOverlay(),this._floatLabel()}},{key:"closePanel",value:function(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}},{key:"updatePosition",value:function(){this._overlayAttached&&this._overlayRef.updatePosition()}},{key:"_getOutsideClickStream",value:function(){var t=this;return dt(bv(this._document,"click"),bv(this._document,"auxclick"),bv(this._document,"touchend")).pipe(Ld(function(e){var n=t._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,i=t._formField?t._formField._elementRef.nativeElement:null,r=t.connectedTo?t.connectedTo.elementRef.nativeElement:null;return t._overlayAttached&&n!==t._element.nativeElement&&(!i||!i.contains(n))&&(!r||!r.contains(n))&&!!t._overlayRef&&!t._overlayRef.overlayElement.contains(n)}))}},{key:"writeValue",value:function(t){var e=this;Promise.resolve(null).then(function(){return e._setTriggerValue(t)})}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this._element.nativeElement.disabled=t}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;if(e!==Oy||By(t)||t.preventDefault(),this.activeOption&&e===Ey&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){var n=this.autocomplete._keyManager.activeItem,i=e===Fy||e===zy;this.panelOpen||9===e?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}},{key:"_handleInput",value:function(t){var e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}},{key:"_handleFocus",value:function(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}},{key:"_floatLabel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}},{key:"_resetLabel",value:function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}},{key:"_subscribeToClosingActions",value:function(){var t=this;return dt(this._zone.onStable.pipe(Nf(1)),this.autocomplete.options.changes.pipe(rp(function(){return t._positionStrategy.reapplyLastPosition()}),pO(0))).pipe(Of(function(){var e=t.panelOpen;return t._resetActiveItem(),t.autocomplete._setVisibility(),t.panelOpen&&(t._overlayRef.updatePosition(),e!==t.panelOpen&&t.autocomplete.opened.emit()),t.panelClosingActions}),Nf(1)).subscribe(function(e){return t._setValueAndClose(e)})}},{key:"_destroyPanel",value:function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}},{key:"_setTriggerValue",value:function(t){var e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}},{key:"_setValueAndClose",value:function(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}},{key:"_clearPreviousSelectedOption",value:function(t){this.autocomplete.options.forEach(function(e){e!==t&&e.selected&&e.deselect()})}},{key:"_attachOverlay",value:function(){var t,e=this;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!sy(this._element.nativeElement));var n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new xy(this.autocomplete.template,this._viewContainerRef,{id:null===(t=this._formField)||void 0===t?void 0:t.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,n.keydownEvents().subscribe(function(t){(t.keyCode===Oy&&!By(t)||t.keyCode===Fy&&By(t,"altKey"))&&(e._resetActiveItem(),e._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(function(){e.panelOpen&&n&&n.updateSize({width:e._getPanelWidth()})})),n&&!n.hasAttached()&&(n.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());var i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}},{key:"_getOverlayConfig",value:function(){var t;return new Zy({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir,panelClass:null===(t=this._defaults)||void 0===t?void 0:t.overlayPanelClass})}},{key:"_getOverlayPosition",value:function(){var t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}},{key:"_setStrategyPositions",value:function(t){var e,n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];e="above"===this.position?r:"below"===this.position?n:[].concat(n,r),t.withPositions(e)}},{key:"_getConnectedElement",value:function(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}},{key:"_getPanelWidth",value:function(){return this.autocomplete.panelWidth||this._getHostWidth()}},{key:"_getHostWidth",value:function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}},{key:"_resetActiveItem",value:function(){var t=this.autocomplete;t.autoActiveFirstOption?t._keyManager.setFirstItemActive():t._keyManager.setActiveItem(-1)}},{key:"_canOpen",value:function(){var t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}},{key:"_getWindow",value:function(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}},{key:"_scrollToOption",value:function(t){var e=this.autocomplete,n=rS(t,e.options,e.optionGroups);if(0===t&&1===n)e._setScrollTop(0);else if(e.panel){var i=e.options.toArray()[t];if(i){var r=i._getHostElement(),o=oS(r.offsetTop,r.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(o)}}}},{key:"autocompleteDisabled",get:function(){return this._autocompleteDisabled},set:function(t){this._autocompleteDisabled=fv(t)}},{key:"panelOpen",get:function(){return this._overlayAttached&&this.autocomplete.showPanel}},{key:"panelClosingActions",get:function(){var t=this;return dt(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ld(function(){return t._overlayAttached})),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ld(function(){return t._overlayAttached})):Pd()).pipe(q(function(t){return t instanceof eS?t:null}))}},{key:"activeOption",get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(g_),hs(pu),hs(Mc),hs(eu),hs(UR),hs(uy,8),hs(eD,9),hs(uh,8),hs(vy),hs(BR,8))},t.\u0275dir=ve({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[Ee]}),t}(),XR=function(){var t=function(t){u(n,t);var e=p(n);function n(){var t;return o(this,n),(t=e.apply(this,arguments))._aboveClass="mat-autocomplete-panel-above",t}return n}(qR);return t.\u0275fac=function(e){return ZR(e||t)},t.\u0275dir=ve({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&Ss("focusin",function(){return e._handleFocus()})("blur",function(){return e._onTouched()})("input",function(t){return e._handleInput(t)})("keydown",function(t){return e._handleKeydown(t)}),2&t&&ss("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[wl([YR]),Xa]}),t}(),ZR=mi(XR),KR=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[WR],imports:[[w_,aS,gk,Kh],yy,aS,gk]}),t}();function $R(t,e){if(1&t&&(ps(0,"div"),ps(1,"uds-translate"),tl(2,"Edit user"),gs(),tl(3),gs()),2&t){var n=Ds();Oo(3),nl(" ",n.user.name," ")}}function QR(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New user"),gs())}function JR(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",19),Ss("ngModelChange",function(t){return rn(n),Ds().user.name=t}),gs(),gs()}if(2&t){var i=Ds();Oo(2),nl(" ",i.authenticator.type_info.userNameLabel," "),Oo(1),ds("ngModel",i.user.name)("disabled",i.user.id)}}function tL(t,e){if(1&t&&(ps(0,"mat-option",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),il(" ",n.id," (",n.name,") ")}}function eL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",20),Ss("ngModelChange",function(t){return rn(n),Ds().user.name=t})("input",function(t){return rn(n),Ds().filterUser(t)}),gs(),ps(4,"mat-autocomplete",null,21),us(6,tL,2,3,"mat-option",16),gs(),gs()}if(2&t){var i=cs(5),r=Ds();Oo(2),nl(" ",r.authenticator.type_info.userNameLabel," "),Oo(1),ds("ngModel",r.user.name)("matAutocomplete",i),Oo(3),ds("ngForOf",r.users)}}function nL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",23),Ss("ngModelChange",function(t){return rn(n),Ds().user.password=t}),gs(),gs()}if(2&t){var i=Ds();Oo(2),nl(" ",i.authenticator.type_info.passwordLabel," "),Oo(1),ds("ngModel",i.user.password)}}function iL(t,e){if(1&t&&(ps(0,"mat-option",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var rL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.users=[],this.authenticator=i.authenticator,this.user={id:void 0,name:"",real_name:"",comments:"",state:"A",is_admin:!1,staff_member:!1,password:"",role:"user",groups:[]},void 0!==i.user&&(this.user.id=i.user.id,this.user.name=i.user.name)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,user:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").overview().subscribe(function(e){t.groups=e}),this.user.id&&this.rest.authenticators.detail(this.authenticator.id,"users").get(this.user.id).subscribe(function(e){t.user=e,t.user.role=e.is_admin?"admin":e.staff_member?"staff":"user"},function(e){t.dialogRef.close()})},t.prototype.roleChanged=function(t){this.user.is_admin="admin"===t,this.user.staff_member="admin"===t||"staff"===t},t.prototype.filterUser=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"user",t.target.value,100).subscribe(function(t){e.users.length=0,t.forEach(function(t){e.users.push(t)})})},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"users").save(this.user).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-new-user"]],decls:60,vars:11,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],[4,"ngIf"],["type","text","matInput","","autocomplete","new-real_name",3,"ngModel","ngModelChange"],["type","text","matInput","","autocomplete","new-comments",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["value","B"],[3,"ngModel","ngModelChange","valueChange"],["value","admin"],["value","staff"],["value","user"],["multiple","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["type","text","matInput","","autocomplete","new-username",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value"],["type","password","matInput","","autocomplete","new-password",3,"ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,$R,4,1,"div",1),us(2,QR,2,0,"ng-template",null,2,oc),gs(),ps(4,"mat-dialog-content"),ps(5,"div",3),us(6,JR,4,3,"mat-form-field",4),us(7,eL,7,4,"mat-form-field",4),ps(8,"mat-form-field"),ps(9,"mat-label"),ps(10,"uds-translate"),tl(11,"Real name"),gs(),gs(),ps(12,"input",5),Ss("ngModelChange",function(t){return e.user.real_name=t}),gs(),gs(),ps(13,"mat-form-field"),ps(14,"mat-label"),ps(15,"uds-translate"),tl(16,"Comments"),gs(),gs(),ps(17,"input",6),Ss("ngModelChange",function(t){return e.user.comments=t}),gs(),gs(),ps(18,"mat-form-field"),ps(19,"mat-label"),ps(20,"uds-translate"),tl(21,"State"),gs(),gs(),ps(22,"mat-select",7),Ss("ngModelChange",function(t){return e.user.state=t}),ps(23,"mat-option",8),ps(24,"uds-translate"),tl(25,"Enabled"),gs(),gs(),ps(26,"mat-option",9),ps(27,"uds-translate"),tl(28,"Disabled"),gs(),gs(),ps(29,"mat-option",10),ps(30,"uds-translate"),tl(31,"Blocked"),gs(),gs(),gs(),gs(),ps(32,"mat-form-field"),ps(33,"mat-label"),ps(34,"uds-translate"),tl(35,"Role"),gs(),gs(),ps(36,"mat-select",11),Ss("ngModelChange",function(t){return e.user.role=t})("valueChange",function(t){return e.roleChanged(t)}),ps(37,"mat-option",12),ps(38,"uds-translate"),tl(39,"Admin"),gs(),gs(),ps(40,"mat-option",13),ps(41,"uds-translate"),tl(42,"Staff member"),gs(),gs(),ps(43,"mat-option",14),ps(44,"uds-translate"),tl(45,"User"),gs(),gs(),gs(),gs(),us(46,nL,4,2,"mat-form-field",4),ps(47,"mat-form-field"),ps(48,"mat-label"),ps(49,"uds-translate"),tl(50,"Groups"),gs(),gs(),ps(51,"mat-select",15),Ss("ngModelChange",function(t){return e.user.groups=t}),us(52,iL,2,2,"mat-option",16),gs(),gs(),gs(),gs(),ps(53,"mat-dialog-actions"),ps(54,"button",17),ps(55,"uds-translate"),tl(56,"Cancel"),gs(),gs(),ps(57,"button",18),Ss("click",function(){return e.save()}),ps(58,"uds-translate"),tl(59,"Ok"),gs(),gs(),gs()),2&t){var n=cs(3);Oo(1),ds("ngIf",e.user.id)("ngIfElse",n),Oo(5),ds("ngIf",!1===e.authenticator.type_info.canSearchUsers||e.user.id),Oo(1),ds("ngIf",!0===e.authenticator.type_info.canSearchUsers&&!e.user.id),Oo(5),ds("ngModel",e.user.real_name),Oo(5),ds("ngModel",e.user.comments),Oo(5),ds("ngModel",e.user.state),Oo(14),ds("ngModel",e.user.role),Oo(10),ds("ngIf",e.authenticator.type_info.needsPassword),Oo(5),ds("ngModel",e.user.groups),Oo(1),ds("ngForOf",e.groups)}},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,SD,iS,Ph,AS,LS,kS,XR,jR],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),oL=["thumbContainer"],aL=["toggleBar"],sL=["input"],lL=function(){return{enterDuration:150}},uL=["*"],cL=new wi("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1}}}),hL=0,dL={provide:ZS,useExisting:Ct(function(){return gL}),multi:!0},fL=function t(e,n){o(this,t),this.source=e,this.checked=n},pL=_k(vk(yk(mk(function t(e){o(this,t),this._elementRef=e})),"accent")),gL=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this,t))._focusMonitor=i,u._changeDetectorRef=r,u.defaults=s,u._animationMode=l,u._onChange=function(t){},u._onTouched=function(){},u._uniqueId="mat-slide-toggle-".concat(++hL),u._required=!1,u._checked=!1,u.name=null,u.id=u._uniqueId,u.labelPosition="after",u.ariaLabel=null,u.ariaLabelledby=null,u.change=new Bu,u.toggleChange=new Bu,u.tabIndex=parseInt(a)||0,u}return s(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe(function(e){"keyboard"===e||"program"===e?t._inputElement.nativeElement.focus():e||Promise.resolve().then(function(){return t._onTouched()})})}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(t,e){e?this._focusMonitor.focusVia(this._inputElement,e,t):this._inputElement.nativeElement.focus(t)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new fL(this,this.checked))}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t)}},{key:"checked",get:function(){return this._checked},set:function(t){this._checked=fv(t),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return"".concat(this.id||this._uniqueId,"-input")}}]),n}(pL);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ib),hs(eu),yi("tabindex"),hs(cL),hs(rk,8))},t.\u0275cmp=he({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var n;1&t&&(Ju(oL,1),Ju(aL,1),Ju(sL,1)),2&t&&(Qu(n=ec())&&(e._thumbEl=n.first),Qu(n=ec())&&(e._thumbBarEl=n.first),Qu(n=ec())&&(e._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(rl("id",e.id),ss("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),Gs("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[wl([dL]),Xa],ngContentSelectors:uL,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(Os(),ps(0,"label",0,1),ps(2,"div",2,3),ps(4,"input",4,5),Ss("change",function(t){return e._onChangeEvent(t)})("click",function(t){return e._onInputClick(t)}),gs(),ps(6,"div",6,7),ms(8,"div",8),ps(9,"div",9),ms(10,"div",10),gs(),gs(),gs(),ps(11,"span",11,12),Ss("cdkObserveContent",function(){return e._onLabelTextChange()}),ps(13,"span",13),tl(14,"\xa0"),gs(),Ps(15),gs(),gs()),2&t){var n=cs(1),i=cs(12);ss("for",e.inputId),Oo(2),Gs("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),Oo(2),ds("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),ss("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Oo(5),ds("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",Iu(17,lL))}},directives:[Wk,I_],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t}(),mL={provide:eC,useExisting:Ct(function(){return vL}),multi:!0},vL=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(dA);return t.\u0275fac=function(e){return yL(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[wl([mL]),Xa]}),t}(),yL=mi(vL),_L=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),bL=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[_L,Yk,gk,T_],_L,gk]}),t}();function wL(t,e){if(1&t&&(ps(0,"div"),ps(1,"uds-translate"),tl(2,"Edit group"),gs(),tl(3),gs()),2&t){var n=Ds();Oo(3),nl(" ",n.group.name," ")}}function xL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New group"),gs())}function kL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",13),Ss("ngModelChange",function(t){return rn(n),Ds(2).group.name=t}),gs(),gs()}if(2&t){var i=Ds(2);Oo(2),nl(" ",i.authenticator.type_info.groupNameLabel," "),Oo(1),ds("ngModel",i.group.name)("disabled",i.group.id)}}function SL(t,e){if(1&t&&(ps(0,"mat-option",17),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),il(" ",n.id," (",n.name,") ")}}function CL(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",14),Ss("ngModelChange",function(t){return rn(n),Ds(2).group.name=t})("input",function(t){return rn(n),Ds(2).filterGroup(t)}),gs(),ps(4,"mat-autocomplete",null,15),us(6,SL,2,3,"mat-option",16),gs(),gs()}if(2&t){var i=cs(5),r=Ds(2);Oo(2),nl(" ",r.authenticator.type_info.groupNameLabel," "),Oo(1),ds("ngModel",r.group.name)("matAutocomplete",i),Oo(3),ds("ngForOf",r.fltrGroup)}}function AL(t,e){if(1&t&&(vs(0),us(1,kL,4,3,"mat-form-field",12),us(2,CL,7,4,"mat-form-field",12),ys()),2&t){var n=Ds();Oo(1),ds("ngIf",!1===n.authenticator.type_info.canSearchGroups||n.group.id),Oo(1),ds("ngIf",!0===n.authenticator.type_info.canSearchGroups&&!n.group.id)}}function ML(t,e){if(1&t){var n=bs();ps(0,"mat-form-field"),ps(1,"mat-label"),ps(2,"uds-translate"),tl(3,"Meta group name"),gs(),gs(),ps(4,"input",13),Ss("ngModelChange",function(t){return rn(n),Ds().group.name=t}),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.group.name)("disabled",i.group.id)}}function IL(t,e){if(1&t&&(ps(0,"mat-option",17),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function TL(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Service Pools"),gs(),gs(),ps(5,"mat-select",18),Ss("ngModelChange",function(t){return rn(n),Ds().group.pools=t}),us(6,IL,2,2,"mat-option",16),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.group.pools),Oo(1),ds("ngForOf",i.servicePools)}}function DL(t,e){if(1&t&&(ps(0,"mat-option",17),tl(1),gs()),2&t){var n=Ds().$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function EL(t,e){if(1&t&&(vs(0),us(1,DL,2,2,"mat-option",22),ys()),2&t){var n=e.$implicit;Oo(1),ds("ngIf","group"===n.type)}}function OL(t,e){if(1&t){var n=bs();ps(0,"div",19),ps(1,"span",20),ps(2,"uds-translate"),tl(3,"Match mode"),gs(),gs(),ps(4,"mat-slide-toggle",6),Ss("ngModelChange",function(t){return rn(n),Ds().group.meta_if_any=t}),tl(5),gs(),gs(),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Selected Groups"),gs(),gs(),ps(10,"mat-select",18),Ss("ngModelChange",function(t){return rn(n),Ds().group.groups=t}),us(11,EL,2,1,"ng-container",21),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.group.meta_if_any),Oo(1),nl(" ",i.getMatchValue()," "),Oo(5),ds("ngModel",i.group.groups),Oo(1),ds("ngForOf",i.groups)}}var PL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.fltrGroup=[],this.authenticator=i.authenticator,this.group={id:void 0,type:i.groupType,name:"",comments:"",meta_if_any:!1,state:"A",groups:[],pools:[]},void 0!==i.group&&(this.group.id=i.group.id,this.group.type=i.group.type,this.group.name=i.group.name)}return t.launch=function(e,n,i,r){var o=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:o,position:{top:window.innerWidth<800?"0px":"7rem"},data:{authenticator:n,groupType:i,group:r},disableClose:!0}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.authenticator.id,"groups");void 0!==this.group.id&&e.get(this.group.id).subscribe(function(e){t.group=e},function(e){t.dialogRef.close()}),"meta"===this.group.type?e.summary().subscribe(function(e){return t.groups=e}):this.rest.servicesPools.summary().subscribe(function(e){return t.servicePools=e})},t.prototype.filterGroup=function(t){var e=this;this.rest.authenticators.search(this.authenticator.id,"group",t.target.value,100).subscribe(function(t){e.fltrGroup.length=0,t.forEach(function(t){e.fltrGroup.push(t)})})},t.prototype.getMatchValue=function(){return this.group.meta_if_any?django.gettext("Any"):django.gettext("All")},t.prototype.save=function(){var t=this;this.rest.authenticators.detail(this.authenticator.id,"groups").save(this.group).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-new-group"]],decls:35,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["nousertitle",""],[1,"content"],["metafirst",""],["type","text","matInput","",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],["value","A"],["value","I"],["metasecond",""],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[4,"ngIf"],["type","text","matInput","",3,"ngModel","disabled","ngModelChange"],["type","text","aria-label","Number","matInput","",3,"ngModel","matAutocomplete","ngModelChange","input"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["multiple","",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-match"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,wL,4,1,"div",1),us(2,xL,2,0,"ng-template",null,2,oc),gs(),ps(4,"mat-dialog-content"),ps(5,"div",3),us(6,AL,3,2,"ng-container",1),us(7,ML,5,2,"ng-template",null,4,oc),ps(9,"mat-form-field"),ps(10,"mat-label"),ps(11,"uds-translate"),tl(12,"Comments"),gs(),gs(),ps(13,"input",5),Ss("ngModelChange",function(t){return e.group.comments=t}),gs(),gs(),ps(14,"mat-form-field"),ps(15,"mat-label"),ps(16,"uds-translate"),tl(17,"State"),gs(),gs(),ps(18,"mat-select",6),Ss("ngModelChange",function(t){return e.group.state=t}),ps(19,"mat-option",7),ps(20,"uds-translate"),tl(21,"Enabled"),gs(),gs(),ps(22,"mat-option",8),ps(23,"uds-translate"),tl(24,"Disabled"),gs(),gs(),gs(),gs(),us(25,TL,7,2,"ng-container",1),us(26,OL,12,4,"ng-template",null,9,oc),gs(),gs(),ps(28,"mat-dialog-actions"),ps(29,"button",10),ps(30,"uds-translate"),tl(31,"Cancel"),gs(),gs(),ps(32,"button",11),Ss("click",function(){return e.save()}),ps(33,"uds-translate"),tl(34,"Ok"),gs(),gs(),gs()),2&t){var n=cs(3),i=cs(8),r=cs(27);Oo(1),ds("ngIf",e.group.id)("ngIfElse",n),Oo(5),ds("ngIf","group"===e.group.type)("ngIfElse",i),Oo(7),ds("ngModel",e.group.comments),Oo(5),ds("ngModel",e.group.state),Oo(7),ds("ngIf","group"===e.group.type)("ngIfElse",r)}},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,SD,iS,AS,LS,kS,XR,jR,Ph,gL],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-match[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function RL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function LL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,RL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.group)("pageSize",6)}}function NL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services Pools"),gs())}function FL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,NL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.servicesPools)("pageSize",6)}}function VL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Assigned Services"),gs())}function zL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,VL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.userServices)("pageSize",6)}}var BL=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],HL=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],jL=[{field:"unique_id",title:django.gettext("Unique ID")},{field:"friendly_name",title:django.gettext("Friendly Name")},{field:"in_use",title:django.gettext("In Use")},{field:"ip",title:django.gettext("IP")},{field:"pool",title:django.gettext("Services Pool")}],GL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.users=i.users,this.user=i.user}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{users:n,user:i},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.detail(this.users.parentId,"users").get(this.user.id).subscribe(function(e){t.group=new cR(django.gettext("Groups"),function(){return t.rest.authenticators.detail(t.users.parentId,"groups").overview().pipe(q(function(t){return t.filter(function(t){return e.groups.includes(t.id)})}))},BL,t.user.id+"infogrp"),t.servicesPools=new cR(django.gettext("Services Pools"),function(){return t.users.invoke(t.user.id+"/servicesPools")},HL,t.user.id+"infopool"),t.userServices=new cR(django.gettext("Assigned services"),function(){return t.users.invoke(t.user.id+"/userServices").pipe(q(function(e){return e.map(function(e){return e.in_use=t.api.yesno(e.in_use),e})}))},jL,t.user.id+"userservpool")})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-user-information"]],decls:13,vars:4,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],[3,"rest","pageSize"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Information for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"mat-tab-group"),us(6,LL,3,2,"mat-tab",1),us(7,FL,3,2,"mat-tab",1),us(8,zL,3,2,"mat-tab",1),gs(),gs(),ps(9,"mat-dialog-actions"),ps(10,"button",2),ps(11,"uds-translate"),tl(12,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.user.name,"\n"),Oo(3),ds("ngIf",e.group),Oo(1),ds("ngIf",e.servicesPools),Oo(1),ds("ngIf",e.userServices))},directives:[SS,VS,CS,JA,Lh,AS,LS,kS,GA,zA,oR],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function UL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Services Pools"),gs())}function WL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,UL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.servicesPools)("pageSize",6)}}function YL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Users"),gs())}function qL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,YL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.users)("pageSize",6)}}function XL(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function ZL(t,e){if(1&t&&(ps(0,"mat-tab"),us(1,XL,2,0,"ng-template",3),ms(2,"uds-table",4),gs()),2&t){var n=Ds();Oo(2),ds("rest",n.groups)("pageSize",6)}}var KL=[{field:"name",title:django.gettext("Pool")},{field:"state",title:django.gettext("State")},{field:"user_services_count",title:django.gettext("User Services")}],$L=[{field:"name",title:django.gettext("Name")},{field:"real_name",title:django.gettext("Real Name")},{field:"state",title:django.gettext("state")},{field:"last_access",title:django.gettext("Last access"),type:PM.DATETIME}],QL=[{field:"name",title:django.gettext("Group")},{field:"comments",title:django.gettext("Comments")}],JL=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.data=i}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{group:i,groups:n},disableClose:!1})},t.prototype.ngOnInit=function(){var t=this,e=this.rest.authenticators.detail(this.data.groups.parentId,"groups");this.servicesPools=new cR(django.gettext("Service pools"),function(){return e.invoke(t.data.group.id+"/servicesPools")},KL,this.data.group.id+"infopls"),this.users=new cR(django.gettext("Users"),function(){return e.invoke(t.data.group.id+"/users").pipe(q(function(t){return t.map(function(t){return t.state="A"===t.state?django.gettext("Enabled"):"I"===t.state?django.gettext("Disabled"):django.gettext("Blocked"),t})}))},$L,this.data.group.id+"infousr"),"meta"===this.data.group.type&&(this.groups=new cR(django.gettext("Groups"),function(){return e.overview().pipe(q(function(e){return e.filter(function(e){return t.data.group.groups.includes(e.id)})}))},QL,this.data.group.id+"infogrps"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-group-information"]],decls:12,vars:3,consts:[["mat-dialog-title",""],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","primary"],["mat-tab-label",""],[3,"rest","pageSize"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Information for"),gs(),gs(),ps(3,"mat-dialog-content"),ps(4,"mat-tab-group"),us(5,WL,3,2,"mat-tab",1),us(6,qL,3,2,"mat-tab",1),us(7,ZL,3,2,"mat-tab",1),gs(),gs(),ps(8,"mat-dialog-actions"),ps(9,"button",2),ps(10,"uds-translate"),tl(11,"Ok"),gs(),gs(),gs()),2&t&&(Oo(5),ds("ngIf",e.servicesPools),Oo(1),ds("ngIf",e.users),Oo(1),ds("ngIf",e.groups))},directives:[SS,VS,CS,JA,Lh,AS,LS,kS,GA,zA,oR],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function tN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function eN(t,e){if(1&t&&ms(0,"uds-information",16),2&t){var n=Ds(2);ds("value",n.authenticator)("gui",n.gui)}}function nN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Users"),gs())}function iN(t,e){if(1&t){var n=bs();ps(0,"uds-table",17),Ss("loaded",function(t){return rn(n),Ds(2).onLoad(t)})("newAction",function(t){return rn(n),Ds(2).onNewUser(t)})("editAction",function(t){return rn(n),Ds(2).onEditUser(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteUser(t)})("customButtonAction",function(t){return rn(n),Ds(2).onUserInformation(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function rN(t,e){if(1&t){var n=bs();ps(0,"uds-table",18),Ss("loaded",function(t){return rn(n),Ds(2).onLoad(t)})("editAction",function(t){return rn(n),Ds(2).onEditUser(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteUser(t)})("customButtonAction",function(t){return rn(n),Ds(2).onUserInformation(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.users)("multiSelect",!0)("allowExport",!0)("tableId","authenticators-d-users"+i.authenticator.id)("customButtons",i.customButtons)("pageSize",i.api.config.admin.page_size)}}function oN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function aN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function sN(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,tN,2,0,"ng-template",9),ps(5,"div",10),us(6,eN,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,nN,2,0,"ng-template",9),ps(9,"div",10),us(10,iN,1,6,"uds-table",12),us(11,rN,1,6,"uds-table",13),gs(),gs(),ps(12,"mat-tab"),us(13,oN,2,0,"ng-template",9),ps(14,"div",10),ps(15,"uds-table",14),Ss("loaded",function(t){return rn(n),Ds().onLoad(t)})("newAction",function(t){return rn(n),Ds().onNewGroup(t)})("editAction",function(t){return rn(n),Ds().onEditGroup(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteGroup(t)})("customButtonAction",function(t){return rn(n),Ds().onGroupInformation(t)}),gs(),gs(),gs(),ps(16,"mat-tab"),us(17,aN,2,0,"ng-template",9),ps(18,"div",10),ms(19,"uds-logs-table",15),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("selectedIndex",i.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",i.authenticator&&i.gui),Oo(4),ds("ngIf",i.authenticator.type_info.canCreateUsers),Oo(1),ds("ngIf",!i.authenticator.type_info.canCreateUsers),Oo(4),ds("rest",i.groups)("multiSelect",!0)("allowExport",!0)("customButtons",i.customButtons)("tableId","authenticators-d-groups"+i.authenticator.id)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.rest.authenticators)("itemId",i.authenticator.id)("tableId","authenticators-d-log"+i.authenticator.id)}}var lN=function(t){return["/authenticators",t]},uN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[{id:"info",html:'info '+django.gettext("Information")+"",type:RM.ONLY_MENU}],this.authenticator=null,this.selectedTab=1,this.selectedTab=this.route.snapshot.paramMap.get("group")?2:1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("authenticator");this.users=this.rest.authenticators.detail(e,"users"),this.groups=this.rest.authenticators.detail(e,"groups"),this.rest.authenticators.get(e).subscribe(function(e){t.authenticator=e,t.rest.authenticators.gui(e.type).subscribe(function(e){t.gui=e})})},t.prototype.onLoad=function(t){if(!0===t.param){var e=this.route.snapshot.paramMap.get("user"),n=this.route.snapshot.paramMap.get("group");t.table.selectElement("id",e||n)}},t.prototype.processElement=function(t){t.maintenance_state=t.maintenance_mode?django.gettext("In Maintenance"):django.gettext("Active")},t.prototype.onNewUser=function(t){rL.launch(this.api,this.authenticator).subscribe(function(e){return t.table.overview()})},t.prototype.onEditUser=function(t){rL.launch(this.api,this.authenticator,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteUser=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete user"))},t.prototype.onNewGroup=function(t){PL.launch(this.api,this.authenticator,t.param.type).subscribe(function(e){return t.table.overview()})},t.prototype.onEditGroup=function(t){PL.launch(this.api,this.authenticator,t.param.type,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete group"))},t.prototype.onUserInformation=function(t){GL.launch(this.api,this.users,t.table.selection.selected[0])},t.prototype.onGroupInformation=function(t){JL.launch(this.api,this.groups,t.table.selection.selected[0])},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-authenticators-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction",4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],[3,"rest","itemId","tableId"],[3,"value","gui"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","newAction","editAction","deleteAction","customButtonAction"],["icon","users",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","loaded","editAction","deleteAction","customButtonAction"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,sN,20,14,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,lN,e.authenticator?e.authenticator.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/services.png"),Er),Oo(1),nl(" \xa0",null==e.authenticator?null:e.authenticator.name," "),Oo(1),ds("ngIf",e.authenticator))},directives:[Gm,Lh,JA,GA,zA,oR,yR,VS,SR],styles:[""]}),t}(),cN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("osmanager")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New OS Manager"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit OS Manager"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete OS Manager"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("osmanager"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-osmanagers"]],decls:2,vars:5,consts:[["icon","osmanagers",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.osManagers)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),hN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("transport")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Transport"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Transport"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Transport"))},t.prototype.processElement=function(t){try{t.allowed_oss=t.allowed_oss.map(function(t){return t.id}).join(", ")}catch(e){t.allowed_oss=""}},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("transport"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-transports"]],decls:2,vars:7,consts:[["icon","transports",3,"rest","multiSelect","allowExport","hasPermissions","newGrouped","onItem","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.transports)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("newGrouped",!0)("onItem",e.processElement)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[".mat-column-priority{max-width:7rem;justify-content:center}"]}),t}(),dN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("network")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Network"),!1)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Network"),!1)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Network"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("network"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-networks"]],decls:2,vars:5,consts:[["icon","networks",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.networks)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),fN=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){this.route.snapshot.paramMap.get("proxy")},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New Proxy"),!0)},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit Proxy"),!0)},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete Proxy"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("proxy"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-proxies"]],decls:2,vars:5,consts:[["icon","proxy",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.proxy)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}(),pN=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[WM.getGotoButton(LM,"provider_id"),WM.getGotoButton(NM,"provider_id","service_id"),WM.getGotoButton(HM,"osmanager_id"),WM.getGotoButton(GM,"pool_group_id")],this.editing=!1}return t.prototype.ngOnInit=function(){},t.prototype.onChange=function(t){var e=this,n=["initial_srvs","cache_l1_srvs","max_srvs"];if(null===t.on||"service_id"===t.on.field.name){if(""===t.all.service_id.value)return t.all.osmanager_id.gui.values.length=0,void n.forEach(function(e){return t.all[e].gui.rdonly=!0});this.rest.providers.service(t.all.service_id.value).subscribe(function(i){t.all.allow_users_reset.gui.rdonly=!i.info.can_reset,t.all.osmanager_id.gui.values.length=0,e.editing||(t.all.osmanager_id.gui.rdonly=!i.info.needs_manager),!0===i.info.needs_manager?e.rest.osManagers.overview().subscribe(function(e){e.forEach(function(e){e.servicesTypes.forEach(function(n){i.info.servicesTypeProvided.includes(n)&&t.all.osmanager_id.gui.values.push({id:e.id,text:e.name})})}),t.all.osmanager_id.value=t.all.osmanager_id.gui.values.length>0?t.all.osmanager_id.value||t.all.osmanager_id.gui.values[0].id:""}):(t.all.osmanager_id.gui.values.push({id:"",text:django.gettext("(This service does not requires an OS Manager)")}),t.all.osmanager_id.value=""),n.forEach(function(e){return t.all[e].gui.rdonly=!i.info.uses_cache}),t.all.cache_l2_srvs.gui.rdonly=!1===i.info.uses_cache||!1===i.info.uses_cache_l2,t.all.publish_on_save&&(t.all.publish_on_save.gui.rdonly=!i.info.needs_publication)}),n.forEach(function(e){t.all[e].gui.rdonly=!0})}},t.prototype.onNew=function(t){var e=this;this.editing=!1,this.api.gui.forms.typedNewForm(t,django.gettext("New service Pool"),!1,[{name:"publish_on_save",value:!0,gui:{label:django.gettext("Publish on creation"),tooltip:django.gettext("If selected, will initiate the publication inmediatly after creation"),type:WS.CHECKBOX,order:150,defvalue:"true"}}]).subscribe(function(t){return e.onChange(t)})},t.prototype.onEdit=function(t){var e=this;this.editing=!0,this.api.gui.forms.typedEditForm(t,django.gettext("Edit Service Pool"),!1).subscribe(function(t){return e.onChange(t)})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete service pool"))},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.show_transports=this.api.yesno(t.show_transports),t.restrained?(t.name='warning '+this.api.gui.icon(t.info.icon)+t.name,t.state="T"):(t.name=this.api.gui.icon(t.info.icon)+t.name,t.meta_member.length>0&&(t.state="V")),t.name=this.api.safeString(t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onDetail=function(t){this.api.navigation.gotoServicePoolDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("pool"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools"]],decls:1,vars:7,consts:[["icon","pools",3,"rest","multiSelect","allowExport","hasPermissions","onItem","customButtons","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.servicesPools)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("onItem",e.processElement)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".mat-column-state, .mat-column-usage, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center} .mat-column-show_transports{max-width:10rem;justify-content:center} .mat-column-pool_group_name{max-width:12rem} .row-state-T>.mat-cell{color:#d65014!important}"]}),t}();function gN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function mN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",9),Ss("changed",function(t){return rn(n),Ds().userFilter=t}),gs()}}function vN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var yN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.auths=[],this.users=[],this.userFilter="",this.userService=i.userService,this.userServices=i.userServices}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,userServices:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.authId=this.userService.owner_info.auth_id||"",this.userId=this.userService.owner_info.user_id||"",this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()})},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(!this.userFilter)return this.users;var e=new Array;return this.users.forEach(function(n){(""===t.userFilter||n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase()))&&e.push(n)}),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.userServices.save({id:this.userService.id,auth_id:this.authId,user_id:this.userId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.prototype.authChanged=function(){var t=this;this.rest.authenticators.detail(this.authId,"users").summary().subscribe(function(e){t.users=e})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-change-assigned-service-owner"]],decls:25,vars:5,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Change owner of assigned service"),gs(),gs(),ps(3,"mat-dialog-content"),ps(4,"div",1),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Authenticator"),gs(),gs(),ps(9,"mat-select",2),Ss("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),us(10,gN,2,2,"mat-option",3),gs(),gs(),ps(11,"mat-form-field"),ps(12,"mat-label"),ps(13,"uds-translate"),tl(14,"User"),gs(),gs(),ps(15,"mat-select",4),Ss("ngModelChange",function(t){return e.userId=t}),us(16,mN,1,0,"uds-mat-select-search",5),us(17,vN,2,2,"mat-option",3),gs(),gs(),gs(),gs(),ps(18,"mat-dialog-actions"),ps(19,"button",6),ps(20,"uds-translate"),tl(21,"Cancel"),gs(),gs(),ps(22,"button",7),Ss("click",function(){return e.save()}),ps(23,"uds-translate"),tl(24,"Ok"),gs(),gs(),gs()),2&t&&(Oo(9),ds("ngModel",e.authId),Oo(1),ds("ngForOf",e.auths),Oo(5),ds("ngModel",e.userId),Oo(1),ds("ngIf",e.users.length>10),Oo(1),ds("ngForOf",e.filteredUsers()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Ph,Lh,AS,LS,kS,iS,EO],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function _N(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New access rule for"),gs())}function bN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit access rule for"),gs())}function wN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Default fallback access for"),gs())}function xN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",11),Ss("changed",function(t){return rn(n),Ds(2).calendarsFilter=t}),gs()}}function kN(t,e){if(1&t&&(ps(0,"mat-option",12),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function SN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Priority"),gs(),gs(),ps(5,"input",8),Ss("ngModelChange",function(t){return rn(n),Ds().accessRule.priority=t}),gs(),gs(),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Calendar"),gs(),gs(),ps(10,"mat-select",3),Ss("ngModelChange",function(t){return rn(n),Ds().accessRule.calendarId=t}),us(11,xN,1,0,"uds-mat-select-search",9),us(12,kN,2,2,"mat-option",10),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.accessRule.priority),Oo(5),ds("ngModel",i.accessRule.calendarId),Oo(1),ds("ngIf",i.calendars.length>10),Oo(1),ds("ngForOf",i.filtered(i.calendars,i.calendarsFilter))}}var CN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.calendars=[],this.calendarsFilter="",this.pool=i.pool,this.model=i.model,this.accessRule={id:void 0,priority:0,access:"ALLOW",calendarId:""},i.accessRule&&(this.accessRule.id=i.accessRule.id)}return t.launch=function(e,n,i,r){var o=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:o,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i,accessRule:r},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.calendars.summary().subscribe(function(e){t.calendars=e}),void 0!==this.accessRule.id&&-1!==this.accessRule.id?this.model.get(this.accessRule.id).subscribe(function(e){t.accessRule=e}):-1===this.accessRule.id&&this.model.parentModel.getFallbackAccess(this.pool.id).subscribe(function(e){return t.accessRule.access=e})},t.prototype.filtered=function(t,e){return e?t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}):t},t.prototype.save=function(){var t=this,e=function(){t.dialogRef.close(),t.onSave.emit(!0)};-1!==this.accessRule.id?this.model.save(this.accessRule).subscribe(e):this.model.parentModel.setFallbackAccess(this.pool.id,this.accessRule.access).subscribe(e)},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-access-calendars"]],decls:24,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],[3,"ngModel","ngModelChange"],["value","ALLOW"],["value","DENY"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"h4",0),us(1,_N,2,0,"uds-translate",1),us(2,bN,2,0,"uds-translate",1),us(3,wN,2,0,"uds-translate",1),tl(4),gs(),ps(5,"mat-dialog-content"),ps(6,"div",2),us(7,SN,13,4,"ng-container",1),ps(8,"mat-form-field"),ps(9,"mat-label"),ps(10,"uds-translate"),tl(11,"Action"),gs(),gs(),ps(12,"mat-select",3),Ss("ngModelChange",function(t){return e.accessRule.access=t}),ps(13,"mat-option",4),tl(14," ALLOW "),gs(),ps(15,"mat-option",5),tl(16," DENY "),gs(),gs(),gs(),gs(),gs(),ps(17,"mat-dialog-actions"),ps(18,"button",6),ps(19,"uds-translate"),tl(20,"Cancel"),gs(),gs(),ps(21,"button",7),Ss("click",function(){return e.save()}),ps(22,"uds-translate"),tl(23,"Ok"),gs(),gs(),gs()),2&t&&(Oo(1),ds("ngIf",void 0===e.accessRule.id),Oo(1),ds("ngIf",void 0!==e.accessRule.id&&-1!==e.accessRule.id),Oo(1),ds("ngIf",-1===e.accessRule.id),Oo(1),nl(" ",e.pool.name,"\n"),Oo(3),ds("ngIf",-1!==e.accessRule.id),Oo(5),ds("ngModel",e.accessRule.access))},directives:[SS,Lh,CS,nD,qT,VS,SD,AC,eA,iS,AS,LS,kS,CO,rA,QS,Ph,EO],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function AN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function MN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",9),Ss("changed",function(t){return rn(n),Ds().groupFilter=t}),gs()}}function IN(t,e){if(1&t&&(vs(0),tl(1),ys()),2&t){var n=Ds().$implicit;Oo(1),nl(" (",n.comments,")")}}function TN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),us(2,IN,2,1,"ng-container",10),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name,""),Oo(1),ds("ngIf",n.comments)}}var DN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.model=null,this.auths=[],this.groups=[],this.groupFilter="",this.authId="",this.groupId="",this.pool=i.pool,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{pool:n,model:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()})},t.prototype.changeAuth=function(t){this.groupId="",this.authChanged()},t.prototype.filteredGroups=function(){var t=this;return!this.groupFilter||this.groupFilter.length<3?this.groups:this.groups.filter(function(e){return e.name.toLocaleLowerCase().includes(t.groupFilter.toLocaleLowerCase())})},t.prototype.save=function(){var t=this;""!==this.groupId&&""!==this.authId?this.model.create({id:this.groupId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid group"))},t.prototype.authChanged=function(){var t=this;""!==this.authId&&this.rest.authenticators.detail(this.authId,"groups").summary().subscribe(function(e){t.groups=e})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-add-group"]],decls:26,vars:6,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"value"],[3,"changed"],[4,"ngIf"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"New group for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"div",1),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Authenticator"),gs(),gs(),ps(10,"mat-select",2),Ss("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),us(11,AN,2,2,"mat-option",3),gs(),gs(),ps(12,"mat-form-field"),ps(13,"mat-label"),ps(14,"uds-translate"),tl(15,"Group"),gs(),gs(),ps(16,"mat-select",4),Ss("ngModelChange",function(t){return e.groupId=t}),us(17,MN,1,0,"uds-mat-select-search",5),us(18,TN,3,3,"mat-option",3),gs(),gs(),gs(),gs(),ps(19,"mat-dialog-actions"),ps(20,"button",6),ps(21,"uds-translate"),tl(22,"Cancel"),gs(),gs(),ps(23,"button",7),Ss("click",function(){return e.save()}),ps(24,"uds-translate"),tl(25,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.pool.name,"\n"),Oo(7),ds("ngModel",e.authId),Oo(1),ds("ngForOf",e.auths),Oo(5),ds("ngModel",e.groupId),Oo(1),ds("ngIf",e.groups.length>10),Oo(1),ds("ngForOf",e.filteredGroups()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Ph,Lh,AS,LS,kS,iS,EO],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}();function EN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",7),Ss("changed",function(t){return rn(n),Ds().transportsFilter=t}),gs()}}function ON(t,e){if(1&t&&(vs(0),tl(1),ys()),2&t){var n=Ds().$implicit;Oo(1),nl(" (",n.comments,")")}}function PN(t,e){if(1&t&&(ps(0,"mat-option",8),tl(1),us(2,ON,2,1,"ng-container",9),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name,""),Oo(1),ds("ngIf",n.comments)}}var RN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.transports=[],this.transportsFilter="",this.transportId="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.transports.summary().subscribe(function(e){t.transports=e.filter(function(e){return t.servicePool.info.allowedProtocols.includes(e.protocol)})})},t.prototype.filteredTransports=function(){var t=this;return this.transportsFilter?this.transports.filter(function(e){return e.name.toLocaleLowerCase().includes(t.transportsFilter.toLocaleLowerCase())}):this.transports},t.prototype.save=function(){var t=this;""!==this.transportId?this.rest.servicesPools.detail(this.servicePool.id,"transports").create({id:this.transportId}).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid transport"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-add-transport"]],decls:20,vars:4,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[4,"ngIf"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"New transport for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"div",1),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Transport"),gs(),gs(),ps(10,"mat-select",2),Ss("ngModelChange",function(t){return e.transportId=t}),us(11,EN,1,0,"uds-mat-select-search",3),us(12,PN,3,3,"mat-option",4),gs(),gs(),gs(),gs(),ps(13,"mat-dialog-actions"),ps(14,"button",5),ps(15,"uds-translate"),tl(16,"Cancel"),gs(),gs(),ps(17,"button",6),Ss("click",function(){return e.save()}),ps(18,"uds-translate"),tl(19,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(7),ds("ngModel",e.transportId),Oo(1),ds("ngIf",e.transports.length>10),Oo(1),ds("ngForOf",e.filteredTransports()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Lh,Ph,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),LN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.reason="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){},t.prototype.save=function(){var t=this;this.rest.servicesPools.detail(this.servicePool.id,"publications").invoke("publish","changelog="+encodeURIComponent(this.reason)).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-new-publication"]],decls:18,vars:2,consts:[["mat-dialog-title",""],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"New publication for"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ps(5,"div",1),ps(6,"mat-form-field"),ps(7,"mat-label"),ps(8,"uds-translate"),tl(9,"Comments"),gs(),gs(),ps(10,"input",2),Ss("ngModelChange",function(t){return e.reason=t}),gs(),gs(),gs(),gs(),ps(11,"mat-dialog-actions"),ps(12,"button",3),ps(13,"uds-translate"),tl(14,"Cancel"),gs(),gs(),ps(15,"button",4),Ss("click",function(){return e.save()}),ps(16,"uds-translate"),tl(17,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(7),ds("ngModel",e.reason))},directives:[SS,VS,CS,nD,qT,CO,QS,AC,eA,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),NN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1})},t.prototype.ngOnInit=function(){this.changeLogPubs=this.rest.servicesPools.detail(this.servicePool.id,"changelog")},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-publications-changelog"]],decls:11,vars:4,consts:[["mat-dialog-title",""],["icon","publications",3,"rest","allowExport","tableId"],["changeLog",""],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Changelog of"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ms(5,"uds-table",1,2),gs(),ps(7,"mat-dialog-actions"),ps(8,"button",3),ps(9,"uds-translate"),tl(10,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(2),ds("rest",e.changeLogPubs)("allowExport",!0)("tableId","servicePools-d-changelog"+e.servicePool.id))},directives:[SS,VS,CS,oR,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function FN(t,e){1&t&&(vs(0),ps(1,"uds-translate"),tl(2,"Edit action for"),gs(),ys())}function VN(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New action for"),gs())}function zN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",14),Ss("changed",function(t){return rn(n),Ds().calendarsFilter=t}),gs()}}function BN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function HN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.description," ")}}function jN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",14),Ss("changed",function(t){return rn(n),Ds(2).transportsFilter=t}),gs()}}function GN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function UN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Transport"),gs(),gs(),ps(5,"mat-select",4),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),us(6,jN,1,0,"uds-mat-select-search",5),us(7,GN,2,2,"mat-option",6),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.paramValue),Oo(1),ds("ngIf",i.transports.length>10),Oo(1),ds("ngForOf",i.filtered(i.transports,i.transportsFilter))}}function WN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function YN(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",14),Ss("changed",function(t){return rn(n),Ds(2).groupsFilter=t}),gs()}}function qN(t,e){if(1&t&&(ps(0,"mat-option",15),tl(1),gs()),2&t){var n=e.$implicit;ds("value",Ds(2).authenticator+"@"+n.id),Oo(1),nl(" ",n.name," ")}}function XN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),ps(3,"uds-translate"),tl(4,"Authenticator"),gs(),gs(),ps(5,"mat-select",10),Ss("ngModelChange",function(t){return rn(n),Ds().authenticator=t})("valueChange",function(t){return rn(n),Ds().changedAuthenticator(t)}),us(6,WN,2,2,"mat-option",6),gs(),gs(),ps(7,"mat-form-field"),ps(8,"mat-label"),ps(9,"uds-translate"),tl(10,"Group"),gs(),gs(),ps(11,"mat-select",4),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),us(12,YN,1,0,"uds-mat-select-search",5),us(13,qN,2,2,"mat-option",6),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(5),ds("ngModel",i.authenticator),Oo(1),ds("ngForOf",i.authenticators),Oo(5),ds("ngModel",i.paramValue),Oo(1),ds("ngIf",i.groups.length>10),Oo(1),ds("ngForOf",i.filtered(i.groups,i.groupsFilter))}}function ZN(t,e){if(1&t){var n=bs();vs(0),ps(1,"div",8),ps(2,"span",16),tl(3),gs(),tl(4,"\xa0 "),ps(5,"mat-slide-toggle",4),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(3),el(i.parameter.description),Oo(2),ds("ngModel",i.paramValue)}}function KN(t,e){if(1&t){var n=bs();vs(0),ps(1,"mat-form-field"),ps(2,"mat-label"),tl(3),gs(),ps(4,"input",17),Ss("ngModelChange",function(t){return rn(n),Ds().paramValue=t}),gs(),gs(),ys()}if(2&t){var i=Ds();Oo(3),nl(" ",i.parameter.description," "),Oo(1),ds("type",i.parameter.type)("ngModel",i.paramValue)}}var $N=function(){return["transport","group","bool"]},QN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.calendars=[],this.actionList=[],this.authenticators=[],this.transports=[],this.groups=[],this.paramsDict={},this.calendarsFilter="",this.groupsFilter="",this.transportsFilter="",this.authenticator="",this.parameter={},this.paramValue="",this.servicePool=i.servicePool,this.scheduledAction={id:void 0,action:"",calendar:"",calendarId:"",atStart:!0,eventsOffset:0,params:{}},void 0!==i.scheduledAction&&(this.scheduledAction.id=i.scheduledAction.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n,scheduledAction:i},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.authenticators.summary().subscribe(function(e){return t.authenticators=e}),this.rest.transports.summary().subscribe(function(e){return t.transports=e}),this.rest.calendars.summary().subscribe(function(e){return t.calendars=e}),this.rest.servicesPools.actionsList(this.servicePool.id).subscribe(function(e){t.actionList=e,t.actionList.forEach(function(e){t.paramsDict[e.id]=e.params[0]}),void 0!==t.scheduledAction.id&&t.rest.servicesPools.detail(t.servicePool.id,"actions").get(t.scheduledAction.id).subscribe(function(e){t.scheduledAction=e,t.changedAction(t.scheduledAction.action)})})},t.prototype.filtered=function(t,e){return e?t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}):t},t.prototype.changedAction=function(t){if(this.parameter=this.paramsDict[t],void 0!==this.parameter&&(this.paramValue=this.scheduledAction.params[this.parameter.name],void 0===this.paramValue&&(this.paramValue=!1!==this.parameter.default&&(this.parameter.default||"")),"group"===this.parameter.type)){var e=this.paramValue.split("@");2!==e.length&&(e=["",""]),this.authenticator=e[0],this.changedAuthenticator(this.authenticator)}},t.prototype.changedAuthenticator=function(t){var e=this;t&&this.rest.authenticators.detail(t,"groups").summary().subscribe(function(t){return e.groups=t})},t.prototype.save=function(){var t=this;this.scheduledAction.params={},this.parameter&&(this.scheduledAction.params[this.parameter.name]=this.paramValue),this.rest.servicesPools.detail(this.servicePool.id,"actions").save(this.scheduledAction).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-scheduled-action"]],decls:42,vars:16,consts:[["mat-dialog-title",""],[4,"ngIf","ngIfElse"],["editTitle",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number",3,"ngModel","ngModelChange"],[1,"mat-form-field-infix"],[1,"label-atstart"],[3,"ngModel","ngModelChange","valueChange"],[4,"ngIf"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"],[1,"label"],["matInput","",3,"type","ngModel","ngModelChange"]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,FN,3,0,"ng-container",1),us(2,VN,2,0,"ng-template",null,2,oc),tl(4),gs(),ps(5,"mat-dialog-content"),ps(6,"div",3),ps(7,"mat-form-field"),ps(8,"mat-label"),ps(9,"uds-translate"),tl(10,"Calendar"),gs(),gs(),ps(11,"mat-select",4),Ss("ngModelChange",function(t){return e.scheduledAction.calendarId=t}),us(12,zN,1,0,"uds-mat-select-search",5),us(13,BN,2,2,"mat-option",6),gs(),gs(),ps(14,"mat-form-field"),ps(15,"mat-label"),ps(16,"uds-translate"),tl(17,"Events offset (minutes)"),gs(),gs(),ps(18,"input",7),Ss("ngModelChange",function(t){return e.scheduledAction.eventsOffset=t}),gs(),gs(),ps(19,"div",8),ps(20,"span",9),ps(21,"uds-translate"),tl(22,"At the beginning of the interval?"),gs(),gs(),ps(23,"mat-slide-toggle",4),Ss("ngModelChange",function(t){return e.scheduledAction.atStart=t}),tl(24),gs(),gs(),ps(25,"mat-form-field"),ps(26,"mat-label"),ps(27,"uds-translate"),tl(28,"Action"),gs(),gs(),ps(29,"mat-select",10),Ss("ngModelChange",function(t){return e.scheduledAction.action=t})("valueChange",function(t){return e.changedAction(t)}),us(30,HN,2,2,"mat-option",6),gs(),gs(),us(31,UN,8,3,"ng-container",11),us(32,XN,14,5,"ng-container",11),us(33,ZN,6,2,"ng-container",11),us(34,KN,5,3,"ng-container",11),gs(),gs(),ps(35,"mat-dialog-actions"),ps(36,"button",12),ps(37,"uds-translate"),tl(38,"Cancel"),gs(),gs(),ps(39,"button",13),Ss("click",function(){return e.save()}),ps(40,"uds-translate"),tl(41,"Ok"),gs(),gs(),gs()),2&t){var n=cs(3);Oo(1),ds("ngIf",void 0!==e.scheduledAction.id)("ngIfElse",n),Oo(3),nl(" ",e.servicePool.name,"\n"),Oo(7),ds("ngModel",e.scheduledAction.calendarId),Oo(1),ds("ngIf",e.calendars.length>10),Oo(1),ds("ngForOf",e.filtered(e.calendars,e.calendarsFilter)),Oo(5),ds("ngModel",e.scheduledAction.eventsOffset),Oo(5),ds("ngModel",e.scheduledAction.atStart),Oo(1),nl(" ",e.api.yesno(e.scheduledAction.atStart)," "),Oo(5),ds("ngModel",e.scheduledAction.action),Oo(1),ds("ngForOf",e.actionList),Oo(1),ds("ngIf","transport"===(null==e.parameter?null:e.parameter.type)),Oo(1),ds("ngIf","group"===(null==e.parameter?null:e.parameter.type)),Oo(1),ds("ngIf","bool"===(null==e.parameter?null:e.parameter.type)),Oo(1),ds("ngIf",(null==e.parameter?null:e.parameter.type)&&!Iu(15,$N).includes(e.parameter.type))}},directives:[SS,Lh,CS,nD,qT,VS,SD,AC,eA,Ph,CO,rA,QS,gL,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-atstart[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}(),JN=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.userService=i.userService,this.model=i.model}return t.launch=function(e,n,i){var r=window.innerWidth<800?"80%":"60%";e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{userService:n,model:i},disableClose:!1})},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-userservices-log"]],decls:10,vars:4,consts:[["mat-dialog-title",""],[3,"rest","itemId","tableId"],["mat-raised-button","","color","primary","mat-dialog-close",""]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Logs of"),gs(),tl(3),gs(),ps(4,"mat-dialog-content"),ms(5,"uds-logs-table",1),gs(),ps(6,"mat-dialog-actions"),ps(7,"button",2),ps(8,"uds-translate"),tl(9,"Ok"),gs(),gs(),gs()),2&t&&(Oo(3),nl(" ",e.userService.name,"\n"),Oo(2),ds("rest",e.model)("itemId",e.userService.id)("tableId","servicePools-d-uslog"+e.userService.id))},directives:[SS,VS,CS,yR,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}();function tF(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",8),Ss("changed",function(t){return rn(n),Ds().assignablesServicesFilter=t}),gs()}}function eF(t,e){if(1&t&&(ps(0,"mat-option",9),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.text," ")}}function nF(t,e){if(1&t&&(ps(0,"mat-option",9),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}function iF(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",8),Ss("changed",function(t){return rn(n),Ds().userFilter=t}),gs()}}function rF(t,e){if(1&t&&(ps(0,"mat-option",9),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var oF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.auths=[],this.assignablesServices=[],this.assignablesServicesFilter="",this.users=[],this.userFilter="",this.servicePool=i.servicePool}return t.launch=function(e,n){var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{servicePool:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.authId="",this.userId="",this.rest.authenticators.summary().subscribe(function(e){t.auths=e,t.authChanged()}),this.rest.servicesPools.listAssignables(this.servicePool.id).subscribe(function(e){t.assignablesServices=e})},t.prototype.changeAuth=function(t){this.userId="",this.authChanged()},t.prototype.filteredUsers=function(){var t=this;if(!this.userFilter)return this.users;var e=new Array;return this.users.forEach(function(n){n.name.toLocaleLowerCase().includes(t.userFilter.toLocaleLowerCase())&&e.push(n)}),e},t.prototype.filteredAssignables=function(){var t=this;if(!this.assignablesServicesFilter)return this.assignablesServices;var e=new Array;return this.assignablesServices.forEach(function(n){n.text.toLocaleLowerCase().includes(t.assignablesServicesFilter.toLocaleLowerCase())&&e.push(n)}),e},t.prototype.save=function(){var t=this;""!==this.userId&&""!==this.authId?this.rest.servicesPools.createFromAssignable(this.servicePool.id,this.userId,this.serviceId).subscribe(function(e){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid user"))},t.prototype.authChanged=function(){var t=this;this.authId&&this.rest.authenticators.detail(this.authId,"users").summary().subscribe(function(e){t.users=e})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-assign-service-to-owner"]],decls:32,vars:8,consts:[["mat-dialog-title",""],[1,"content"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange","selectionChange"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"h4",0),ps(1,"uds-translate"),tl(2,"Assign service to user manually"),gs(),gs(),ps(3,"mat-dialog-content"),ps(4,"div",1),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Service"),gs(),gs(),ps(9,"mat-select",2),Ss("ngModelChange",function(t){return e.serviceId=t}),us(10,tF,1,0,"uds-mat-select-search",3),us(11,eF,2,2,"mat-option",4),gs(),gs(),ps(12,"mat-form-field"),ps(13,"mat-label"),ps(14,"uds-translate"),tl(15,"Authenticator"),gs(),gs(),ps(16,"mat-select",5),Ss("ngModelChange",function(t){return e.authId=t})("selectionChange",function(t){return e.changeAuth(t)}),us(17,nF,2,2,"mat-option",4),gs(),gs(),ps(18,"mat-form-field"),ps(19,"mat-label"),ps(20,"uds-translate"),tl(21,"User"),gs(),gs(),ps(22,"mat-select",2),Ss("ngModelChange",function(t){return e.userId=t}),us(23,iF,1,0,"uds-mat-select-search",3),us(24,rF,2,2,"mat-option",4),gs(),gs(),gs(),gs(),ps(25,"mat-dialog-actions"),ps(26,"button",6),ps(27,"uds-translate"),tl(28,"Cancel"),gs(),gs(),ps(29,"button",7),Ss("click",function(){return e.save()}),ps(30,"uds-translate"),tl(31,"Ok"),gs(),gs(),gs()),2&t&&(Oo(9),ds("ngModel",e.serviceId),Oo(1),ds("ngIf",e.assignablesServices.length>10),Oo(1),ds("ngForOf",e.filteredAssignables()),Oo(5),ds("ngModel",e.authId),Oo(1),ds("ngForOf",e.auths),Oo(5),ds("ngModel",e.userId),Oo(1),ds("ngIf",e.users.length>10),Oo(1),ds("ngForOf",e.filteredUsers()))},directives:[SS,VS,CS,nD,qT,SD,AC,eA,Lh,Ph,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}"]}),t}(),aF=function(){function t(t){this.rest=t,this.chart=null}return t.prototype.onResize=function(t){this.chart&&this.chart.resize()},t.prototype.ngOnInit=function(){var t=this;this.rest.system.stats("complete",this.poolUuid).subscribe(function(e){t.options={tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},restore:{},saveAsImage:{}}},xAxis:{type:"category",data:e.assigned.map(function(t){return qI("SHORT_DATETIME_FORMAT",new Date(t.stamp))}),boundaryGap:!1},yAxis:{type:"value",boundaryGap:!1},series:[{name:django.gettext("Assigned"),type:"line",stack:"services",smooth:!0,areaStyle:{},data:e.assigned.map(function(t){return t.value})},{name:django.gettext("Cached"),type:"line",stack:"services",smooth:!0,areaStyle:{},data:e.cached.map(function(t){return t.value})},{name:django.gettext("In use"),type:"line",smooth:!0,data:e.inuse.map(function(t){return t.value})}]}})},t.prototype.chartInit=function(t){this.chart=t},t.\u0275fac=function(e){return new(e||t)(hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-charts"]],hostBindings:function(t,e){1&t&&Ss("resize",function(t){return e.onResize(t)},!1,zr)},inputs:{poolUuid:"poolUuid"},decls:2,vars:1,consts:[[1,"statistics-chart"],["echarts","","theme","dark-digerati",3,"options","chartInit"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),Ss("chartInit",function(t){return e.chartInit(t)}),gs(),gs()),2&t&&(Oo(1),ds("options",e.options))},directives:[bT],styles:[""]}),t}();function sF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function lF(t,e){if(1&t&&ms(0,"uds-information",21),2&t){var n=Ds(2);ds("value",n.servicePool)("gui",n.gui)}}function uF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Assigned services"),gs())}function cF(t,e){if(1&t){var n=bs();ps(0,"uds-table",22),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomAssigned(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteAssigned(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function hF(t,e){if(1&t){var n=bs();ps(0,"uds-table",23),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomAssigned(t)})("newAction",function(t){return rn(n),Ds(2).onNewAssigned(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteAssigned(t)}),gs()}if(2&t){var i=Ds(2);ds("rest",i.assignedServices)("multiSelect",!0)("allowExport",!0)("onItem",i.processsAssignedElement)("tableId","servicePools-d-services"+i.servicePool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size)}}function dF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Cache"),gs())}function fF(t,e){if(1&t){var n=bs();ps(0,"mat-tab"),us(1,dF,2,0,"ng-template",9),ps(2,"div",10),ps(3,"uds-table",24),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomCached(t)})("deleteAction",function(t){return rn(n),Ds(2).onDeleteCache(t)}),gs(),gs(),gs()}if(2&t){var i=Ds(2);Oo(3),ds("rest",i.cache)("multiSelect",!0)("allowExport",!0)("onItem",i.processsCacheElement)("tableId","servicePools-d-cache"+i.servicePool.id)("customButtons",i.customButtonsCachedServices)("pageSize",i.api.config.admin.page_size)}}function pF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function gF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Transports"),gs())}function mF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Publications"),gs())}function vF(t,e){if(1&t){var n=bs();ps(0,"mat-tab"),us(1,mF,2,0,"ng-template",9),ps(2,"div",10),ps(3,"uds-table",25),Ss("customButtonAction",function(t){return rn(n),Ds(2).onCustomPublication(t)})("newAction",function(t){return rn(n),Ds(2).onNewPublication(t)})("rowSelected",function(t){return rn(n),Ds(2).onPublicationRowSelect(t)}),gs(),gs(),gs()}if(2&t){var i=Ds(2);Oo(3),ds("rest",i.publications)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-publications"+i.servicePool.id)("customButtons",i.customButtonsPublication)("pageSize",i.api.config.admin.page_size)}}function yF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Scheduled actions"),gs())}function _F(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Access calendars"),gs())}function bF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Charts"),gs())}function wF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function xF(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,sF,2,0,"ng-template",9),ps(5,"div",10),us(6,lF,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,uF,2,0,"ng-template",9),ps(9,"div",10),us(10,cF,1,7,"uds-table",12),us(11,hF,1,7,"ng-template",null,13,oc),gs(),gs(),us(13,fF,4,7,"mat-tab",14),ps(14,"mat-tab"),us(15,pF,2,0,"ng-template",9),ps(16,"div",10),ps(17,"uds-table",15),Ss("newAction",function(t){return rn(n),Ds().onNewGroup(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteGroup(t)}),gs(),gs(),gs(),ps(18,"mat-tab"),us(19,gF,2,0,"ng-template",9),ps(20,"div",10),ps(21,"uds-table",16),Ss("newAction",function(t){return rn(n),Ds().onNewTransport(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteTransport(t)}),gs(),gs(),gs(),us(22,vF,4,6,"mat-tab",14),ps(23,"mat-tab"),us(24,yF,2,0,"ng-template",9),ps(25,"div",10),ps(26,"uds-table",17),Ss("customButtonAction",function(t){return rn(n),Ds().onCustomScheduleAction(t)})("newAction",function(t){return rn(n),Ds().onNewScheduledAction(t)})("editAction",function(t){return rn(n),Ds().onEditScheduledAction(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteScheduledAction(t)}),gs(),gs(),gs(),ps(27,"mat-tab"),us(28,_F,2,0,"ng-template",9),ps(29,"div",10),ps(30,"uds-table",18),Ss("newAction",function(t){return rn(n),Ds().onNewAccessCalendar(t)})("editAction",function(t){return rn(n),Ds().onEditAccessCalendar(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteAccessCalendar(t)})("loaded",function(t){return rn(n),Ds().onAccessCalendarLoad(t)}),gs(),gs(),gs(),ps(31,"mat-tab"),us(32,bF,2,0,"ng-template",9),ps(33,"div",10),ms(34,"uds-service-pools-charts",19),gs(),gs(),ps(35,"mat-tab"),us(36,wF,2,0,"ng-template",9),ps(37,"div",10),ms(38,"uds-logs-table",20),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=cs(12),r=Ds();Oo(2),ds("selectedIndex",r.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",r.servicePool&&r.gui),Oo(4),ds("ngIf",!1===r.servicePool.info.must_assign_manually)("ngIfElse",i),Oo(3),ds("ngIf",r.cache),Oo(4),ds("rest",r.groups)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsGroups)("tableId","servicePools-d-groups"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Oo(4),ds("rest",r.transports)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonsTransports)("tableId","servicePools-d-transports"+r.servicePool.id)("pageSize",r.api.config.admin.page_size),Oo(1),ds("ngIf",r.publications),Oo(4),ds("rest",r.scheduledActions)("multiSelect",!0)("allowExport",!0)("tableId","servicePools-d-actions"+r.servicePool.id)("customButtons",r.customButtonsScheduledAction)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Oo(4),ds("rest",r.accessCalendars)("multiSelect",!0)("allowExport",!0)("customButtons",r.customButtonAccessCalendars)("tableId","servicePools-d-access"+r.servicePool.id)("onItem",r.processsCalendarOrScheduledElement)("pageSize",r.api.config.admin.page_size),Oo(4),ds("poolUuid",r.servicePool.id),Oo(4),ds("rest",r.rest.servicesPools)("itemId",r.servicePool.id)("tableId","servicePools-d-log"+r.servicePool.id)("pageSize",r.api.config.admin.page_size)}}var kF=function(t){return["/pools","service-pools",t]},SF='event'+django.gettext("Logs")+"",CF='computer'+django.gettext("VNC")+"",AF='schedule'+django.gettext("Launch now")+"",MF='perm_identity'+django.gettext("Change owner")+"",IF='perm_identity'+django.gettext("Assign service")+"",TF='cancel'+django.gettext("Cancel")+"",DF='event'+django.gettext("Changelog")+"",EF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtonsScheduledAction=[{id:"launch-action",html:AF,type:RM.SINGLE_SELECT},WM.getGotoButton(jM,"calendarId")],this.customButtonAccessCalendars=[WM.getGotoButton(jM,"calendarId")],this.customButtonsAssignedServices=[{id:"change-owner",html:MF,type:RM.SINGLE_SELECT},{id:"log",html:SF,type:RM.SINGLE_SELECT},{id:"vnc",html:CF,type:RM.ONLY_MENU},WM.getGotoButton(VM,"owner_info.auth_id","owner_info.user_id")],this.customButtonsCachedServices=[{id:"log",html:SF,type:RM.SINGLE_SELECT}],this.customButtonsPublication=[{id:"cancel-publication",html:TF,type:RM.SINGLE_SELECT},{id:"changelog",html:DF,type:RM.ALWAYS}],this.customButtonsGroups=[WM.getGotoButton(zM,"auth_id","id")],this.customButtonsTransports=[WM.getGotoButton(BM,"id")],this.servicePool=null,this.gui=null,this.selectedTab=1}return t.cleanInvalidSelections=function(t){return t.table.selection.selected.filter(function(t){return["E","R","M","S","C"].includes(t.state)}).forEach(function(e){return t.table.selection.deselect(e)}),t.table.selection.isEmpty()},t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("pool");this.assignedServices=this.rest.servicesPools.detail(e,"services"),this.groups=this.rest.servicesPools.detail(e,"groups"),this.transports=this.rest.servicesPools.detail(e,"transports"),this.scheduledActions=this.rest.servicesPools.detail(e,"actions"),this.accessCalendars=this.rest.servicesPools.detail(e,"access"),this.rest.servicesPools.get(e).subscribe(function(n){t.servicePool=n,t.cache=t.servicePool.info.uses_cache?t.rest.servicesPools.detail(e,"cache"):null,t.publications=t.servicePool.info.needs_publication?t.rest.servicesPools.detail(e,"publications"):null,t.servicePool.info.can_list_assignables&&t.customButtonsAssignedServices.push({id:"assign-service",html:IF,type:RM.ALWAYS}),t.rest.servicesPools.gui().subscribe(function(e){t.gui=e.filter(function(e){return!(!1===t.servicePool.info.uses_cache&&["initial_srvs","cache_l1_srvs","cache_l2_srvs","max_srvs"].includes(e.name)||!1===t.servicePool.info.uses_cache_l2&&"cache_l2_srvs"===e.name||!1===t.servicePool.info.needs_manager&&"osmanager_id"===e.name)})})})},t.prototype.onNewAssigned=function(t){},t.prototype.vnc=function(t){var e=new Blob(["[connection]\nhost="+t.ip+"\nport=5900\n"],{type:"application/extension-vnc"});setTimeout(function(){Object(GO.saveAs)(e,t.ip+".vnc")},100)},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;yN.launch(this.api,e,this.assignedServices).subscribe(function(e){return t.table.overview()})}else"log"===t.param.id?JN.launch(this.api,e,this.assignedServices):"assign-service"===t.param.id?oF.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()}):"vnc"===t.param.id&&this.vnc(e)},t.prototype.onCustomCached=function(t){"log"===t.param.id&&JN.launch(this.api,t.table.selection.selected[0],this.cache)},t.prototype.processsAssignedElement=function(t){t.in_use=this.api.yesno(t.in_use),t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onDeleteAssigned=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete assigned service"))},t.prototype.onDeleteCache=function(e){t.cleanInvalidSelections(e)||this.api.gui.forms.deleteForm(e,django.gettext("Delete cached service"))},t.prototype.processsCacheElement=function(t){t.origState=t.state,"U"===t.state&&(t.state=""!==t.os_state&&"U"!==t.os_state?"Z":"U")},t.prototype.onNewGroup=function(t){DN.launch(this.api,this.servicePool,this.groups).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewTransport=function(t){RN.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteTransport=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned transport"))},t.prototype.onNewPublication=function(t){LN.launch(this.api,this.servicePool).subscribe(function(e){t.table.overview()})},t.prototype.onPublicationRowSelect=function(t){1===t.table.selection.selected.length&&(this.customButtonsPublication[0].disabled=!["P","W","L","K"].includes(t.table.selection.selected[0].state))},t.prototype.onCustomPublication=function(t){var e=this;"cancel-publication"===t.param.id?this.api.gui.yesno(django.gettext("Publication"),django.gettext("Cancel publication?"),!0).subscribe(function(n){n&&e.publications.invoke(t.table.selection.selected[0].id+"/cancel").subscribe(function(n){e.api.gui.snackbar.open(django.gettext("Publication canceled"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})}):"changelog"===t.param.id&&NN.launch(this.api,this.servicePool)},t.prototype.onNewScheduledAction=function(t){QN.launch(this.api,this.servicePool).subscribe(function(e){return t.table.overview()})},t.prototype.onEditScheduledAction=function(t){QN.launch(this.api,this.servicePool,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteScheduledAction=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete scheduled action"))},t.prototype.onCustomScheduleAction=function(t){var e=this;this.api.gui.yesno(django.gettext("Execute scheduled action"),django.gettext("Execute scheduled action right now?")).subscribe(function(n){n&&e.scheduledActions.invoke(t.table.selection.selected[0].id+"/execute").subscribe(function(){e.api.gui.snackbar.open(django.gettext("Scheduled action executed"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})})},t.prototype.onNewAccessCalendar=function(t){CN.launch(this.api,this.servicePool,this.accessCalendars).subscribe(function(e){return t.table.overview()})},t.prototype.onEditAccessCalendar=function(t){CN.launch(this.api,this.servicePool,this.accessCalendars,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteAccessCalendar=function(t){-1!==t.table.selection.selected[0].id?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.servicesPools.getFallbackAccess(this.servicePool.id).subscribe(function(n){var i=t.table.dataSource.data.filter(function(t){return!0});i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i})},t.prototype.processsCalendarOrScheduledElement=function(t){t.name=t.calendar,t.atStart=this.api.yesno(t.atStart)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-service-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction",4,"ngIf","ngIfElse"],["manually_assigned",""],[4,"ngIf"],["icon","groups",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","transports",3,"rest","multiSelect","allowExport","customButtons","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","customButtons","onItem","pageSize","customButtonAction","newAction","editAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","customButtons","tableId","onItem","pageSize","newAction","editAction","deleteAction","loaded"],[3,"poolUuid"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","newAction","deleteAction"],["icon","cached",3,"rest","multiSelect","allowExport","onItem","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","publications",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","newAction","rowSelected"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,xF,39,38,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,kF,e.servicePool?e.servicePool.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/pools.png"),Er),Oo(1),nl(" \xa0",null==e.servicePool?null:e.servicePool.name," "),Oo(1),ds("ngIf",null!==e.servicePool))},directives:[Gm,Lh,JA,GA,zA,oR,aF,yR,VS,SR],styles:[".mat-column-state{max-width:10rem;justify-content:center} .mat-column-cache_level, .mat-column-in_use, .mat-column-priority, .mat-column-revision{max-width:7rem;justify-content:center} .mat-column-access, .mat-column-creation_date, .mat-column-publish_date, .mat-column-state_date, .mat-column-trans_type{max-width:9rem} .mat-column-owner{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word} .row-state-C>.mat-cell, .row-state-S>.mat-cell{color:grey!important} .row-state-E>.mat-cell{color:red!important} .row-state-R>.mat-cell{color:orange!important}"]}),t}(),OF=function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New meta pool"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit meta pool"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete meta pool"))},t.prototype.onDetail=function(t){this.api.navigation.gotoMetapoolDetail(t.param.id)},t.prototype.processElement=function(t){t.visible=this.api.yesno(t.visible),t.name=this.api.safeString(this.api.gui.icon(t.thumb)+t.name),t.pool_group_name=this.api.safeString(this.api.gui.icon(t.pool_group_thumb)+t.pool_group_name)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("metapool"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-meta-pools"]],decls:2,vars:6,consts:[["icon","metas",3,"rest","multiSelect","allowExport","onItem","hasPermissions","pageSize","detailAction","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"div"),ps(1,"uds-table",0),Ss("detailAction",function(t){return e.onDetail(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs(),gs()),2&t&&(Oo(1),ds("rest",e.rest.metaPools)("multiSelect",!0)("allowExport",!0)("onItem",e.processElement)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[".mat-column-pool_group_name, .mat-column-user_services_count, .mat-column-user_services_in_preparation, .mat-column-visible{max-width:7rem;justify-content:center}"]}),t}();function PF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New member pool"),gs())}function RF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit member pool"),gs())}function LF(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",11),Ss("changed",function(t){return rn(n),Ds().servicePoolsFilter=t}),gs()}}function NF(t,e){if(1&t&&(ps(0,"mat-option",12),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.name," ")}}var FF=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.servicePools=[],this.servicePoolsFilter="",this.model=i.model,this.memberPool={id:void 0,priority:0,pool_id:"",enabled:!0},i.memberPool&&(this.memberPool.id=i.memberPool.id)}return t.launch=function(e,n,i){var r=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:r,position:{top:window.innerWidth<800?"0px":"7rem"},data:{memberPool:i,model:n},disableClose:!1}).componentInstance.onSave},t.prototype.ngOnInit=function(){var t=this;this.rest.servicesPools.summary().subscribe(function(e){return t.servicePools=e}),this.memberPool.id&&this.model.get(this.memberPool.id).subscribe(function(e){return t.memberPool=e})},t.prototype.filtered=function(t,e){return e?t.filter(function(t){return t.name.toLocaleLowerCase().includes(e.toLocaleLowerCase())}):t},t.prototype.save=function(){var t=this;this.memberPool.pool_id?this.model.save(this.memberPool).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, select a valid service pool"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-meta-pools-service-pools"]],decls:30,vars:8,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"mat-form-field-infix"],[1,"label-enabled"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"h4",0),us(1,PF,2,0,"uds-translate",1),us(2,RF,2,0,"uds-translate",1),gs(),ps(3,"mat-dialog-content"),ps(4,"div",2),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Priority"),gs(),gs(),ps(9,"input",3),Ss("ngModelChange",function(t){return e.memberPool.priority=t}),gs(),gs(),ps(10,"mat-form-field"),ps(11,"mat-label"),ps(12,"uds-translate"),tl(13,"Service pool"),gs(),gs(),ps(14,"mat-select",4),Ss("ngModelChange",function(t){return e.memberPool.pool_id=t}),us(15,LF,1,0,"uds-mat-select-search",5),us(16,NF,2,2,"mat-option",6),gs(),gs(),ps(17,"div",7),ps(18,"span",8),ps(19,"uds-translate"),tl(20,"Enabled?"),gs(),gs(),ps(21,"mat-slide-toggle",4),Ss("ngModelChange",function(t){return e.memberPool.enabled=t}),tl(22),gs(),gs(),gs(),gs(),ps(23,"mat-dialog-actions"),ps(24,"button",9),ps(25,"uds-translate"),tl(26,"Cancel"),gs(),gs(),ps(27,"button",10),Ss("click",function(){return e.save()}),ps(28,"uds-translate"),tl(29,"Ok"),gs(),gs(),gs()),2&t&&(Oo(1),ds("ngIf",!(null!=e.memberPool&&e.memberPool.id)),Oo(1),ds("ngIf",null==e.memberPool?null:e.memberPool.id),Oo(7),ds("ngModel",e.memberPool.priority),Oo(5),ds("ngModel",e.memberPool.pool_id),Oo(1),ds("ngIf",e.servicePools.length>10),Oo(1),ds("ngForOf",e.filtered(e.servicePools,e.servicePoolsFilter)),Oo(5),ds("ngModel",e.memberPool.enabled),Oo(1),nl(" ",e.api.yesno(e.memberPool.enabled)," "))},directives:[SS,Lh,CS,nD,qT,VS,CO,rA,QS,AC,eA,SD,Ph,gL,AS,LS,kS,EO,iS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]{width:100%}.label-enabled[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function VF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Summary"),gs())}function zF(t,e){if(1&t&&ms(0,"uds-information",17),2&t){var n=Ds(2);ds("value",n.metaPool)("gui",n.gui)}}function BF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Service pools"),gs())}function HF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Assigned services"),gs())}function jF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Groups"),gs())}function GF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Access calendars"),gs())}function UF(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Logs"),gs())}function WF(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),Ss("selectedIndexChange",function(t){return rn(n),Ds().selectedTab=t}),ps(3,"mat-tab"),us(4,VF,2,0,"ng-template",9),ps(5,"div",10),us(6,zF,1,2,"uds-information",11),gs(),gs(),ps(7,"mat-tab"),us(8,BF,2,0,"ng-template",9),ps(9,"div",10),ps(10,"uds-table",12),Ss("newAction",function(t){return rn(n),Ds().onNewMemberPool(t)})("editAction",function(t){return rn(n),Ds().onEditMemberPool(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteMemberPool(t)}),gs(),gs(),gs(),ps(11,"mat-tab"),us(12,HF,2,0,"ng-template",9),ps(13,"div",10),ps(14,"uds-table",13),Ss("customButtonAction",function(t){return rn(n),Ds().onCustomAssigned(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteAssigned(t)}),gs(),gs(),gs(),ps(15,"mat-tab"),us(16,jF,2,0,"ng-template",9),ps(17,"div",10),ps(18,"uds-table",14),Ss("newAction",function(t){return rn(n),Ds().onNewGroup(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteGroup(t)}),gs(),gs(),gs(),ps(19,"mat-tab"),us(20,GF,2,0,"ng-template",9),ps(21,"div",10),ps(22,"uds-table",15),Ss("newAction",function(t){return rn(n),Ds().onNewAccessCalendar(t)})("editAction",function(t){return rn(n),Ds().onEditAccessCalendar(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteAccessCalendar(t)})("loaded",function(t){return rn(n),Ds().onAccessCalendarLoad(t)}),gs(),gs(),gs(),ps(23,"mat-tab"),us(24,UF,2,0,"ng-template",9),ps(25,"div",10),ms(26,"uds-logs-table",16),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("selectedIndex",i.selectedTab)("@.disabled",!0),Oo(4),ds("ngIf",i.metaPool&&i.gui),Oo(4),ds("rest",i.memberPools)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("customButtons",i.customButtons)("tableId","metaPools-d-members"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.memberUserServices)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-services"+i.metaPool.id)("customButtons",i.customButtonsAssignedServices)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.groups)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-groups"+i.metaPool.id)("pageSize",i.api.config.admin.page_size),Oo(4),ds("rest",i.accessCalendars)("multiSelect",!0)("allowExport",!0)("tableId","metaPools-d-access"+i.metaPool.id)("pageSize",i.api.config.admin.page_size)("onItem",i.processsCalendarItem),Oo(4),ds("rest",i.rest.metaPools)("itemId",i.metaPool.id)("tableId","metaPools-d-log"+i.metaPool.id)("pageSize",i.api.config.admin.page_size)}}var YF=function(t){return["/pools","meta-pools",t]},qF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.customButtons=[WM.getGotoButton(FM,"pool_id")],this.customButtonsAssignedServices=[{id:"change-owner",html:MF,type:RM.SINGLE_SELECT},{id:"log",html:SF,type:RM.SINGLE_SELECT},WM.getGotoButton(VM,"owner_info.auth_id","owner_info.user_id")],this.metaPool=null,this.gui=null,this.selectedTab=1}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("metapool");this.rest.metaPools.get(e).subscribe(function(n){t.metaPool=n,t.rest.metaPools.gui().subscribe(function(e){t.gui=e}),t.memberPools=t.rest.metaPools.detail(e,"pools"),t.memberUserServices=t.rest.metaPools.detail(e,"services"),t.groups=t.rest.metaPools.detail(e,"groups"),t.accessCalendars=t.rest.metaPools.detail(e,"access")})},t.prototype.onNewMemberPool=function(t){FF.launch(this.api,this.memberPools).subscribe(function(){return t.table.overview()})},t.prototype.onEditMemberPool=function(t){FF.launch(this.api,this.memberPools,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDeleteMemberPool=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Remove member pool"))},t.prototype.onCustomAssigned=function(t){var e=t.table.selection.selected[0];if("change-owner"===t.param.id){if(["E","R","M","S","C"].includes(e.state))return;yN.launch(this.api,e,this.memberUserServices).subscribe(function(e){return t.table.overview()})}else"log"===t.param.id&&JN.launch(this.api,e,this.memberUserServices)},t.prototype.onDeleteAssigned=function(t){EF.cleanInvalidSelections(t)||this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned service"))},t.prototype.onNewGroup=function(t){DN.launch(this.api,this.metaPool.id,this.groups).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteGroup=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete assigned group"))},t.prototype.onNewAccessCalendar=function(t){CN.launch(this.api,this.metaPool,this.accessCalendars).subscribe(function(e){return t.table.overview()})},t.prototype.onEditAccessCalendar=function(t){CN.launch(this.api,this.metaPool,this.accessCalendars,t.table.selection.selected[0]).subscribe(function(e){return t.table.overview()})},t.prototype.onDeleteAccessCalendar=function(t){console.log("ID",t.table.selection.selected[0].id),-1!==t.table.selection.selected[0].id?this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar access rule")):this.onEditAccessCalendar(t)},t.prototype.onAccessCalendarLoad=function(t){var e=this;this.rest.metaPools.getFallbackAccess(this.metaPool.id).subscribe(function(n){var i=t.table.dataSource.data.filter(function(t){return!0});i.push({id:-1,calendar:"-",priority:e.api.safeString('10000000FallBack'),access:n}),t.table.dataSource.data=i})},t.prototype.processElement=function(t){t.enabled=this.api.yesno(t.enabled)},t.prototype.processsCalendarItem=function(t){t.name=t.calendar,t.atStart=this.api.yesno(t.atStart)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-meta-pools-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary",3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],[1,"content"],[3,"value","gui",4,"ngIf"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","customButtons","tableId","pageSize","newAction","editAction","deleteAction"],["icon","pools",3,"rest","multiSelect","allowExport","tableId","customButtons","pageSize","customButtonAction","deleteAction"],["icon","groups",3,"rest","multiSelect","allowExport","tableId","pageSize","newAction","deleteAction"],["icon","calendars",3,"rest","multiSelect","allowExport","tableId","pageSize","onItem","newAction","editAction","deleteAction","loaded"],[3,"rest","itemId","tableId","pageSize"],[3,"value","gui"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,WF,27,31,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,YF,e.metaPool?e.metaPool.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/metas.png"),Er),Oo(1),nl(" ",null==e.metaPool?null:e.metaPool.name," "),Oo(1),ds("ngIf",e.metaPool))},directives:[Gm,Lh,JA,GA,zA,oR,yR,VS,SR],styles:[".mat-column-enabled, .mat-column-priority{max-width:8rem;justify-content:center}"]}),t}(),XF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New pool group"),!1).subscribe(function(e){return t.table.overview()})},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit pool group"),!1).subscribe(function(e){return t.table.overview()})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete pool group"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("poolgroup"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-pool-groups"]],decls:1,vars:5,consts:[["icon","spool-group",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.servicesPoolGroups)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".mat-column-priority, .mat-column-thumb{max-width:7rem;justify-content:center}"]}),t}(),ZF=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New calendar"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit calendar"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar"))},t.prototype.onDetail=function(t){this.api.navigation.gotoCalendarDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("calendar"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-calendars"]],decls:1,vars:5,consts:[["icon","calendars",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.calendars)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[""]}),t}(),KF=["mat-calendar-body",""];function $F(t,e){if(1&t&&(ps(0,"tr",2),ps(1,"td",3),tl(2),gs(),gs()),2&t){var n=Ds();Oo(1),js("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),ss("colspan",n.numCols),Oo(1),nl(" ",n.label," ")}}function QF(t,e){if(1&t&&(ps(0,"td",7),tl(1),gs()),2&t){var n=Ds(2);js("padding-top",n._cellPadding)("padding-bottom",n._cellPadding),ss("colspan",n._firstRowOffset),Oo(1),nl(" ",n._firstRowOffset>=n.labelMinRequiredCells?n.label:""," ")}}function JF(t,e){if(1&t){var n=bs();ps(0,"td",8),Ss("click",function(t){rn(n);var i=e.$implicit;return Ds(2)._cellClicked(i,t)}),ps(1,"div",9),tl(2),gs(),ms(3,"div",10),gs()}if(2&t){var i=e.$implicit,r=e.index,o=Ds().index,a=Ds();js("width",a._cellWidth)("padding-top",a._cellPadding)("padding-bottom",a._cellPadding),Gs("mat-calendar-body-disabled",!i.enabled)("mat-calendar-body-active",a._isActiveCell(o,r))("mat-calendar-body-range-start",a._isRangeStart(i.compareValue))("mat-calendar-body-range-end",a._isRangeEnd(i.compareValue))("mat-calendar-body-in-range",a._isInRange(i.compareValue))("mat-calendar-body-comparison-bridge-start",a._isComparisonBridgeStart(i.compareValue,o,r))("mat-calendar-body-comparison-bridge-end",a._isComparisonBridgeEnd(i.compareValue,o,r))("mat-calendar-body-comparison-start",a._isComparisonStart(i.compareValue))("mat-calendar-body-comparison-end",a._isComparisonEnd(i.compareValue))("mat-calendar-body-in-comparison-range",a._isInComparisonRange(i.compareValue))("mat-calendar-body-preview-start",a._isPreviewStart(i.compareValue))("mat-calendar-body-preview-end",a._isPreviewEnd(i.compareValue))("mat-calendar-body-in-preview",a._isInPreview(i.compareValue)),ds("ngClass",i.cssClasses)("tabindex",a._isActiveCell(o,r)?0:-1),ss("data-mat-row",o)("data-mat-col",r)("aria-label",i.ariaLabel)("aria-disabled",!i.enabled||null)("aria-selected",a._isSelected(i.compareValue)),Oo(1),Gs("mat-calendar-body-selected",a._isSelected(i.compareValue))("mat-calendar-body-comparison-identical",a._isComparisonIdentical(i.compareValue))("mat-calendar-body-today",a.todayValue===i.compareValue),Oo(1),nl(" ",i.displayValue," ")}}function tV(t,e){if(1&t&&(ps(0,"tr",4),us(1,QF,2,6,"td",5),us(2,JF,4,46,"td",6),gs()),2&t){var n=e.$implicit,i=e.index,r=Ds();Oo(1),ds("ngIf",0===i&&r._firstRowOffset),Oo(1),ds("ngForOf",n)}}function eV(t,e){if(1&t&&(ps(0,"th",5),tl(1),gs()),2&t){var n=e.$implicit;ss("aria-label",n.long),Oo(1),el(n.narrow)}}var nV=["*"];function iV(t,e){}function rV(t,e){if(1&t){var n=bs();ps(0,"mat-month-view",5),Ss("activeDateChange",function(t){return rn(n),Ds().activeDate=t})("_userSelection",function(t){return rn(n),Ds()._dateSelected(t)}),gs()}if(2&t){var i=Ds();ds("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)("comparisonStart",i.comparisonStart)("comparisonEnd",i.comparisonEnd)}}function oV(t,e){if(1&t){var n=bs();ps(0,"mat-year-view",6),Ss("activeDateChange",function(t){return rn(n),Ds().activeDate=t})("monthSelected",function(t){return rn(n),Ds()._monthSelectedInYearView(t)})("selectedChange",function(t){return rn(n),Ds()._goToDateInView(t,"month")}),gs()}if(2&t){var i=Ds();ds("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}function aV(t,e){if(1&t){var n=bs();ps(0,"mat-multi-year-view",7),Ss("activeDateChange",function(t){return rn(n),Ds().activeDate=t})("yearSelected",function(t){return rn(n),Ds()._yearSelectedInMultiYearView(t)})("selectedChange",function(t){return rn(n),Ds()._goToDateInView(t,"year")}),gs()}if(2&t){var i=Ds();ds("activeDate",i.activeDate)("selected",i.selected)("dateFilter",i.dateFilter)("maxDate",i.maxDate)("minDate",i.minDate)("dateClass",i.dateClass)}}function sV(t,e){}var lV=["button"];function uV(t,e){1&t&&(On(),ps(0,"svg",3),ms(1,"path",4),gs())}var cV=[[["","matDatepickerToggleIcon",""]]],hV=["[matDatepickerToggleIcon]"],dV=function(){var t=function(){function t(){o(this,t),this.changes=new U,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.closeCalendarLabel="Close calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}return s(t,[{key:"formatYearRange",value:function(t,e){return"".concat(t," \u2013 ").concat(e)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ot({factory:function(){return new t},token:t,providedIn:"root"}),t}(),fV=function t(e,n,i,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,l=arguments.length>6?arguments[6]:void 0;o(this,t),this.value=e,this.displayValue=n,this.ariaLabel=i,this.enabled=r,this.cssClasses=a,this.compareValue=s,this.rawValue=l},pV=function(){var t=function(){function t(e,n){var i=this;o(this,t),this._elementRef=e,this._ngZone=n,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new Bu,this.previewChange=new Bu,this._enterHandler=function(t){if(i._skipNextFocus&&"focus"===t.type)i._skipNextFocus=!1;else if(t.target&&i.isRange){var e=i._getCellFromElement(t.target);e&&i._ngZone.run(function(){return i.previewChange.emit({value:e.enabled?e:null,event:t})})}},this._leaveHandler=function(t){null!==i.previewEnd&&i.isRange&&t.target&&gV(t.target)&&i._ngZone.run(function(){return i.previewChange.emit({value:null,event:t})})},n.runOutsideAngular(function(){var t=e.nativeElement;t.addEventListener("mouseenter",i._enterHandler,!0),t.addEventListener("focus",i._enterHandler,!0),t.addEventListener("mouseleave",i._leaveHandler,!0),t.addEventListener("blur",i._leaveHandler,!0)})}return s(t,[{key:"_cellClicked",value:function(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}},{key:"_isSelected",value:function(t){return this.startValue===t||this.endValue===t}},{key:"ngOnChanges",value:function(t){var e=t.numCols,n=this.rows,i=this.numCols;(t.rows||e)&&(this._firstRowOffset=n&&n.length&&n[0].length?i-n[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding="".concat(50*this.cellAspectRatio/i,"%")),!e&&this._cellWidth||(this._cellWidth="".concat(100/i,"%"))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}},{key:"_isActiveCell",value:function(t,e){var n=t*this.numCols+e;return t&&(n-=this._firstRowOffset),n==this.activeCell}},{key:"_focusActiveCell",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._ngZone.runOutsideAngular(function(){t._ngZone.onStable.pipe(Nf(1)).subscribe(function(){var n=t._elementRef.nativeElement.querySelector(".mat-calendar-body-active");n&&(e||(t._skipNextFocus=!0),n.focus())})})}},{key:"_isRangeStart",value:function(t){return mV(t,this.startValue,this.endValue)}},{key:"_isRangeEnd",value:function(t){return vV(t,this.startValue,this.endValue)}},{key:"_isInRange",value:function(t){return yV(t,this.startValue,this.endValue,this.isRange)}},{key:"_isComparisonStart",value:function(t){return mV(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isComparisonBridgeStart",value:function(t,e,n){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;var i=this.rows[e][n-1];if(!i){var r=this.rows[e-1];i=r&&r[r.length-1]}return i&&!this._isRangeEnd(i.compareValue)}},{key:"_isComparisonBridgeEnd",value:function(t,e,n){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;var i=this.rows[e][n+1];if(!i){var r=this.rows[e+1];i=r&&r[0]}return i&&!this._isRangeStart(i.compareValue)}},{key:"_isComparisonEnd",value:function(t){return vV(t,this.comparisonStart,this.comparisonEnd)}},{key:"_isInComparisonRange",value:function(t){return yV(t,this.comparisonStart,this.comparisonEnd,this.isRange)}},{key:"_isComparisonIdentical",value:function(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}},{key:"_isPreviewStart",value:function(t){return mV(t,this.previewStart,this.previewEnd)}},{key:"_isPreviewEnd",value:function(t){return vV(t,this.previewStart,this.previewEnd)}},{key:"_isInPreview",value:function(t){return yV(t,this.previewStart,this.previewEnd,this.isRange)}},{key:"_getCellFromElement",value:function(t){var e;if(gV(t)?e=t:gV(t.parentNode)&&(e=t.parentNode),e){var n=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(n&&i)return this.rows[parseInt(n)][parseInt(i)]}return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc))},t.\u0275cmp=he({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[Ee],attrs:KF,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(us(0,$F,3,6,"tr",0),us(1,tV,3,2,"tr",1)),2&t&&(ds("ngIf",e._firstRowOffset.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t}();function gV(t){return"TD"===t.nodeName}function mV(t,e,n){return null!==n&&e!==n&&t=e&&t===n}function yV(t,e,n,i){return i&&null!==e&&null!==n&&e!==n&&t>=e&&t<=n}var _V=function t(e,n){o(this,t),this.start=e,this.end=n},bV=function(){var t=function(){function t(e,n){o(this,t),this.selection=e,this._adapter=n,this._selectionChanged=new U,this.selectionChanged=this._selectionChanged,this.selection=e}return s(t,[{key:"updateSelection",value:function(t,e){var n=this.selection;this.selection=t,this._selectionChanged.next({selection:t,source:e,oldValue:n})}},{key:"ngOnDestroy",value:function(){this._selectionChanged.complete()}},{key:"_isValidDateInstance",value:function(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}},{key:"clone",value:function(){return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(zi(void 0),zi(Sk))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),wV=function(){var t=function(t){u(n,t);var e=p(n);function n(t){return o(this,n),e.call(this,null,t)}return s(n,[{key:"add",value:function(t){r(i(n.prototype),"updateSelection",this).call(this,t,this)}},{key:"isValid",value:function(){return null!=this.selection&&this._isValidDateInstance(this.selection)}},{key:"isComplete",value:function(){return null!=this.selection}},{key:"clone",value:function(){var t=new n(this._adapter);return t.updateSelection(this.selection,this),t}}]),n}(bV);return t.\u0275fac=function(e){return new(e||t)(zi(Sk))},t.\u0275prov=Ot({token:t,factory:t.\u0275fac}),t}(),xV={provide:bV,deps:[[new qi,new Xi,bV],Sk],useFactory:function(t,e){return t||new wV(e)}},kV=new wi("MAT_DATE_RANGE_SELECTION_STRATEGY"),SV=function(){var t=function(){function t(e,n,i,r,a){o(this,t),this._changeDetectorRef=e,this._dateFormats=n,this._dateAdapter=i,this._dir=r,this._rangeStrategy=a,this._rerenderSubscription=M.EMPTY,this.selectedChange=new Bu,this._userSelection=new Bu,this.activeDateChange=new Bu,this._activeDate=this._dateAdapter.today()}return s(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(zf(null)).subscribe(function(){return t._init()})}},{key:"ngOnChanges",value:function(t){var e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_dateSelected",value:function(t){var e,n,i=t.value,r=this._dateAdapter.getYear(this.activeDate),o=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.createDate(r,o,i);this._selected instanceof _V?(e=this._getDateInCurrentMonth(this._selected.start),n=this._getDateInCurrentMonth(this._selected.end)):e=n=this._getDateInCurrentMonth(this._selected),e===i&&n===i||this.selectedChange.emit(a),this._userSelection.emit({value:a,event:t.event}),this._previewStart=this._previewEnd=null,this._changeDetectorRef.markForCheck()}},{key:"_handleCalendarBodyKeydown",value:function(t){var e=this._activeDate,n=this._isRtl();switch(t.keyCode){case Ny:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?1:-1);break;case Vy:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,n?-1:1);break;case Fy:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case zy:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case Ly:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case Ry:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case 33:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case 34:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case Ey:case Py:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case Oy:return void(null==this._previewEnd||By(t)||(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}},{key:"_init",value:function(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateFormats.display.monthLabel?this._dateAdapter.format(this.activeDate,this._dateFormats.display.monthLabel):this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();var t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}},{key:"_focusActiveCell",value:function(t){this._matCalendarBody._focusActiveCell(t)}},{key:"_previewChanged",value:function(t){var e=t.value;if(this._rangeStrategy){var n=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t.event);this._previewStart=this._getCellCompareValue(n.start),this._previewEnd=this._getCellCompareValue(n.end),this._changeDetectorRef.detectChanges()}}},{key:"_initWeekdays",value:function(){var t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow"),n=this._dateAdapter.getDayOfWeekNames("long").map(function(t,n){return{long:t,narrow:e[n]}});this._weekdays=n.slice(t).concat(n.slice(0,t))}},{key:"_createWeekCells",value:function(){var t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(var n=0,i=this._firstWeekOffset;n=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}},{key:"_getDateInCurrentMonth",value:function(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}},{key:"_hasSameMonthAndYear",value:function(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}},{key:"_getCellCompareValue",value:function(t){if(t){var e=this._dateAdapter.getYear(t),n=this._dateAdapter.getMonth(t),i=this._dateAdapter.getDate(t);return new Date(e,n,i).getTime()}return null}},{key:"_isRtl",value:function(){return this._dir&&"rtl"===this._dir.value}},{key:"_setRanges",value:function(t){t instanceof _V?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}},{key:"activeDate",get:function(){return this._activeDate},set:function(t){var e=this._activeDate,n=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(n,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t instanceof _V?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}},{key:"minDate",get:function(){return this._minDate},set:function(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"maxDate",get:function(){return this._maxDate},set:function(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs(Ck,8),hs(Sk,8),hs(uy,8),hs(kV,8))},t.\u0275cmp=he({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){var n;1&t&&Ju(pV,1),2&t&&Qu(n=ec())&&(e._matCalendarBody=n.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[Ee],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(ps(0,"table",0),ps(1,"thead",1),ps(2,"tr"),us(3,eV,2,2,"th",2),gs(),ps(4,"tr"),ms(5,"th",3),gs(),gs(),ps(6,"tbody",4),Ss("selectedValueChange",function(t){return e._dateSelected(t)})("previewChange",function(t){return e._previewChanged(t)})("keydown",function(t){return e._handleCalendarBodyKeydown(t)}),gs(),gs()),2&t&&(Oo(3),ds("ngForOf",e._weekdays),Oo(3),ds("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[Ph,pV],encapsulation:2,changeDetection:0}),t}(),CV=24,AV=function(){var t=function(){function t(e,n,i){o(this,t),this._changeDetectorRef=e,this._dateAdapter=n,this._dir=i,this._rerenderSubscription=M.EMPTY,this.selectedChange=new Bu,this.yearSelected=new Bu,this.activeDateChange=new Bu,this._activeDate=this._dateAdapter.today()}return s(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(zf(null)).subscribe(function(){return t._init()})}},{key:"ngOnDestroy",value:function(){this._rerenderSubscription.unsubscribe()}},{key:"_init",value:function(){var t=this;this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());var e=this._dateAdapter.getYear(this._activeDate)-IV(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(var n=0,i=[];nthis._dateAdapter.getYear(this.maxDate)||this.minDate&&tn||t===n&&e>i}return!1}},{key:"_isYearAndMonthBeforeMinDate",value:function(t,e){if(this.minDate){var n=this._dateAdapter.getYear(this.minDate),i=this._dateAdapter.getMonth(this.minDate);return t enter",mb("120ms cubic-bezier(0, 0, 0.2, 1)",yb({opacity:1,transform:"scale(1, 1)"}))),wb("* => void",mb("100ms linear",yb({opacity:0})))]),fadeInCalendar:gb("fadeInCalendar",[_b("void",yb({opacity:0})),_b("enter",yb({opacity:1})),wb("void => *",mb("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])},LV=0,NV=new wi("mat-datepicker-scroll-strategy"),FV={provide:NV,deps:[g_],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},VV=vk(function t(e){o(this,t),this._elementRef=e}),zV=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;return o(this,n),(u=e.call(this,t))._changeDetectorRef=i,u._globalModel=r,u._dateAdapter=a,u._rangeSelectionStrategy=s,u._subscriptions=new M,u._animationState="enter",u._animationDone=new U,u._actionsPortal=null,u._closeButtonText=(null==l?void 0:l.closeCalendarLabel)||"Close calendar",u}return s(n,[{key:"ngOnInit",value:function(){this._model=this._actionsPortal?this._globalModel.clone():this._globalModel}},{key:"ngAfterViewInit",value:function(){var t=this;this._subscriptions.add(this.datepicker.stateChanges.subscribe(function(){t._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}},{key:"ngOnDestroy",value:function(){this._subscriptions.unsubscribe(),this._animationDone.complete()}},{key:"_handleUserSelection",value:function(t){var e=this._model.selection,n=t.value,i=e instanceof _V;if(i&&this._rangeSelectionStrategy){var r=this._rangeSelectionStrategy.selectionFinished(n,e,t.event);this._model.updateSelection(r,this)}else!n||!i&&this._dateAdapter.sameDate(n,e)||this._model.add(n);this._model&&!this._model.isComplete()||this._actionsPortal||this.datepicker.close()}},{key:"_startExitAnimation",value:function(){this._animationState="void",this._changeDetectorRef.markForCheck()}},{key:"_getSelected",value:function(){return this._model.selection}},{key:"_applyPendingSelection",value:function(){this._model!==this._globalModel&&this._globalModel.updateSelection(this._model.selection,this)}}]),n}(VV);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(bV),hs(Sk),hs(kV,8),hs(dV))},t.\u0275cmp=he({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){var n;1&t&&Ju(PV,1),2&t&&Qu(n=ec())&&(e._calendar=n.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&Cs("@transformPanel.done",function(){return e._animationDone.next()}),2&t&&(ol("@transformPanel",e._animationState),Gs("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[Xa],decls:5,vars:20,consts:[["cdkTrapFocus","",1,"mat-datepicker-content-container"],[3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","viewChanged","_userSelection"],[3,"cdkPortalOutlet"],["type","button","mat-raised-button","",1,"mat-datepicker-close-button",3,"color","focus","blur","click"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"mat-calendar",1),Ss("yearSelected",function(t){return e.datepicker._selectYear(t)})("monthSelected",function(t){return e.datepicker._selectMonth(t)})("viewChanged",function(t){return e.datepicker._viewChanged(t)})("_userSelection",function(t){return e._handleUserSelection(t)}),gs(),us(2,sV,0,0,"ng-template",2),ps(3,"button",3),Ss("focus",function(){return e._closeButtonFocused=!0})("blur",function(){return e._closeButtonFocused=!1})("click",function(){return e.datepicker.close()}),tl(4),gs(),gs()),2&t&&(Gs("mat-datepicker-content-container-with-actions",e._actionsPortal),Oo(1),ds("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter"),Oo(1),ds("cdkPortalOutlet",e._actionsPortal),Oo(1),Gs("cdk-visually-hidden",!e._closeButtonFocused),ds("color",e.color||"primary"),Oo(1),el(e._closeButtonText))},directives:[X_,PV,Eh,My,LS],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content .mat-datepicker-close-button{position:absolute;top:100%;left:0;margin-top:8px}.ng-animating .mat-datepicker-content .mat-datepicker-close-button{display:none}.mat-datepicker-content-container{display:flex;flex-direction:column;justify-content:space-between}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-datepicker-content-container{min-height:312px;max-height:788px;min-width:250px;max-width:750px}.mat-datepicker-content-touch .mat-calendar{width:100%;height:auto}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-datepicker-content-container{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-datepicker-content-container{width:80vw;height:100vw}.mat-datepicker-content-touch .mat-datepicker-content-container-with-actions{height:115vw}}\n"],encapsulation:2,data:{animation:[RV.transformPanel,RV.fadeInCalendar]},changeDetection:0}),t}(),BV=function(){var t=function(){function t(e,n,i,r,a,s,l,u,c){o(this,t),this._dialog=e,this._overlay=n,this._ngZone=i,this._viewContainerRef=r,this._dateAdapter=s,this._dir=l,this._document=u,this._model=c,this._inputStateChanges=M.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this._restoreFocus=!0,this.yearSelected=new Bu,this.monthSelected=new Bu,this.viewChanged=new Bu(!0),this.openedStream=new Bu,this.closedStream=new Bu,this._opened=!1,this.id="mat-datepicker-".concat(LV++),this._focusedElementBeforeOpen=null,this._backdropHarnessClass="".concat(this.id,"-backdrop"),this.stateChanges=new U,this._scrollStrategy=a}return s(t,[{key:"_getMinDate",value:function(){return this.datepickerInput&&this.datepickerInput.min}},{key:"_getMaxDate",value:function(){return this.datepickerInput&&this.datepickerInput.max}},{key:"_getDateFilter",value:function(){return this.datepickerInput&&this.datepickerInput.dateFilter}},{key:"ngOnChanges",value:function(t){var e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this.stateChanges.next(void 0)}},{key:"ngOnDestroy",value:function(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this.stateChanges.complete()}},{key:"select",value:function(t){this._model.add(t)}},{key:"_selectYear",value:function(t){this.yearSelected.emit(t)}},{key:"_selectMonth",value:function(t){this.monthSelected.emit(t)}},{key:"_viewChanged",value:function(t){this.viewChanged.emit(t)}},{key:"registerInput",value:function(t){var e=this;return this._inputStateChanges.unsubscribe(),this.datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(function(){return e.stateChanges.next(void 0)}),this._model}},{key:"registerActions",value:function(t){this._actionsPortal=t}},{key:"removeActions",value:function(t){t===this._actionsPortal&&(this._actionsPortal=null)}},{key:"open",value:function(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}},{key:"close",value:function(){var t=this;if(this._opened){if(this._popupComponentRef&&this._popupRef){var e=this._popupComponentRef.instance;e._startExitAnimation(),e._animationDone.pipe(Nf(1)).subscribe(function(){return t._destroyPopup()})}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);var n=function(){t._opened&&(t._opened=!1,t.closedStream.emit(),t._focusedElementBeforeOpen=null)};this._restoreFocus&&this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(n)):n()}}},{key:"_applyPendingSelection",value:function(){var t,e,n=(null===(t=this._popupComponentRef)||void 0===t?void 0:t.instance)||(null===(e=this._dialogRef)||void 0===e?void 0:e.componentInstance);null==n||n._applyPendingSelection()}},{key:"_openAsDialog",value:function(){var t=this;this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(zV,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!1,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(function(){return t.close()}),this._forwardContentValues(this._dialogRef.componentInstance)}},{key:"_openAsPopup",value:function(){var t=this,e=new wy(zV,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(e),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){t._popupRef.updatePosition()})}},{key:"_forwardContentValues",value:function(t){t.datepicker=this,t.color=this.color,t._actionsPortal=this._actionsPortal}},{key:"_createPopup",value:function(){var t=this,e=this._overlay.position().flexibleConnectedTo(this.datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),n=new Zy({positionStrategy:this._setConnectedPositions(e),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(n),this._popupRef.overlayElement.setAttribute("role","dialog"),dt(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Ld(function(e){return e.keyCode===Oy&&!By(e)||t.datepickerInput&&By(e,"altKey")&&e.keyCode===Fy}))).subscribe(function(e){e&&e.preventDefault(),t.close()})}},{key:"_destroyPopup",value:function(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}},{key:"_setConnectedPositions",value:function(t){var e="end"===this.xPosition?"end":"start",n="start"===e?"end":"start",i="above"===this.yPosition?"bottom":"top",r="top"===i?"bottom":"top";return t.withPositions([{originX:e,originY:r,overlayX:e,overlayY:i},{originX:e,originY:i,overlayX:e,overlayY:r},{originX:n,originY:r,overlayX:n,overlayY:i},{originX:n,originY:i,overlayX:n,overlayY:r}])}},{key:"startAt",get:function(){return this._startAt||(this.datepickerInput?this.datepickerInput.getStartValue():null)},set:function(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}},{key:"color",get:function(){return this._color||(this.datepickerInput?this.datepickerInput.getThemePalette():void 0)},set:function(t){this._color=t}},{key:"touchUi",get:function(){return this._touchUi},set:function(t){this._touchUi=fv(t)}},{key:"disabled",get:function(){return void 0===this._disabled&&this.datepickerInput?this.datepickerInput.disabled:!!this._disabled},set:function(t){var e=fv(t);e!==this._disabled&&(this._disabled=e,this.stateChanges.next(void 0))}},{key:"restoreFocus",get:function(){return this._restoreFocus},set:function(t){this._restoreFocus=fv(t)}},{key:"panelClass",get:function(){return this._panelClass},set:function(t){this._panelClass=_v(t)}},{key:"opened",get:function(){return this._opened},set:function(t){fv(t)?this.open():this.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(wS),hs(g_),hs(Mc),hs(pu),hs(NV),hs(Sk,8),hs(uy,8),hs(uh,8),hs(bV))},t.\u0275dir=ve({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",restoreFocus:"restoreFocus",panelClass:"panelClass",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",viewChanged:"viewChanged",openedStream:"opened",closedStream:"closed"},features:[Ee]}),t}(),HV=function(){var t=function(t){u(n,t);var e=p(n);function n(){return o(this,n),e.apply(this,arguments)}return n}(BV);return t.\u0275fac=function(e){return jV(e||t)},t.\u0275cmp=he({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[wl([xV,{provide:BV,useExisting:t}]),Xa],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t}(),jV=mi(HV),GV=function t(e,n){o(this,t),this.target=e,this.targetElement=n,this.value=this.target.value},UV=function(){var t=function(){function t(e,n,i){var r=this;o(this,t),this._elementRef=e,this._dateAdapter=n,this._dateFormats=i,this.dateChange=new Bu,this.dateInput=new Bu,this.stateChanges=new U,this._onTouched=function(){},this._validatorOnChange=function(){},this._cvaOnChange=function(){},this._valueChangesSubscription=M.EMPTY,this._localeSubscription=M.EMPTY,this._parseValidator=function(){return r._lastValueValid?null:{matDatepickerParse:{text:r._elementRef.nativeElement.value}}},this._filterValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value));return!e||r._matchesFilter(e)?null:{matDatepickerFilter:!0}},this._minValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMinDate();return!n||!e||r._dateAdapter.compareDate(n,e)<=0?null:{matDatepickerMin:{min:n,actual:e}}},this._maxValidator=function(t){var e=r._dateAdapter.getValidDateOrNull(r._dateAdapter.deserialize(t.value)),n=r._getMaxDate();return!n||!e||r._dateAdapter.compareDate(n,e)>=0?null:{matDatepickerMax:{max:n,actual:e}}},this._lastValueValid=!1,this._localeSubscription=n.localeChanges.subscribe(function(){r._assignValueProgrammatically(r.value)})}return s(t,[{key:"_getValidators",value:function(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}},{key:"_registerModel",value:function(t){var e=this;this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(function(t){if(e._shouldHandleChangeEvent(t)){var n=e._getValueFromModel(t.selection);e._lastValueValid=e._isValidValue(n),e._cvaOnChange(n),e._onTouched(),e._formatValue(n),e.dateInput.emit(new GV(e,e._elementRef.nativeElement)),e.dateChange.emit(new GV(e,e._elementRef.nativeElement))}})}},{key:"ngAfterViewInit",value:function(){this._isInitialized=!0}},{key:"ngOnChanges",value:function(t){(function(t,e){for(var n=0,i=Object.keys(t);n2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):r=!0,r?Promise.resolve().then(function(){return n._updateModelValue(i)}):this._updateModelValue(i)}},{key:"_isSelected",value:function(t){return this._selectionModel&&this._selectionModel.isSelected(t)}},{key:"_isPrechecked",value:function(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(function(e){return null!=t.value&&e===t.value}):t.value===this._rawValue)}},{key:"_setSelectionByValue",value:function(t){var e=this;this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(function(t){return e._selectValue(t)})):(this._clearSelection(),this._selectValue(t)))}},{key:"_clearSelection",value:function(){this._selectionModel.clear(),this._buttonToggles.forEach(function(t){return t.checked=!1})}},{key:"_selectValue",value:function(t){var e=this._buttonToggles.find(function(e){return null!=e.value&&e.value===t});e&&(e.checked=!0,this._selectionModel.select(e))}},{key:"_updateModelValue",value:function(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}},{key:"name",get:function(){return this._name},set:function(t){var e=this;this._name=t,this._buttonToggles&&this._buttonToggles.forEach(function(t){t.name=e._name,t._markForCheck()})}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=fv(t)}},{key:"value",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(function(t){return t.value}):t[0]?t[0].value:void 0},set:function(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}},{key:"selected",get:function(){var t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=fv(t)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=fv(t),this._buttonToggles&&this._buttonToggles.forEach(function(t){return t._markForCheck()})}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(eu),hs(JV,8))},t.\u0275dir=ve({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,az,1),2&t&&Qu(i=ec())&&(e._buttonToggles=i)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(ss("aria-disabled",e.disabled),Gs("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[wl([ez,{provide:tz,useExisting:t}])]}),t}(),oz=yk(function t(){o(this,t)}),az=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l){var u;o(this,n),(u=e.call(this))._changeDetectorRef=i,u._elementRef=r,u._focusMonitor=a,u._isSingleSelector=!1,u._checked=!1,u.ariaLabelledby=null,u._disabled=!1,u.change=new Bu;var c=Number(s);return u.tabIndex=c||0===c?c:null,u.buttonToggleGroup=t,u.appearance=l&&l.appearance?l.appearance:"standard",u}return s(n,[{key:"ngOnInit",value:function(){var t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-".concat(nz++),this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}},{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){var t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}},{key:"focus",value:function(t){this._buttonElement.nativeElement.focus(t)}},{key:"_onButtonClick",value:function(){var t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new iz(this,this.value))}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}},{key:"buttonId",get:function(){return"".concat(this.id,"-button")}},{key:"appearance",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance},set:function(t){this._appearance=t}},{key:"checked",get:function(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked},set:function(t){var e=fv(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled},set:function(t){this._disabled=fv(t)}}]),n}(oz);return t.\u0275fac=function(e){return new(e||t)(hs(tz,8),hs(eu),hs(Tl),hs(ib),yi("tabindex"),hs(JV,8))},t.\u0275cmp=he({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var n;1&t&&Ju($V,1),2&t&&Qu(n=ec())&&(e._buttonElement=n.first)},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(t,e){1&t&&Ss("focus",function(){return e.focus()}),2&t&&(ss("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),Gs("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[Xa],ngContentSelectors:QV,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(Os(),ps(0,"button",0,1),Ss("click",function(){return e._onButtonClick()}),ps(2,"span",2),Ps(3),gs(),gs(),ms(4,"span",3),ms(5,"span",4)),2&t){var n=cs(1);ds("id",e.buttonId)("disabled",e.disabled||null),ss("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),Oo(5),ds("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[Wk],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t}(),sz=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk,Yk],gk]}),t}();function lz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit rule"),gs())}function uz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New rule"),gs())}function cz(t,e){if(1&t&&(ps(0,"mat-option",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.value," ")}}function hz(t,e){if(1&t&&(ps(0,"mat-option",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.value," ")}}function dz(t,e){if(1&t&&(ps(0,"mat-button-toggle",22),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.value," ")}}function fz(t,e){if(1&t){var n=bs();ps(0,"div",23),ps(1,"span",24),ps(2,"uds-translate"),tl(3,"Weekdays"),gs(),gs(),ps(4,"mat-button-toggle-group",25),Ss("ngModelChange",function(t){return rn(n),Ds().wDays=t}),us(5,dz,2,2,"mat-button-toggle",8),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.wDays),Oo(1),ds("ngForOf",i.weekDays)}}function pz(t,e){if(1&t){var n=bs();ps(0,"mat-form-field",9),ps(1,"mat-label"),ps(2,"uds-translate"),tl(3,"Repeat every"),gs(),gs(),ps(4,"input",6),Ss("ngModelChange",function(t){return rn(n),Ds().rule.interval=t}),gs(),ps(5,"div",26),tl(6),gs(),gs()}if(2&t){var i=Ds();Oo(4),ds("ngModel",i.rule.interval),Oo(2),nl("\xa0",i.frequency(),"")}}var gz={DAILY:[django.gettext("day"),django.gettext("days"),django.gettext("Daily")],WEEKLY:[django.gettext("week"),django.gettext("weeks"),django.gettext("Weekly")],MONTHLY:[django.gettext("month"),django.gettext("months"),django.gettext("Monthly")],YEARLY:[django.gettext("year"),django.gettext("years"),django.gettext("Yearly")],WEEKDAYS:["","",django.gettext("Weekdays")]},mz={MINUTES:django.gettext("Minutes"),HOURS:django.gettext("Hours"),DAYS:django.gettext("Days"),WEEKS:django.gettext("Weeks")},vz=[django.gettext("Sunday"),django.gettext("Monday"),django.gettext("Tuesday"),django.gettext("Wednesday"),django.gettext("Thursday"),django.gettext("Friday"),django.gettext("Saturday")],yz=function(t,e){void 0===e&&(e=!1);for(var n=new Array,i=0;i<7;i++)1&t&&n.push(vz[i].substr(0,e?100:3)),t>>=1;return n.length?n.join(", "):django.gettext("(no days)")},_z=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.dunits=Object.keys(mz).map(function(t){return{id:t,value:mz[t]}}),this.freqs=Object.keys(gz).map(function(t){return{id:t,value:gz[t][2]}}),this.weekDays=vz.map(function(t,e){return{id:1<0?" "+django.gettext("and every event will be active for")+" "+this.rule.duration+" "+mz[this.rule.duration_unit]:django.gettext("with no duration")}return t.replace("$FIELD",n)},t.prototype.save=function(){var t=this;this.rules.save(this.rule).subscribe(function(){t.dialogRef.close(),t.onSave.emit(!0)})},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-calendar-rule"]],decls:73,vars:21,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],[1,"oneThird"],["matInput","","type","time",3,"ngModel","ngModelChange"],["matInput","","type","number",3,"ngModel","ngModelChange"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","ngModelChange"],["matSuffix","",3,"for"],["startDatePicker",""],["matInput","",3,"matDatepicker","ngModel","placeholder","ngModelChange"],["endDatePicker",""],[1,"weekdays"],[3,"ngModel","ngModelChange","valueChange"],["class","oneHalf mat-form-field-infix",4,"ngIf"],["class","oneHalf",4,"ngIf"],[1,"info"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"disabled","click"],[3,"value"],[1,"oneHalf","mat-form-field-infix"],[1,"label-weekdays"],["multiple","",3,"ngModel","ngModelChange"],["matSuffix",""]],template:function(t,e){if(1&t&&(ps(0,"h4",0),us(1,lz,2,0,"uds-translate",1),us(2,uz,2,0,"uds-translate",1),gs(),ps(3,"mat-dialog-content"),ps(4,"div",2),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Name"),gs(),gs(),ps(9,"input",3),Ss("ngModelChange",function(t){return e.rule.name=t}),gs(),gs(),ps(10,"mat-form-field"),ps(11,"mat-label"),ps(12,"uds-translate"),tl(13,"Comments"),gs(),gs(),ps(14,"input",3),Ss("ngModelChange",function(t){return e.rule.comments=t}),gs(),gs(),ps(15,"h3"),ps(16,"uds-translate"),tl(17,"Event"),gs(),gs(),ps(18,"mat-form-field",4),ps(19,"mat-label"),ps(20,"uds-translate"),tl(21,"Start time"),gs(),gs(),ps(22,"input",5),Ss("ngModelChange",function(t){return e.startTime=t}),gs(),gs(),ps(23,"mat-form-field",4),ps(24,"mat-label"),ps(25,"uds-translate"),tl(26,"Duration"),gs(),gs(),ps(27,"input",6),Ss("ngModelChange",function(t){return e.rule.duration=t}),gs(),gs(),ps(28,"mat-form-field",4),ps(29,"mat-label"),ps(30,"uds-translate"),tl(31,"Duration units"),gs(),gs(),ps(32,"mat-select",7),Ss("ngModelChange",function(t){return e.rule.duration_unit=t}),us(33,cz,2,2,"mat-option",8),gs(),gs(),ps(34,"h3"),tl(35," Repetition "),gs(),ps(36,"mat-form-field",9),ps(37,"mat-label"),ps(38,"uds-translate"),tl(39," Start date "),gs(),gs(),ps(40,"input",10),Ss("ngModelChange",function(t){return e.startDate=t}),gs(),ms(41,"mat-datepicker-toggle",11),ms(42,"mat-datepicker",null,12),gs(),ps(44,"mat-form-field",9),ps(45,"mat-label"),ps(46,"uds-translate"),tl(47," Repeat until date "),gs(),gs(),ps(48,"input",13),Ss("ngModelChange",function(t){return e.endDate=t}),gs(),ms(49,"mat-datepicker-toggle",11),ms(50,"mat-datepicker",null,14),gs(),ps(52,"div",15),ps(53,"mat-form-field",9),ps(54,"mat-label"),ps(55,"uds-translate"),tl(56,"Frequency"),gs(),gs(),ps(57,"mat-select",16),Ss("ngModelChange",function(t){return e.rule.frequency=t})("valueChange",function(){return e.rule.interval=1}),us(58,hz,2,2,"mat-option",8),gs(),gs(),us(59,fz,6,2,"div",17),us(60,pz,7,2,"mat-form-field",18),gs(),ps(61,"h3"),ps(62,"uds-translate"),tl(63,"Summary"),gs(),gs(),ps(64,"div",19),tl(65),gs(),gs(),gs(),ps(66,"mat-dialog-actions"),ps(67,"button",20),ps(68,"uds-translate"),tl(69,"Cancel"),gs(),gs(),ps(70,"button",21),Ss("click",function(){return e.save()}),ps(71,"uds-translate"),tl(72,"Ok"),gs(),gs(),gs()),2&t){var n=cs(43),i=cs(51);Oo(1),ds("ngIf",e.rule.id),Oo(1),ds("ngIf",!e.rule.id),Oo(7),ds("ngModel",e.rule.name),Oo(5),ds("ngModel",e.rule.comments),Oo(8),ds("ngModel",e.startTime),Oo(5),ds("ngModel",e.rule.duration),Oo(5),ds("ngModel",e.rule.duration_unit),Oo(1),ds("ngForOf",e.dunits),Oo(7),ds("matDatepicker",n)("ngModel",e.startDate),Oo(1),ds("for",n),Oo(7),ds("matDatepicker",i)("ngModel",e.endDate)("placeholder",e.FOREVER_STRING),Oo(1),ds("for",i),Oo(8),ds("ngModel",e.rule.frequency),Oo(1),ds("ngForOf",e.freqs),Oo(1),ds("ngIf","WEEKDAYS"===e.rule.frequency),Oo(1),ds("ngIf","WEEKDAYS"!==e.rule.frequency),Oo(5),nl(" ",e.summary()," "),Oo(5),ds("disabled",null!==e.updateRuleData()||""===e.rule.name)}},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,rA,SD,Ph,qV,ZV,$T,HV,AS,LS,kS,iS,rz,az],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%]:not(.oneThird):not(.oneHalf){width:100%}.mat-form-field.oneThird[_ngcontent-%COMP%]{width:31%;margin-right:2%}.mat-form-field.oneHalf[_ngcontent-%COMP%]{width:48%;margin-right:2%}h3[_ngcontent-%COMP%]{width:100%;margin-top:.3rem;margin-bottom:1rem}.weekdays[_ngcontent-%COMP%]{width:100%;display:flex;align-items:flex-end}.label-weekdays[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.mat-datepicker-toggle[_ngcontent-%COMP%]{color:#00f}.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:rgba(35,35,133,.5);color:#fff}"]}),t}();function bz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Rules"),gs())}function wz(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),ps(3,"mat-tab"),us(4,bz,2,0,"ng-template",9),ps(5,"div",10),ps(6,"uds-table",11),Ss("newAction",function(t){return rn(n),Ds().onNewRule(t)})("editAction",function(t){return rn(n),Ds().onEditRule(t)})("deleteAction",function(t){return rn(n),Ds().onDeleteRule(t)}),gs(),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("@.disabled",!0),Oo(4),ds("rest",i.calendarRules)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","calendars-d-rules"+i.calendar.id)("pageSize",i.api.config.admin.page_size)}}var xz=function(t){return["/pools","calendars",t]},kz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("calendar");this.rest.calendars.get(e).subscribe(function(e){t.calendar=e,t.calendarRules=t.rest.calendars.detail(e.id,"rules")})},t.prototype.onNewRule=function(t){_z.launch(this.api,this.calendarRules).subscribe(function(){return t.table.overview()})},t.prototype.onEditRule=function(t){_z.launch(this.api,this.calendarRules,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDeleteRule=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete calendar rule"))},t.prototype.processElement=function(t){!function(t){t.interval="WEEKDAYS"===t.frequency?yz(t.interval):t.interval+" "+gz[t.frequency][django.pluralidx(t.interval)],t.duration=t.duration+" "+mz[t.duration_unit]}(t)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-calendars-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","pools",3,"rest","multiSelect","allowExport","onItem","tableId","pageSize","newAction","editAction","deleteAction"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,wz,7,7,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,xz,e.calendar?e.calendar.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/calendars.png"),Er),Oo(1),nl(" ",null==e.calendar?null:e.calendar.name," "),Oo(1),ds("ngIf",e.calendar))},directives:[Gm,Lh,JA,GA,zA,oR,VS],styles:[".mat-column-end, .mat-column-frequency, .mat-column-start{max-width:9rem} .mat-column-duration, .mat-column-interval{max-width:11rem}"]}),t}(),Sz='event'+django.gettext("Set time mark")+"",Cz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n,this.cButtons=[{id:"timemark",html:Sz,type:RM.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},Object.defineProperty(t.prototype,"customButtons",{get:function(){return this.api.user.isAdmin?this.cButtons:[]},enumerable:!1,configurable:!0}),t.prototype.onNew=function(t){this.api.gui.forms.typedNewForm(t,django.gettext("New account"))},t.prototype.onEdit=function(t){this.api.gui.forms.typedEditForm(t,django.gettext("Edit account"))},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account"))},t.prototype.onTimeMark=function(t){var e=this,n=t.table.selection.selected[0];this.api.gui.yesno(django.gettext("Time mark"),django.gettext("Set time mark for $NAME to current date/time?").replace("$NAME",n.name)).subscribe(function(i){i&&e.rest.accounts.timemark(n.id).subscribe(function(){e.api.gui.snackbar.open(django.gettext("Time mark stablished"),django.gettext("dismiss"),{duration:2e3}),t.table.overview()})})},t.prototype.onDetail=function(t){this.api.navigation.gotoAccountDetail(t.param.id)},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("account"))},t.prototype.processElement=function(t){t.time_mark=78793200===t.time_mark?django.gettext("No time mark"):qI("SHORT_DATE_FORMAT",t.time_mark)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-accounts"]],decls:1,vars:7,consts:[["icon","accounts",3,"rest","multiSelect","allowExport","hasPermissions","customButtons","pageSize","onItem","customButtonAction","newAction","editAction","deleteAction","detailAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("customButtonAction",function(t){return e.onTimeMark(t)})("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("detailAction",function(t){return e.onDetail(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.accounts)("multiSelect",!0)("allowExport",!0)("hasPermissions",!0)("customButtons",e.customButtons)("pageSize",e.api.config.admin.page_size)("onItem",e.processElement)},directives:[oR],styles:[""]}),t}();function Az(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Account usage"),gs())}function Mz(t,e){if(1&t){var n=bs();ps(0,"div",6),ps(1,"div",7),ps(2,"mat-tab-group",8),ps(3,"mat-tab"),us(4,Az,2,0,"ng-template",9),ps(5,"div",10),ps(6,"uds-table",11),Ss("deleteAction",function(t){return rn(n),Ds().onDeleteUsage(t)}),gs(),gs(),gs(),gs(),gs(),gs()}if(2&t){var i=Ds();Oo(2),ds("@.disabled",!0),Oo(4),ds("rest",i.accountUsage)("multiSelect",!0)("allowExport",!0)("onItem",i.processElement)("tableId","account-d-usage"+i.account.id)}}var Iz=function(t){return["/pools","accounts",t]},Tz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){var t=this,e=this.route.snapshot.paramMap.get("account");this.rest.accounts.get(e).subscribe(function(e){t.account=e,t.accountUsage=t.rest.accounts.detail(e.id,"usage")})},t.prototype.onDeleteUsage=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete account usage"))},t.prototype.processElement=function(t){t.running=this.api.yesno(t.running)},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-accounts-detail"]],decls:9,vars:6,consts:[[1,"detail"],[1,"mat-elevation-z4","title"],[3,"routerLink"],[1,"material-icons"],[3,"src"],["class","card",4,"ngIf"],[1,"card"],[1,"card-content"],["backgroundColor","primary"],["mat-tab-label",""],[1,"content"],["icon","accounts",3,"rest","multiSelect","allowExport","onItem","tableId","deleteAction"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"div",1),ps(2,"a",2),ps(3,"i",3),tl(4,"arrow_back"),gs(),gs(),tl(5," \xa0"),ms(6,"img",4),tl(7),gs(),us(8,Mz,7,6,"div",5),gs()),2&t&&(Oo(2),ds("routerLink",Tu(4,Iz,e.account?e.account.id:"")),Oo(4),ds("src",e.api.staticURL("admin/img/icons/accounts.png"),Er),Oo(1),nl(" ",null==e.account?null:e.account.name," "),Oo(1),ds("ngIf",e.account))},directives:[Gm,Lh,JA,GA,zA,oR,VS],styles:[""]}),t}();function Dz(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"New image for"),gs())}function Ez(t,e){1&t&&(ps(0,"uds-translate"),tl(1,"Edit for"),gs())}var Oz=function(){function t(t,e,n,i){this.api=t,this.rest=e,this.dialogRef=n,this.onSave=new Bu(!0),this.preview="",this.image={id:void 0,data:"",name:""},i.image&&(this.image.id=i.image.id)}return t.launch=function(e,n){void 0===n&&(n=null);var i=window.innerWidth<800?"60%":"40%";return e.gui.dialog.open(t,{width:i,position:{top:window.innerWidth<800?"0px":"7rem"},data:{image:n},disableClose:!0}).componentInstance.onSave},t.prototype.onFileChanged=function(t){var e=this,n=t.target.files[0];if(n.size>262144)this.api.gui.alert(django.gettext("Error"),django.gettext("Image is too big (max. upload size is 256Kb)"));else if(["image/jpeg","image/png","image/gif"].includes(n.type)){var i=new FileReader;i.onload=function(t){var r=i.result;e.preview=r,e.image.data=r.substr(r.indexOf("base64,")+7),e.image.name||(e.image.name=n.name)},i.readAsDataURL(n)}else this.api.gui.alert(django.gettext("Error"),django.gettext("Invalid image type (only supports JPEG, PNG and GIF"))},t.prototype.ngOnInit=function(){var t=this;this.image.id&&this.rest.gallery.get(this.image.id).subscribe(function(e){switch(t.image=e,t.image.data.substr(2)){case"iV":t.preview="data:image/png;base64,"+t.image.data;break;case"/9":t.preview="data:image/jpeg;base64,"+t.image.data;break;default:t.preview="data:image/gif;base64,"+t.image.data}})},t.prototype.background=function(){var t=this.api.config.image_size[0],e=this.api.config.image_size[1],n={"width.px":t,"height.px":e,"background-size":t+"px "+e+"px"};return this.preview&&(n["background-image"]="url("+this.preview+")"),n},t.prototype.save=function(){var t=this;this.image.name&&this.image.data?this.rest.gallery.save(this.image).subscribe(function(){t.api.gui.snackbar.open(django.gettext("Successfully saved"),django.gettext("dismiss"),{duration:2e3}),t.dialogRef.close(),t.onSave.emit(!0)}):this.api.gui.alert(django.gettext("Error"),django.gettext("Please, provide a name and a image"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-gallery-image"]],decls:32,vars:7,consts:[["mat-dialog-title",""],[4,"ngIf"],[1,"content"],["matInput","","type","text",3,"ngModel","ngModelChange"],["type","file",2,"display","none",3,"change"],["fileInput",""],["matInput","","type","text",3,"hidden","click"],[1,"preview",3,"click"],[1,"image-preview",3,"ngStyle"],[1,"help"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){if(1&t){var n=bs();ps(0,"h4",0),us(1,Dz,2,0,"uds-translate",1),us(2,Ez,2,0,"uds-translate",1),gs(),ps(3,"mat-dialog-content"),ps(4,"div",2),ps(5,"mat-form-field"),ps(6,"mat-label"),ps(7,"uds-translate"),tl(8,"Image name"),gs(),gs(),ps(9,"input",3),Ss("ngModelChange",function(t){return e.image.name=t}),gs(),gs(),ps(10,"input",4,5),Ss("change",function(t){return e.onFileChanged(t)}),gs(),ps(12,"mat-form-field"),ps(13,"mat-label"),ps(14,"uds-translate"),tl(15,"Image (click to change)"),gs(),gs(),ps(16,"input",6),Ss("click",function(){return rn(n),cs(11).click()}),gs(),ps(17,"div",7),Ss("click",function(){return rn(n),cs(11).click()}),ms(18,"div",8),gs(),gs(),ps(19,"div",9),ps(20,"uds-translate"),tl(21,' For optimal results, use "squared" images. '),gs(),ps(22,"uds-translate"),tl(23," The image will be resized on upload to "),gs(),tl(24),gs(),gs(),gs(),ps(25,"mat-dialog-actions"),ps(26,"button",10),ps(27,"uds-translate"),tl(28,"Cancel"),gs(),gs(),ps(29,"button",11),Ss("click",function(){return e.save()}),ps(30,"uds-translate"),tl(31,"Ok"),gs(),gs(),gs()}2&t&&(Oo(1),ds("ngIf",!e.image.id),Oo(1),ds("ngIf",e.image.id),Oo(7),ds("ngModel",e.image.name),Oo(7),ds("hidden",!0),Oo(2),ds("ngStyle",e.background()),Oo(6),il(" ",e.api.config.image_size[0],"x",e.api.config.image_size[1]," "))},directives:[SS,Lh,CS,nD,qT,VS,CO,QS,AC,eA,jh,AS,LS,kS],styles:[".mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-wrap:wrap}.content[_ngcontent-%COMP%], .mat-form-field[_ngcontent-%COMP%], .preview[_ngcontent-%COMP%]{width:100%}.preview[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.image-preview[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.3)}"]}),t}(),Pz=function(){function t(t,e,n){this.route=t,this.rest=e,this.api=n}return t.prototype.ngOnInit=function(){},t.prototype.onNew=function(t){Oz.launch(this.api).subscribe(function(){return t.table.overview()})},t.prototype.onEdit=function(t){Oz.launch(this.api,t.table.selection.selected[0]).subscribe(function(){return t.table.overview()})},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete image"))},t.prototype.onLoad=function(t){!0===t.param&&t.table.selectElement("id",this.route.snapshot.paramMap.get("image"))},t.\u0275fac=function(e){return new(e||t)(hs(pg),hs(LI),hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-gallery"]],decls:1,vars:5,consts:[["icon","gallery",3,"rest","multiSelect","allowExport","hasPermissions","pageSize","newAction","editAction","deleteAction","loaded"]],template:function(t,e){1&t&&(ps(0,"uds-table",0),Ss("newAction",function(t){return e.onNew(t)})("editAction",function(t){return e.onEdit(t)})("deleteAction",function(t){return e.onDelete(t)})("loaded",function(t){return e.onLoad(t)}),gs()),2&t&&ds("rest",e.rest.gallery)("multiSelect",!0)("allowExport",!0)("hasPermissions",!1)("pageSize",e.api.config.admin.page_size)},directives:[oR],styles:[".mat-column-thumb{max-width:7rem;justify-content:center} .mat-column-name{max-width:32rem}"]}),t}(),Rz='assessment'+django.gettext("Generate report")+"",Lz=function(){function t(t,e){this.rest=t,this.api=e,this.customButtons=[{id:"genreport",html:Rz,type:RM.SINGLE_SELECT}]}return t.prototype.ngOnInit=function(){},t.prototype.generateReport=function(t){var e=this,n=new Bu;n.subscribe(function(n){e.api.gui.snackbar.open(django.gettext("Generating report...")),e.rest.reports.save(n,t.table.selection.selected[0].id).subscribe(function(t){for(var n=t.encoded?window.atob(t.data):t.data,i=n.length,r=new Uint8Array(i),o=0;o div[_ngcontent-%COMP%]{width:50%}.mat-form-field[_ngcontent-%COMP%]{width:100%}input[readonly][_ngcontent-%COMP%]{background-color:#e0e0e0}.slider-label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}.config-footer[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%;margin-top:2rem;margin-bottom:2rem}"]}),t}()},{path:"tools/actor_tokens",component:function(){function t(t,e,n){this.api=t,this.route=e,this.rest=n}return t.prototype.ngOnInit=function(){},t.prototype.onDelete=function(t){this.api.gui.forms.deleteForm(t,django.gettext("Delete actor token - USE WITH EXTREME CAUTION!!!"))},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(pg),hs(LI))},t.\u0275cmp=he({type:t,selectors:[["uds-actor-tokens"]],decls:2,vars:4,consts:[["icon","maleta",3,"rest","multiSelect","allowExport","pageSize"]],template:function(t,e){1&t&&(ps(0,"div"),ms(1,"uds-table",0),gs()),2&t&&(Oo(1),ds("rest",e.rest.actorToken)("multiSelect",!0)("allowExport",!0)("pageSize",e.api.config.admin.page_size))},directives:[oR],styles:[""]}),t}()}]},{path:"**",redirectTo:"summary"}],Jz=function(){function t(){}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[nv.forRoot(Qz,{relativeLinkResolution:"legacy"})],nv]}),t}(),tB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),eB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Yk,gk,T_,tB],gk,tB]}),t}(),nB=["*"],iB=new wi("MatChipRemove"),rB=new wi("MatChipAvatar"),oB=new wi("MatChipTrailingIcon"),aB=_k(vk(yk(function t(e){o(this,t),this._elementRef=e}),"primary"),-1),sB=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u,c){var h;return o(this,n),(h=e.call(this,t))._elementRef=t,h._ngZone=i,h._changeDetectorRef=s,h._hasFocus=!1,h.chipListSelectable=!0,h._chipListMultiple=!1,h._chipListDisabled=!1,h._selected=!1,h._selectable=!0,h._disabled=!1,h._removable=!0,h._onFocus=new U,h._onBlur=new U,h.selectionChange=new Bu,h.destroyed=new Bu,h.removed=new Bu,h._addHostClassName(),h._chipRippleTarget=l.createElement("div"),h._chipRippleTarget.classList.add("mat-chip-ripple"),h._elementRef.nativeElement.appendChild(h._chipRippleTarget),h._chipRipple=new Hk(d(h),i,h._chipRippleTarget,r),h._chipRipple.setupTriggerEvents(t),h.rippleConfig=a||{},h._animationsDisabled="NoopAnimations"===u,h.tabIndex=null!=c&&parseInt(c)||-1,h}return s(n,[{key:"_addHostClassName",value:function(){var t="mat-basic-chip",e=this._elementRef.nativeElement;e.hasAttribute(t)||e.tagName.toLowerCase()===t?e.classList.add(t):e.classList.add("mat-standard-chip")}},{key:"ngOnDestroy",value:function(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._changeDetectorRef.markForCheck())}},{key:"selectViaInteraction",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._changeDetectorRef.markForCheck())}},{key:"toggleSelected",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._selected=!this.selected,this._dispatchSelectionChange(t),this._changeDetectorRef.markForCheck(),this.selected}},{key:"focus",value:function(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}},{key:"remove",value:function(){this.removable&&this.removed.emit({chip:this})}},{key:"_handleClick",value:function(t){this.disabled?t.preventDefault():t.stopPropagation()}},{key:"_handleKeydown",value:function(t){if(!this.disabled)switch(t.keyCode){case 46:case 8:this.remove(),t.preventDefault();break;case Py:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}},{key:"_blur",value:function(){var t=this;this._ngZone.onStable.pipe(Nf(1)).subscribe(function(){t._ngZone.run(function(){t._hasFocus=!1,t._onBlur.next({chip:t})})})}},{key:"_dispatchSelectionChange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}},{key:"rippleDisabled",get:function(){return this.disabled||this.disableRipple||this._animationsDisabled||!!this.rippleConfig.disabled}},{key:"selected",get:function(){return this._selected},set:function(t){var e=fv(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}},{key:"value",get:function(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent},set:function(t){this._value=t}},{key:"selectable",get:function(){return this._selectable&&this.chipListSelectable},set:function(t){this._selectable=fv(t)}},{key:"disabled",get:function(){return this._chipListDisabled||this._disabled},set:function(t){this._disabled=fv(t)}},{key:"removable",get:function(){return this._removable},set:function(t){this._removable=fv(t)}},{key:"ariaSelected",get:function(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}}]),n}(aB);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(Mc),hs(ey),hs(Uk,8),hs(eu),hs(uh),hs(rk,8),yi("tabindex"))},t.\u0275dir=ve({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,n){var i;1&t&&(tc(n,rB,1),tc(n,oB,1),tc(n,iB,1)),2&t&&(Qu(i=ec())&&(e.avatar=i.first),Qu(i=ec())&&(e.trailingIcon=i.first),Qu(i=ec())&&(e.removeIcon=i.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&Ss("click",function(t){return e._handleClick(t)})("keydown",function(t){return e._handleKeydown(t)})("focus",function(){return e.focus()})("blur",function(){return e._blur()}),2&t&&(ss("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),Gs("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[Xa]}),t}(),lB=function(){var t=function(){function t(e,n){o(this,t),this._parentChip=e,"BUTTON"===n.nativeElement.nodeName&&n.nativeElement.setAttribute("type","button")}return s(t,[{key:"_handleClick",value:function(t){var e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(sB),hs(Tl))},t.\u0275dir=ve({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&Ss("click",function(t){return e._handleClick(t)})},features:[wl([{provide:iB,useExisting:t}])]}),t}(),uB=new wi("mat-chips-default-options"),cB=bk(function t(e,n,i,r){o(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=r}),hB=0,dB=function t(e,n){o(this,t),this.source=e,this.value=n},fB=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r,a,s,l,u){var c;return o(this,n),(c=e.call(this,l,a,s,u))._elementRef=t,c._changeDetectorRef=i,c._dir=r,c.ngControl=u,c.controlType="mat-chip-list",c._lastDestroyedChipIndex=null,c._destroyed=new U,c._uid="mat-chip-list-".concat(hB++),c._tabIndex=0,c._userTabIndex=null,c._onTouched=function(){},c._onChange=function(){},c._multiple=!1,c._compareWith=function(t,e){return t===e},c._required=!1,c._disabled=!1,c.ariaOrientation="horizontal",c._selectable=!0,c.change=new Bu,c.valueChange=new Bu,c.ngControl&&(c.ngControl.valueAccessor=d(c)),c}return s(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new j_(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Uv(this._destroyed)).subscribe(function(e){return t._keyManager.withHorizontalOrientation(e)}),this._keyManager.tabOut.pipe(Uv(this._destroyed)).subscribe(function(){t._allowFocusEscape()}),this.chips.changes.pipe(zf(null),Uv(this._destroyed)).subscribe(function(){t.disabled&&Promise.resolve().then(function(){t._syncChipsState()}),t._resetChips(),t._initializeSelection(),t._updateTabIndex(),t._updateFocusForDestroyedChips(),t.stateChanges.next()})}},{key:"ngOnInit",value:function(){this._selectionModel=new py(this.multiple,void 0,!1),this.stateChanges.next()}},{key:"ngDoCheck",value:function(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}},{key:"registerInput",value:function(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"writeValue",value:function(t){this.chips&&this._setSelectionByValue(t,!1)}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this.stateChanges.next()}},{key:"onContainerClick",value:function(t){this._originatesFromChip(t)||this.focus()}},{key:"focus",value:function(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}},{key:"_focusInput",value:function(t){this._chipInput&&this._chipInput.focus(t)}},{key:"_keydown",value:function(t){var e=t.target;8===t.keyCode&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}},{key:"_updateTabIndex",value:function(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}},{key:"_updateFocusForDestroyedChips",value:function(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){var t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}},{key:"_isValidIndex",value:function(t){return t>=0&&t1&&void 0!==arguments[1])||arguments[1];if(this._clearSelection(),this.chips.forEach(function(t){return t.deselect()}),Array.isArray(t))t.forEach(function(t){return e._selectValue(t,n)}),this._sortValues();else{var i=this._selectValue(t,n);i&&n&&this._keyManager.setActiveItem(i)}}},{key:"_selectValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.chips.find(function(n){return null!=n.value&&e._compareWith(n.value,t)});return i&&(n?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then(function(){(t.ngControl||t._value)&&(t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value,!1),t.stateChanges.next())})}},{key:"_clearSelection",value:function(t){this._selectionModel.clear(),this.chips.forEach(function(e){e!==t&&e.deselect()}),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.chips.forEach(function(e){e.selected&&t._selectionModel.select(e)}),this.stateChanges.next())}},{key:"_propagateChanges",value:function(t){var e;e=Array.isArray(this.selected)?this.selected.map(function(t){return t.value}):this.selected?this.selected.value:t,this._value=e,this.change.emit(new dB(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}},{key:"_blur",value:function(){var t=this;this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(function(){t.focused||t._markAsTouched()}):this._markAsTouched())}},{key:"_markAsTouched",value:function(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_allowFocusEscape",value:function(){var t=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(function(){t._tabIndex=t._userTabIndex||0,t._changeDetectorRef.markForCheck()}))}},{key:"_resetChips",value:function(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}},{key:"_dropSubscriptions",value:function(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}},{key:"_listenToChipsSelection",value:function(){var t=this;this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(function(e){e.source.selected?t._selectionModel.select(e.source):t._selectionModel.deselect(e.source),t.multiple||t.chips.forEach(function(e){!t._selectionModel.isSelected(e)&&e.selected&&e.deselect()}),e.isUserInput&&t._propagateChanges()})}},{key:"_listenToChipsFocus",value:function(){var t=this;this._chipFocusSubscription=this.chipFocusChanges.subscribe(function(e){var n=t.chips.toArray().indexOf(e.chip);t._isValidIndex(n)&&t._keyManager.updateActiveItem(n),t.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(function(){t._blur(),t.stateChanges.next()})}},{key:"_listenToChipsRemoved",value:function(){var t=this;this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(function(e){var n=e.chip,i=t.chips.toArray().indexOf(e.chip);t._isValidIndex(i)&&n._hasFocus&&(t._lastDestroyedChipIndex=i)})}},{key:"_originatesFromChip",value:function(t){for(var e=t.target;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}},{key:"_hasFocusedChip",value:function(){return this.chips&&this.chips.some(function(t){return t._hasFocus})}},{key:"_syncChipsState",value:function(){var t=this;this.chips&&this.chips.forEach(function(e){e._chipListDisabled=t._disabled,e._chipListMultiple=t.multiple})}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"role",get:function(){return this.empty?null:"listbox"}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=fv(t),this._syncChipsState()}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){this.writeValue(t),this._value=t}},{key:"id",get:function(){return this._chipInput?this._chipInput.id:this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=fv(t),this.stateChanges.next()}},{key:"placeholder",get:function(){return this._chipInput?this._chipInput.placeholder:this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"focused",get:function(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}},{key:"empty",get:function(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}},{key:"shouldLabelFloat",get:function(){return!this.empty||this.focused}},{key:"disabled",get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(t){this._disabled=fv(t),this._syncChipsState()}},{key:"selectable",get:function(){return this._selectable},set:function(t){var e=this;this._selectable=fv(t),this.chips&&this.chips.forEach(function(t){return t.chipListSelectable=e._selectable})}},{key:"tabIndex",set:function(t){this._userTabIndex=t,this._tabIndex=t}},{key:"chipSelectionChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t.selectionChange})))}},{key:"chipFocusChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t._onFocus})))}},{key:"chipBlurChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t._onBlur})))}},{key:"chipRemoveChanges",get:function(){return dt.apply(void 0,b(this.chips.map(function(t){return t.destroyed})))}}]),n}(cB);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(eu),hs(uy,8),hs(QC,8),hs(lA,8),hs(Lk),hs(SC,10))},t.\u0275cmp=he({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,sB,1),2&t&&Qu(i=ec())&&(e.chips=i)},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&Ss("focus",function(){return e.focus()})("blur",function(){return e._blur()})("keydown",function(t){return e._keydown(t)}),2&t&&(rl("id",e._uid),ss("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),Gs("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[wl([{provide:WT,useExisting:t}]),Xa],ngContentSelectors:nB,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(Os(),ps(0,"div",0),Ps(1),gs())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t}(),pB=0,gB=function(){var t=function(){function t(e,n){o(this,t),this._elementRef=e,this._defaultOptions=n,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new Bu,this.placeholder="",this.id="mat-chip-list-input-".concat(pB++),this._disabled=!1,this._inputElement=this._elementRef.nativeElement}return s(t,[{key:"ngOnChanges",value:function(){this._chipList.stateChanges.next()}},{key:"_keydown",value:function(t){t&&9===t.keyCode&&!By(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}},{key:"_blur",value:function(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}},{key:"_focus",value:function(){this.focused=!0,this._chipList.stateChanges.next()}},{key:"_emitChipEnd",value:function(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}},{key:"_onInput",value:function(){this._chipList.stateChanges.next()}},{key:"focus",value:function(t){this._inputElement.focus(t)}},{key:"_isSeparatorKey",value:function(t){return!By(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}},{key:"chipList",set:function(t){t&&(this._chipList=t,this._chipList.registerInput(this))}},{key:"addOnBlur",get:function(){return this._addOnBlur},set:function(t){this._addOnBlur=fv(t)}},{key:"disabled",get:function(){return this._disabled||this._chipList&&this._chipList.disabled},set:function(t){this._disabled=fv(t)}},{key:"empty",get:function(){return!this._inputElement.value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(uB))},t.\u0275dir=ve({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&Ss("keydown",function(t){return e._keydown(t)})("blur",function(){return e._blur()})("focus",function(){return e._focus()})("input",function(){return e._onInput()}),2&t&&(rl("id",e.id),ss("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[Ee]}),t}(),mB={separatorKeyCodes:[Ey]},vB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[Lk,{provide:uB,useValue:mB}],imports:[[gk]]}),t}(),yB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({}),t}(),_B=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[Kh,gk,yB,Iy]]}),t}(),bB=["*",[["mat-toolbar-row"]]],wB=["*","mat-toolbar-row"],xB=vk(function t(e){o(this,t),this._elementRef=e}),kB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=ve({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t}(),SB=function(){var t=function(t){u(n,t);var e=p(n);function n(t,i,r){var a;return o(this,n),(a=e.call(this,t))._platform=i,a._document=r,a}return s(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(function(){return t._checkToolbarMixedModes()}))}},{key:"_checkToolbarMixedModes",value:function(){}}]),n}(xB);return t.\u0275fac=function(e){return new(e||t)(hs(Tl),hs(ey),hs(uh))},t.\u0275cmp=he({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,n){var i;1&t&&tc(n,kB,1),2&t&&Qu(i=ec())&&(e._toolbarRows=i)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&Gs("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[Xa],ngContentSelectors:wB,decls:2,vars:0,template:function(t,e){1&t&&(Os(bB),Ps(0),Ps(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t}(),CB=function(){var t=function t(){o(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({imports:[[gk],gk]}),t}(),AB=function(){function t(){}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t}),t.\u0275inj=Pt({providers:[{provide:tD,useValue:{floatLabel:"always"}},{provide:kk,useValue:udsData.language}],imports:[Kh,vA,yA,CB,FS,mP,RD,_B,IS,iD,AO,AD,KV,Rk,cO,qD,aE,$O,eB,aM,vB,sz,bL,KR,lI,yP]}),t}();function MB(t,e){if(1&t){var n=bs();ps(0,"button",6),Ss("click",function(){rn(n);var t=e.$implicit;return Ds().changeLang(t)}),tl(1),gs()}if(2&t){var i=e.$implicit;Oo(1),el(i.name)}}function IB(t,e){if(1&t&&(ps(0,"button",12),ps(1,"i",7),tl(2,"face"),gs(),tl(3),gs()),2&t){var n=Ds();ds("matMenuTriggerFor",cs(7)),Oo(3),el(n.api.user.user)}}function TB(t,e){if(1&t&&(ps(0,"button",18),tl(1),ps(2,"i",7),tl(3,"arrow_drop_down"),gs(),gs()),2&t){var n=Ds();ds("matMenuTriggerFor",cs(7)),Oo(1),nl("",n.api.user.user," ")}}var DB=function(){function t(t){this.api=t,this.isNavbarCollapsed=!0;var e=t.config.language;this.langs=[];for(var n=0,i=t.config.available_languages;n .mat-button[_ngcontent-%COMP%]{padding-left:1.5rem}.icon[_ngcontent-%COMP%]{width:24px;margin:0 1em 0 0}"]}),t}();function LB(t,e){1&t&&ms(0,"div",1),2&t&&ds("innerHTML",Ds().messages,Dr)}var NB=function(){function t(t){this.api=t,this.messages="",this.visible=!1}return t.prototype.ngOnInit=function(){var t=this;if(this.api.notices.length>0){var e='
';this.messages='
'+e+this.api.notices.map(function(t){return t.replace(/ /gm," ").replace(/([A-Z]+[A-Z]+)/gm,"$1").replace(/([0-9]+)/gm,"$1")}).join("
"+e)+"
",this.api.gui.alert("",this.messages,0,"80%").subscribe(function(){t.visible=!0})}},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-notices"]],decls:1,vars:1,consts:[["class","notice",3,"innerHTML",4,"ngIf"],[1,"notice",3,"innerHTML"]],template:function(t,e){1&t&&us(0,LB,1,1,"div",0),2&t&&ds("ngIf",e.visible)},directives:[Lh],styles:[".notice[_ngcontent-%COMP%]{display:block} .warn-notice-container{background:#4682b4;border-radius:3px;box-shadow:0 4px 20px 0 rgba(0,0,0,.14),0 7px 10px -5px rgba(70,93,156,.4);box-sizing:border-box;color:#fff;margin:1rem 2rem 0;padding:15px;word-wrap:break-word;display:flex;flex-direction:column} .warn-notice{display:block;width:100%;text-align:center;font-size:1.1em;margin-bottom:.5rem}"]}),t}(),FB=function(){function t(){}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-footer"]],decls:4,vars:0,consts:[["href","https://www.udsenterprise.com"]],template:function(t,e){1&t&&(ps(0,"div"),tl(1,"\xa9 2012-2020 "),ps(2,"a",0),tl(3,"Virtual Cable S.L.U."),gs(),gs())},styles:[""]}),t}(),VB=function(){function t(){this.title="uds admin"}return t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-root"]],decls:8,vars:0,consts:[[1,"page"],[1,"content"],[1,"footer"]],template:function(t,e){1&t&&(ms(0,"uds-navbar"),ms(1,"uds-sidebar"),ps(2,"div",0),ps(3,"div",1),ms(4,"uds-notices"),ms(5,"router-outlet"),gs(),ps(6,"div",2),ms(7,"uds-footer"),gs(),gs())},directives:[DB,RB,NB,Wm,FB],styles:[".page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.footer[_ngcontent-%COMP%]{flex-shrink:0;margin:1em;height:1em;display:flex;flex-direction:row;justify-content:flex-end}.content[_ngcontent-%COMP%]{flex:1 0 auto;width:calc(100% - 56px - 8px);margin:4rem auto auto 56px;padding-left:8px;overflow-x:hidden}"]}),t}(),zB=function(t){function e(){var e=t.call(this)||this;return e.itemsPerPageLabel=django.gettext("Items per page"),e}return pI(e,t),e.\u0275prov=Ot({token:e,factory:e.\u0275fac=function(t){return new(t||e)}}),e}(HD),BB=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-text"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:7,consts:[["appearance","standard"],["matInput","","type","text",3,"ngModel","placeholder","required","disabled","maxlength","autocomplete","ngModelChange","change"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("maxlength",e.field.gui.length||128)("autocomplete","new-"+e.field.name))},directives:[nD,qT,CO,QS,AC,eA,hA,gA],styles:[".cdk-text-field-autofilled[_ngcontent-%COMP%]{background-color:red}"]}),t}(),HB=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){this.field.value||0===this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-numeric"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","number",3,"ngModel","placeholder","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly))},directives:[nD,qT,CO,rA,QS,AC,eA,hA],styles:[""]}),t}(),jB=function(){function t(){this.changed=new Bu,this.passwordType="password"}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-password"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[["appearance","standard","floatLabel","always"],["matInput","","autocomplete","new-password",3,"ngModel","placeholder","required","disabled","type","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","",3,"click"],["matSuffix","",1,"material-icons"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),gs(),ps(4,"a",2),Ss("click",function(){return e.passwordType="text"===e.passwordType?"password":"text"}),ps(5,"i",3),tl(6,"remove_red_eye"),gs(),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly)("type",e.passwordType))},directives:[nD,qT,CO,QS,AC,eA,hA,NS,$T],styles:[".cdk-text-field-autofilled[_ngcontent-%COMP%]{background-color:red}"]}),t}(),GB=function(){function t(){}return t.prototype.ngOnInit=function(){""!==this.field.value&&void 0!==this.field.value||(this.field.value=this.field.gui.defvalue)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-hidden"]],inputs:{field:"field"},decls:0,vars:0,template:function(t,e){},styles:[""]}),t}(),UB=function(){function t(){}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-textbox"]],inputs:{field:"field",value:"value"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","auto"],["matInput","","type","text",3,"ngModel","placeholder","required","readonly","ngModelChange"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"textarea",1),Ss("ngModelChange",function(t){return e.field.value=t}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",e.field.gui.required)("readonly",e.field.gui.rdonly))},directives:[nD,qT,CO,QS,AC,eA,hA],styles:[""]}),t}();function WB(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",3),Ss("changed",function(t){return rn(n),Ds().filter=t}),gs()}}function YB(t,e){if(1&t&&(ps(0,"mat-option",4),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.text," ")}}var qB=function(){function t(){this.changed=new Bu,this.filter=""}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>0&&(this.field.value=this.field.gui.values[0].id),this.field.value=""+this.field.value},t.prototype.filteredValues=function(){if(!this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-choice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[[3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-select",0),Ss("ngModelChange",function(t){return e.field.value=t})("valueChange",function(){return e.changed.emit(e)}),us(4,WB,1,0,"uds-mat-select-search",1),us(5,YB,2,2,"mat-option",2),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.value)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(1),ds("ngIf",e.field.gui.values.length>10),Oo(1),ds("ngForOf",e.filteredValues()))},directives:[nD,qT,SD,AC,eA,hA,Lh,Ph,EO,iS],styles:[""]}),t}();function XB(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",3),Ss("changed",function(t){return rn(n),Ds().filter=t}),gs()}}function ZB(t,e){if(1&t&&(ps(0,"mat-option",4),tl(1),gs()),2&t){var n=e.$implicit;ds("value",n.id),Oo(1),nl(" ",n.text," ")}}var KB=function(){function t(){this.changed=new Bu,this.filter=""}return t.prototype.ngOnInit=function(){this.field.value=void 0,void 0!==this.field.values?this.field.values.forEach(function(t,e,n){n[e]=""+t.id}):this.field.values=new Array},t.prototype.filteredValues=function(){if(!this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-multichoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:6,vars:7,consts:[["multiple","",3,"ngModel","placeholder","required","disabled","ngModelChange","valueChange"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-select",0),Ss("ngModelChange",function(t){return e.field.values=t})("valueChange",function(){return e.changed.emit(e)}),us(4,XB,1,0,"uds-mat-select-search",1),us(5,ZB,2,2,"mat-option",2),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("ngModel",e.field.values)("placeholder",e.field.gui.tooltip)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(1),ds("ngIf",e.field.gui.values.length>10),Oo(1),ds("ngForOf",e.filteredValues()))},directives:[nD,qT,SD,AC,eA,hA,Lh,Ph,EO,iS],styles:[""]}),t}();function $B(t,e){if(1&t){var n=bs();ps(0,"div",12),ps(1,"div",13),tl(2),gs(),ps(3,"div",14),tl(4," \xa0"),ps(5,"a",15),Ss("click",function(){rn(n);var t=e.index;return Ds().removeElement(t)}),ps(6,"i",16),tl(7,"close"),gs(),gs(),gs(),gs()}if(2&t){var i=e.$implicit;Oo(2),nl(" ",i," ")}}var QB=function(){function t(t,e,n,i){var r=this;this.api=t,this.rest=e,this.dialogRef=n,this.data=i,this.values=[],this.input="",this.onSave=new Bu(!0),this.data.values.forEach(function(t){return r.values.push(t)})}return t.launch=function(e,n,i){var r=window.innerWidth<800?"50%":"30%";return e.gui.dialog.open(t,{width:r,data:{title:n,values:i},disableClose:!0}).componentInstance.onSave},t.prototype.addElements=function(){var t=this;this.input.split(",").forEach(function(e){t.values.push(e)}),this.input=""},t.prototype.checkKey=function(t){"Enter"===t.code&&this.addElements()},t.prototype.removeAll=function(){this.values.length=0},t.prototype.removeElement=function(t){this.values.splice(t,1)},t.prototype.save=function(){var t=this;this.data.values.length=0,this.values.forEach(function(e){return t.data.values.push(e)}),this.onSave.emit(this.values),this.dialogRef.close()},t.prototype.ngOnInit=function(){},t.\u0275fac=function(e){return new(e||t)(hs(hI),hs(LI),hs(pS),hs(mS))},t.\u0275cmp=he({type:t,selectors:[["uds-editlist-editor"]],decls:23,vars:3,consts:[["mat-dialog-title",""],[1,"content"],[1,"list"],["class","elem",4,"ngFor","ngForOf"],[1,"buttons"],["mat-raised-button","","color","warn",3,"click"],[1,"input"],[1,"example-full-width"],["type","text","matInput","",3,"ngModel","keyup","ngModelChange"],["mat-button","","matSuffix","",1,"material-icons",3,"click"],["mat-raised-button","","mat-dialog-close","","color","warn"],["mat-raised-button","","color","primary",3,"click"],[1,"elem"],[1,"val"],[1,"remove"],[3,"click"],[1,"material-icons"]],template:function(t,e){1&t&&(ps(0,"h4",0),tl(1),gs(),ps(2,"mat-dialog-content"),ps(3,"div",1),ps(4,"div",2),us(5,$B,8,1,"div",3),gs(),ps(6,"div",4),ps(7,"button",5),Ss("click",function(){return e.removeAll()}),ps(8,"uds-translate"),tl(9,"Remove all"),gs(),gs(),gs(),ps(10,"div",6),ps(11,"mat-form-field",7),ps(12,"input",8),Ss("keyup",function(t){return e.checkKey(t)})("ngModelChange",function(t){return e.input=t}),gs(),ps(13,"button",9),Ss("click",function(){return e.addElements()}),ps(14,"uds-translate"),tl(15,"Add"),gs(),gs(),gs(),gs(),gs(),gs(),ps(16,"mat-dialog-actions"),ps(17,"button",10),ps(18,"uds-translate"),tl(19,"Cancel"),gs(),gs(),ps(20,"button",11),Ss("click",function(){return e.save()}),ps(21,"uds-translate"),tl(22,"Ok"),gs(),gs(),gs()),2&t&&(Oo(1),nl(" ",e.data.title,"\n"),Oo(4),ds("ngForOf",e.values),Oo(7),ds("ngModel",e.input))},directives:[SS,CS,Ph,LS,VS,nD,CO,QS,AC,eA,$T,AS,kS],styles:[".content[_ngcontent-%COMP%]{width:100%;justify-content:space-between;justify-self:center}.content[_ngcontent-%COMP%], .list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.list[_ngcontent-%COMP%]{margin:1rem;height:16rem;overflow-y:auto;border-color:#333;border-radius:1px;box-shadow:0 1px 4px 0 rgba(0,0,0,.14);padding:.5rem}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:1rem}.input[_ngcontent-%COMP%]{margin:0 1rem}.elem[_ngcontent-%COMP%]{font-family:Courier New,Courier,monospace;font-size:1.2rem;display:flex;justify-content:space-between;white-space:nowrap;flex-wrap:nowrap;margin-right:.4rem}.elem[_ngcontent-%COMP%]:hover{background-color:#333;color:#fff;cursor:default}.val[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:.2rem}.material-icons[_ngcontent-%COMP%]{font-size:1em;padding-bottom:1px}.material-icons[_ngcontent-%COMP%]:hover{cursor:pointer;color:red}.mat-dialog-actions[_ngcontent-%COMP%]{justify-content:flex-end}"]}),t}(),JB=function(){function t(t){this.api=t,this.changed=new Bu}return t.prototype.ngOnInit=function(){},t.prototype.launch=function(){var t=this;void 0===this.field.values&&(this.field.values=[]),QB.launch(this.api,this.field.gui.label,this.field.values).subscribe(function(e){t.changed.emit({field:t.field})})},t.prototype.getValue=function(){if(void 0===this.field.values)return"";var t=this.field.values.filter(function(t,e,n){return e<5}).join(", ");return this.field.values.length>5&&(t+=django.gettext(", (%i more items)").replace("%i",""+(this.field.values.length-5))),t},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-field-editlist"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:4,vars:5,consts:[["appearance","standard","floatLabel","always"],["matInput","","type","text",1,"editlist",3,"readonly","value","placeholder","disabled","click"]],template:function(t,e){1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("click",function(){return e.launch()}),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("readonly",!0)("value",e.getValue())("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly))},directives:[nD,qT,CO],styles:[".editlist[_ngcontent-%COMP%]{cursor:pointer}"]}),t}(),tH=function(){function t(){this.changed=new Bu}return t.prototype.ngOnInit=function(){var t;this.field.value=XI(""===(t=this.field.value)||null==t?this.field.gui.defvalue:this.field.value)},t.prototype.getValue=function(){return XI(this.field.value)?django.gettext("Yes"):django.gettext("No")},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-checkbox"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:5,vars:5,consts:[[1,"mat-form-field-infix"],[1,"label"],[3,"ngModel","required","disabled","ngModelChange","change"]],template:function(t,e){1&t&&(ps(0,"div",0),ps(1,"span",1),tl(2),gs(),ps(3,"mat-slide-toggle",2),Ss("ngModelChange",function(t){return e.field.value=t})("change",function(){return e.changed.emit(e)}),tl(4),gs(),gs()),2&t&&(Oo(2),el(e.field.gui.label),Oo(1),ds("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(1),nl(" ",e.getValue()," "))},directives:[gL,vL,AC,eA,hA],styles:[".label[_ngcontent-%COMP%]{color:rgba(0,0,0,.6);display:block;font-weight:400;left:0;line-height:18px;overflow:hidden;pointer-events:none;position:absolute;text-align:left;text-overflow:ellipsis;top:.5em;transform:matrix(.75,0,0,.75,0,-21.5);transform-origin:0 0;white-space:nowrap}"]}),t}();function eH(t,e){if(1&t&&ms(0,"div",5),2&t){var n=Ds().$implicit;ds("innerHTML",Ds().asIcon(n),Dr)}}function nH(t,e){if(1&t&&(ps(0,"div"),us(1,eH,1,1,"div",4),gs()),2&t){var n=e.$implicit,i=Ds();Oo(1),ds("ngIf",n.id==i.field.value)}}function iH(t,e){if(1&t){var n=bs();ps(0,"uds-mat-select-search",6),Ss("changed",function(t){return rn(n),Ds().filter=t}),gs()}}function rH(t,e){if(1&t&&(ps(0,"mat-option",7),ms(1,"div",5),gs()),2&t){var n=e.$implicit,i=Ds();ds("value",n.id),Oo(1),ds("innerHTML",i.asIcon(n),Dr)}}var oH=function(){function t(t){this.api=t,this.changed=new Bu,this.filter=""}return t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,""===this.field.value&&this.field.gui.values.length>=0&&(this.field.value=this.field.gui.values[0].id)},t.prototype.asIcon=function(t){return this.api.safeString(this.api.gui.icon(t.img)+t.text)},t.prototype.filteredValues=function(){if(!this.filter)return this.field.gui.values;var t=this.filter.toLocaleLowerCase();return this.field.gui.values.filter(function(e){return e.text.toLocaleLowerCase().includes(t)})},t.\u0275fac=function(e){return new(e||t)(hs(hI))},t.\u0275cmp=he({type:t,selectors:[["uds-field-imgchoice"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:8,vars:8,consts:[[3,"placeholder","ngModel","required","disabled","valueChange","ngModelChange"],[4,"ngFor","ngForOf"],[3,"changed",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[3,"changed"],[3,"value"]],template:function(t,e){1&t&&(ps(0,"mat-form-field"),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-select",0),Ss("valueChange",function(){return e.changed.emit(e)})("ngModelChange",function(t){return e.field.value=t}),ps(4,"mat-select-trigger"),us(5,nH,2,1,"div",1),gs(),us(6,iH,1,0,"uds-mat-select-search",2),us(7,rH,2,2,"mat-option",3),gs(),gs()),2&t&&(Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("placeholder",e.field.gui.tooltip)("ngModel",e.field.value)("required",!0===e.field.gui.required)("disabled",!0===e.field.gui.rdonly),Oo(2),ds("ngForOf",e.field.gui.values),Oo(1),ds("ngIf",e.field.gui.values.length>10),Oo(1),ds("ngForOf",e.filteredValues()))},directives:[nD,qT,SD,AC,eA,hA,xD,Ph,Lh,EO,iS],styles:[""]}),t}(),aH=function(){function t(){this.changed=new Bu,this.value=new Date}return Object.defineProperty(t.prototype,"date",{get:function(){return this.value},set:function(t){this.value!==t&&(this.value=t,this.field.value=zI("%Y-%m-%d",this.value))},enumerable:!1,configurable:!0}),t.prototype.ngOnInit=function(){this.field.value=this.field.value||this.field.gui.defvalue,"2000-01-01"===this.field.value?this.field.value=zI("%Y-01-01"):"2000-01-01"===this.field.value&&(this.field.value=zI("%Y-12-31"));var t=this.field.value.split("-");3===t.length&&(this.value=new Date(+t[0],+t[1]-1,+t[2]))},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-date"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:6,consts:[[1,"oneHalf"],["matInput","",3,"matDatepicker","ngModel","placeholder","disabled","ngModelChange"],["matSuffix","",3,"for"],["endDatePicker",""]],template:function(t,e){if(1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"input",1),Ss("ngModelChange",function(t){return e.date=t}),gs(),ms(4,"mat-datepicker-toggle",2),ms(5,"mat-datepicker",null,3),gs()),2&t){var n=cs(6);Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("matDatepicker",n)("ngModel",e.date)("placeholder",e.field.gui.tooltip)("disabled",!0===e.field.gui.rdonly),Oo(1),ds("for",n)}},directives:[nD,qT,CO,qV,QS,AC,eA,ZV,$T,HV],styles:[""]}),t}();function sH(t,e){if(1&t){var n=bs();ps(0,"mat-chip",5),Ss("removed",function(){rn(n);var t=e.$implicit;return Ds().remove(t)}),tl(1),ps(2,"i",6),tl(3,"cancel"),gs(),gs()}if(2&t){var i=e.$implicit,r=Ds();ds("selectable",!1)("removable",!0!==r.field.gui.rdonly),Oo(1),nl(" ",i," ")}}var lH,uH,cH,hH=function(){function t(){this.changed=new Bu,this.separatorKeysCodes=[Ey,188]}return t.prototype.ngOnInit=function(){void 0===this.field.values&&(this.field.values=new Array,this.field.value=void 0),this.field.values.forEach(function(t,e,n){""===t.trim()&&n.splice(e,1)})},t.prototype.add=function(t){var e=t.input,n=t.value;(n||"").trim()&&this.field.values.push(n.trim()),e&&(e.value="")},t.prototype.remove=function(t){var e=this.field.values.indexOf(t);e>=0&&this.field.values.splice(e,1)},t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=he({type:t,selectors:[["uds-field-tags"]],inputs:{field:"field"},outputs:{changed:"changed"},decls:7,vars:8,consts:[["appearance","standard","floatLabel","always"],[3,"selectable","disabled","change"],["chipList",""],[3,"selectable","removable","removed",4,"ngFor","ngForOf"],[3,"placeholder","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matChipInputTokenEnd"],[3,"selectable","removable","removed"],["matChipRemove","",1,"material-icons"]],template:function(t,e){if(1&t&&(ps(0,"mat-form-field",0),ps(1,"mat-label"),tl(2),gs(),ps(3,"mat-chip-list",1,2),Ss("change",function(){return e.changed.emit(e)}),us(5,sH,4,3,"mat-chip",3),ps(6,"input",4),Ss("matChipInputTokenEnd",function(t){return e.add(t)}),gs(),gs(),gs()),2&t){var n=cs(4);Oo(2),nl(" ",e.field.gui.label," "),Oo(1),ds("selectable",!1)("disabled",!0===e.field.gui.rdonly),Oo(2),ds("ngForOf",e.field.values),Oo(1),ds("placeholder",e.field.gui.tooltip)("matChipInputFor",n)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",!0)}},directives:[nD,qT,fB,Ph,gB,sB,lB],styles:[".mat-chip-trailing-icon[_ngcontent-%COMP%]{position:relative;top:-4px;left:-4px}mat-form-field[_ngcontent-%COMP%]{width:99.5%}"]}),t}(),dH=(n("KcLy"),function(){function t(){}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ge({type:t,bootstrap:[VB]}),t.\u0275inj=Pt({providers:[hI,LI,{provide:HD,useClass:zB}],imports:[[Od,vf,Jz,sk,AB,wT.forRoot({echarts:function(){return Promise.resolve().then(n.bind(null,"MT78"))}})]]}),t}());lH=[zh,OD,Bh,BB,UB,HB,jB,GB,qB,KB,JB,tH,oH,aH,hH],uH=[],(cH=_M.\u0275cmp).directiveDefs=function(){return lH.map(de)},cH.pipeDefs=function(){return uH.map(fe)},function(){if(zc)throw new Error("Cannot enable prod mode after platform setup.");Vc=!1}(),Dd().bootstrapModule(dH).catch(function(t){return console.log(t)})},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]); \ No newline at end of file diff --git a/server/src/uds/templates/uds/admin/index.html b/server/src/uds/templates/uds/admin/index.html index 564b6163..5034e24c 100644 --- a/server/src/uds/templates/uds/admin/index.html +++ b/server/src/uds/templates/uds/admin/index.html @@ -93,6 +93,6 @@ - +