D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
grafana
/
public
/
build
/
Filename :
3633.acef4a1394f4c10cf087.js
back
Copy
(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[3633],{66695:(o,w,a)=>{"use strict";a.d(w,{O:()=>b});var n=a(58939),r=a(78968),u=a(26129);const m={http:80,https:443,ftp:21};class b{constructor(){this.absUrl=this.wrapInDeprecationWarning(this.absUrl),this.hash=this.wrapInDeprecationWarning(this.hash),this.host=this.wrapInDeprecationWarning(this.host),this.path=this.wrapInDeprecationWarning(this.path),this.port=this.wrapInDeprecationWarning(this.port,"window.location"),this.protocol=this.wrapInDeprecationWarning(this.protocol,"window.location"),this.replace=this.wrapInDeprecationWarning(this.replace),this.search=this.wrapInDeprecationWarning(this.search),this.state=this.wrapInDeprecationWarning(this.state),this.url=this.wrapInDeprecationWarning(this.url)}wrapInDeprecationWarning(c,v){let d=this;return function(){return(0,n.d)("$location",c.name,v||"locationService"),c.apply(d,arguments)}}absUrl(){return`${window.location.origin}${this.url()}`}hash(c){if((0,u.GQ)("AngularLocationWrapper",!1,"Angular compat layer: hash"),c)throw new Error("AngularLocationWrapper method not implemented.");return u.E1.getLocation().hash.slice(1)}host(){return new URL(window.location.href).hostname}path(c){(0,u.GQ)("AngularLocationWrapper",!1,"Angular compat layer: path");const v=u.E1.getLocation();if(c!=null){let d=String(c);d=d.startsWith("/")?d:`/${d}`;const f=new URL(`${window.location.origin}${d}`);return u.E1.push({pathname:f.pathname,search:f.search.length>0?f.search:v.search,hash:f.hash.length>0?f.hash:v.hash}),this}return c===null?(u.E1.push("/"),this):v.pathname}port(){const c=new URL(window.location.href);return parseInt(c.port,10)||m[c.protocol]||null}protocol(){return new URL(window.location.href).protocol.slice(0,-1)}replace(){throw new Error("AngularLocationWrapper method not implemented.")}search(c,v){if((0,u.GQ)("AngularLocationWrapper",!1,"Angular compat layer: search"),!c)return u.E1.getSearchObject();if(c&&arguments.length>1)return u.E1.partial({[c]:v}),this;if(c){let d;typeof c=="object"?d={...c}:d=(0,u.Ox)(c);for(const y of Object.keys(d))(d[y]===null||d[y]===void 0)&&delete d[y];const f=r.Cj.renderUrl(u.E1.getLocation().pathname,d);u.E1.push(f)}return this}state(c){throw(0,u.GQ)("AngularLocationWrapper",!1,"Angular compat layer: state"),new Error("AngularLocationWrapper method not implemented.")}url(c){if((0,u.GQ)("AngularLocationWrapper",!1,"Angular compat layer: url"),c!==void 0)return c.startsWith("#")?u.E1.push({...u.E1.getLocation(),hash:c}):c.startsWith("?")?u.E1.push({...u.E1.getLocation(),search:c}):c.trim().length===0?u.E1.push("/"):u.E1.push(c),u.E1;const v=u.E1.getLocation();return`${v.pathname}${v.search}${v.hash}`}}},83633:(o,w,a)=>{"use strict";a.d(w,{AngularApp:()=>Xn});var n=a(79931),r=a.n(n),u=a(19973),m=a(3935),b=a(32713),i=a(91189),c=a(43620);const v=` <ng-transclude class="panel-height-helper"></ng-transclude> `;i.hF.directive("grafanaPanel",["$timeout",l=>({restrict:"E",template:v,transclude:!0,scope:{ctrl:"="},link:(t,s)=>{const e=t.ctrl,h=t.ctrl.panel,p=new u.w0;let g;function x(){g&&g.update()}e.events.on(m.Kh.componentDidMount,()=>{if(e.__proto__.constructor.scrollable){const T="baron baron__root baron__clipper panel-content--scrollable",I="baron__scroller",C=` <div class="baron__track"> <div class="baron__bar"></div> </div> `,L=s,k=s.find(":first").find(":first");L.addClass(T),$(C).appendTo(L),k.addClass(I),g=r()({root:L[0],scroller:k[0],bar:".baron__bar",barOnCls:"_scrollbar",scrollingCls:"_scrolling"}),g.scroll()}});function P(){e.height=t.$parent.$parent.size.height,e.width=t.$parent.$parent.size.width}P(),p.add(h.events.subscribe(b.U5,()=>{P(),e.events.emit("refresh")})),p.add(h.events.subscribe(c._z,T=>{T.payload?.fromAngular||(P(),l(()=>{x(),e.events.emit("render")}))})),p.add(e.events.subscribe(c._z,T=>{T.payload&&(T.payload.fromAngular=!0,h.events.publish(T))})),t.$on("$destroy",()=>{s.off(),p.unsubscribe(),e.events.emit(m.Kh.panelTeardown),e.events.removeAllListeners(),g&&g.dispose()}),h.events.publish(c.GT)}})]);var d=a(94125),f=a(47349),y=a.n(f);const F=y().module("grafana.directives"),G={};F.directive("panelEditorTab",["dynamicDirectiveSrv",W]);function W(l){return l.create({scope:{ctrl:"=",editorTab:"="},directive:t=>{const s=t.ctrl.pluginId,e=t.editorTab.title.toLowerCase().replace(" ","-").replace("&","").replace(" ","").replace(" ","-");if(G[s]){if(G[s][e])return G[s][e]}else G[s]=[];const h={fn:()=>t.editorTab.directiveFn(),name:`panel-editor-tab-${s}${e}`};return G[s][e]=h,h}})}class J{constructor(){this.hasTextEditMode=!1}$onInit(){this.panelCtrl=this.queryCtrl.panelCtrl,this.target=this.queryCtrl.target,this.panel=this.panelCtrl.panel,this.hasTextEditMode&&this.queryCtrl.toggleEditorMode&&(this.panelCtrl.toggleEditorMode=this.queryCtrl.toggleEditorMode.bind(this.queryCtrl)),this.queryCtrl.getCollapsedText&&(this.panelCtrl.getCollapsedText=this.queryCtrl.getCollapsedText.bind(this.queryCtrl))}}i.hF.directive("queryEditorRow",U);function U(){return{restrict:"E",controller:J,bindToController:!0,controllerAs:"ctrl",templateUrl:"public/app/angular/panel/partials/query_editor_row.html",transclude:!0,scope:{queryCtrl:"=",canCollapse:"=",hasTextEditMode:"="}}}var H=a(87071),E=a(89949),rt=a.n(E),pt=a(99633),K=a(99386);i.ZP.filter("stringSort",()=>l=>l.sort()),i.ZP.filter("slice",()=>(l,t,s)=>(0,E.isUndefined)(l)?l:l.slice(t,s)),i.ZP.filter("stringify",()=>l=>(0,E.isObject)(l)&&!(0,E.isArray)(l)?y().toJson(l):(0,E.isNull)(l)?null:l.toString()),i.ZP.filter("moment",()=>(l,t)=>{switch(t){case"ago":return(0,pt.CQ)(l).fromNow()}return(0,pt.CQ)(l).fromNow()});function ot(l=(0,K.J)()){const t=(s,e)=>{let h;return e.ctrl?h=(e.ctrl.panel||e.ctrl.row).scopedVars:h=e.row.scopedVars,l.replaceWithText(s,h)};return t.$stateful=!0,t}i.ZP.filter("interpolateTemplateVars",ot);const lt={};class S{constructor(){}set(){console.warn("old deprecated alert srv being used")}}i.ZP.service("alertSrv",S);class st{constructor(t){this.$compile=t}addDirective(t,s,e){const h=y().element(document.createElement(s));this.$compile(h)(e),t.empty(),t.append(h)}link(t,s,e,h){const p=h.directive(t);if(!p||!p.fn){s.empty();return}p.fn.registered||(i.ZP.directive(e.$normalize(p.name),p.fn),p.fn.registered=!0),this.addDirective(s,p.name,t)}create(t){return{restrict:"E",scope:t.scope,link:(e,h,p)=>{if(t.watchPath){let g=null;e.$watch(t.watchPath,()=>{g&&g.$destroy(),g=e.$new(),this.link(g,h,p,t)})}else this.link(e,h,p,t)}}}}st.$inject=["$compile"],i.ZP.service("dynamicDirectiveSrv",st);var et=a(27702),ut=a(68249);function A(l,t){if(y().isFunction(l))return l;if(!l)throw new Error("ReactComponent name attribute must be specified");let s;try{s=t.get(l)}catch{}if(!s)try{s=l.split(".").reduce((e,h)=>e[h],window)}catch{}if(!s)throw Error("Cannot find react component "+l);return s}function nt(l,t){if(l.wrappedInApply)return l;const s=function(){const e=arguments,h=t.$root.$$phase;return h==="$apply"||h==="$digest"?l.apply(null,e):t.$apply(()=>l.apply(null,e))};return s.wrappedInApply=!0,s}function _(l,t,s){return Object.keys(l||{}).reduce((e,h)=>{const p=l[h],g=(s||{})[h]||{};return e[h]=y().isFunction(p)&&g.wrapApply!==!1?nt(p,t):p,e},{})}function z(l,t,s,e){const h=y().isFunction(t.$watchCollection),p=y().isFunction(t.$watchGroup),g=[];for(const x of s){const P=bt(x),T=xt(l,x);!P||P.match(/\(.*\)/)||T==="one-time"||(T==="collection"&&h?t.$watchCollection(P,e):T==="reference"&&p?g.push(P):t.$watch(P,e,T!=="reference"))}l==="one-time"&&e(),g.length&&t.$watchGroup(g,e)}function Q(l,t,s,e){s.$evalAsync(()=>{e.render(et.createElement(l,t))})}function mt(l){return Array.isArray(l)?l[0]:l}function dt(l){return Array.isArray(l)?l[1]:{}}function bt(l){return Array.isArray(l)?l[0]:l}function Ct(l,t){const s=Object.keys(l).find(e=>e.toLowerCase()===t.toLowerCase()||(0,E.kebabCase)(e)===(0,E.kebabCase)(t));return l[s]}function xt(l,t){return Array.isArray(t)&&y().isObject(t[1])&&t[1].watchDepth||l}const N=l=>({restrict:"E",replace:!0,link:function(t,s,e){const h=A(e.name,l),p=(0,ut.s)(s[0]),g=()=>{const x=t.$eval(e.props),P=_(x,t);Q(h,P,t,p)};e.props?z(e.watchDepth,t,[e.props],g):g(),t.$on("$destroy",()=>{e.onScopeDestroy?t.$eval(e.onScopeDestroy,{unmountComponent:p.unmount.bind(this)}):p.unmount()})}}),B=l=>(t,s,e,h)=>{const p={restrict:"E",replace:!0,link:function(g,x,P){const T=A(t,l),I=(0,ut.s)(x[0]);s=s||Object.keys(T.propTypes||{});const C=()=>{let k={};const j={};s.forEach(ht=>{const R=mt(ht);k[R]=g.$eval(Ct(P,R)),j[R]=dt(ht)}),k=_(k,g,j),k=y().extend({},k,h),Q(T,k,g,I)},L=s.map(k=>Array.isArray(k)?[Ct(P,k[0]),dt(k)]:Ct(P,k));s.length?z(P.watchDepth,g,L,C):C(),g.$on("$destroy",()=>{P.onScopeDestroy?g.$eval(P.onScopeDestroy,{unmountComponent:I.unmount.bind(this)}):I.unmount()})}};return y().extend(p,e)},D=y().module("react",[]);D.directive("reactComponent",["$injector",N]),D.factory("reactDirective",["$injector",B]),i.ZP.service("uiSegmentSrv",["$sce","templateSrv",V]);function V(l,t){const s=this;class e{constructor(p){if(p==="*"||p.value==="*"){this.value="*",this.html=l.trustAsHtml('<i class="fa fa-asterisk"><i>'),this.type=p.type,this.expandable=!0;return}if((0,E.isString)(p)){this.value=p,this.html=l.trustAsHtml(t.highlightVariablesAsHtml(this.value));return}this.text=p.value,this.cssClass=p.cssClass,this.custom=p.custom,this.type=p.type,this.fake=p.fake,this.value=p.value,this.selectMode=p.selectMode,this.expandable=p.expandable,this.html=p.html||l.trustAsHtml(t.highlightVariablesAsHtml(this.value))}}this.getSegmentForValue=function(h,p){return h?this.newSegment(h):this.newSegment({value:p,fake:!0})},this.newSelectMeasurement=()=>new e({value:"select measurement",fake:!0}),this.newFake=(h,p,g)=>new e({value:h,fake:!0,type:p,cssClass:g}),this.newSegment=h=>new e(h),this.newKey=h=>new e({value:h,type:"key",cssClass:"query-segment-key"}),this.newKeyValue=h=>new e({value:h,type:"value",cssClass:"query-segment-value"}),this.newCondition=h=>new e({value:h,type:"condition",cssClass:"query-keyword"}),this.newOperator=h=>new e({value:h,type:"operator",cssClass:"query-segment-operator"}),this.newOperators=h=>(0,E.map)(h,p=>new e({value:p,type:"operator",cssClass:"query-segment-operator"})),this.transformToSegments=(h,p)=>g=>{const x=(0,E.map)(g,P=>s.newSegment({value:P.text,expandable:P.expandable}));return h&&(0,E.each)(t.getVariables(),P=>{(p===void 0||p===P.type)&&x.unshift(s.newSegment({type:"value",value:"$"+P.name,expandable:!0}))}),x},this.newSelectMetric=()=>new e({value:"select metric",fake:!0}),this.newPlusButton=()=>new e({fake:!0,html:'<i class="fa fa-plus "></i>',type:"plus-button",cssClass:"query-part"})}var Z=a(75475),tt=a.n(Z);i.ZP.service("popoverSrv",["$compile","$rootScope","$timeout",Y]);function Y(l,t,s){let e=null;this.close=()=>{e&&e.close()},this.show=h=>{e&&(e.close(),e=null);const p=(0,E.extend)(t.$new(!0),h.model);let g;const x=()=>{setTimeout(()=>{p.$destroy(),g.tether&&g.destroy(),h.onClose&&h.onClose()}),e=null};p.dismiss=()=>{g.close()};const P=document.createElement("div");return P.innerHTML=h.template,l(P)(p),s(()=>{g=new(tt())({target:h.element,content:P,position:h.position,classes:h.classNames||"drop-popover",openOn:h.openOn,hoverCloseDelay:200,tetherOptions:{constraints:[{to:"scrollParent",attachment:"together"}]}}),g.on("close",()=>{x()}),e=g,e.open()},100),()=>{g&&g.close()}}}class ft{constructor(t){this.$timeout=t,this.timers=[]}register(t){return this.timers.push(t),t}cancel(t){this.timers=(0,E.without)(this.timers,t),this.$timeout.cancel(t)}cancelAll(){(0,E.each)(this.timers,t=>{this.$timeout.cancel(t)}),this.timers=[]}}ft.$inject=["$timeout"],i.ZP.service("timer",ft);class O{constructor(t,s){this.$compile=t,this.$rootScope=s}load(t,s,e){const h=this.$rootScope.$new();(0,E.assign)(h,s);const p=this.$compile(e)(h);return y().element(t).append(p),{destroy:()=>{h.$destroy(),p.remove()},digest:()=>{h.$$phase||h.$digest()},getScope:()=>h}}}O.$inject=["$compile","$rootScope"],i.ZP.service("angularLoader",O);var at=a(7610),M=a.n(at);const Tt=M()(window);M().fn.place_tt=(()=>{const l={offset:5};return function(t,s,e){return e=M().extend(!0,{},l,e),this.each(()=>{const h=M()(this);let p,g;h.addClass("grafana-tooltip"),M()("#tooltip").remove(),h.appendTo(document.body),e.compile&&y().element(document).injector().invoke(["$compile","$rootScope",(T,I)=>{const C=I.$new(!0);(0,E.extend)(C,e.scopeData),T(h)(C),C.$digest(),C.$destroy()}]),p=h.outerWidth(!0),g=h.outerHeight(!0);const x=t+e.offset+p>Tt.width()?t-e.offset-p:t+e.offset,P=s+e.offset+g>Tt.height()?s-e.offset-g:s+e.offset;h.css("left",x>0?x:0),h.css("top",P>0?P:0)})}})();function St(l){const t='<input type="text" class="gf-form-input input-medium tight-form-input" spellcheck="false" style="display:none"></input>',s='<a class="gf-form-label tight-form-func dropdown-toggle" tabindex="1" gf-dropdown="menuItems" data-toggle="dropdown" ><i class="fa fa-plus"></i></a>';return{scope:{menuItems:"=dropdownTypeahead",dropdownTypeaheadOnSelect:"&dropdownTypeaheadOnSelect",model:"=ngModel"},link:(e,h,p)=>{const g=M()(t),x=M()(s);g.appendTo(h),x.appendTo(h),p.linkText&&x.html(p.linkText),p.ngModel&&e.$watch("model",I=>{(0,E.each)(e.menuItems,C=>{(0,E.each)(C.submenu,L=>{L.value===I&&x.html(L.text)})})});const P=(0,E.reduce)(e.menuItems,(I,C,L)=>(C.submenu?(0,E.each)(C.submenu,(k,j)=>{k.click="menuItemSelected("+L+","+j+")",I.push(C.text+" "+k.text)}):(C.click="menuItemSelected("+L+")",I.push(C.text)),I),[]),T=()=>{g.hide(),g.val(""),x.show(),x.focus(),h.removeClass("open")};e.menuItemSelected=(I,C)=>{const L=e.menuItems[I],k={$item:L};L.submenu&&C!==void 0&&(k.$subItem=L.submenu[C]),e.dropdownTypeaheadOnSelect(k),T()},g.attr("data-provide","typeahead"),g.typeahead({source:P,minLength:1,items:10,updater:I=>{const C={};return(0,E.each)(e.menuItems,L=>{(0,E.each)(L.submenu,k=>{I===L.text+" "+k.text&&(C.$subItem=k,C.$item=L)})}),C.$item&&e.$apply(()=>{e.dropdownTypeaheadOnSelect(C)}),g.trigger("blur"),""}}),x.click(()=>{x.hide(),g.show(),g.focus()}),g.keyup(()=>{h.toggleClass("open",g.val()==="")}),h.mousedown(I=>{I.preventDefault()}),g.blur(()=>{g.hide(),g.val(""),x.show(),x.focus(),setTimeout(()=>{h.removeClass("open")},200)}),l(h.contents())(e)}}}function gt(l){const t='<input type="text" class="gf-form-input" spellcheck="false" style="display:none"></input>',s='<a class="{{buttonTemplateClass}} dropdown-toggle" tabindex="1" gf-dropdown="menuItems" data-toggle="dropdown" ><i class="fa fa-plus"></i></a>';return{scope:{menuItems:"=dropdownTypeahead2",dropdownTypeaheadOnSelect:"&dropdownTypeaheadOnSelect",model:"=ngModel",buttonTemplateClass:"@"},link:(e,h,p)=>{const g=M()(t);e.buttonTemplateClass||(e.buttonTemplateClass="gf-form-input");const x=M()(s),P={blur:null};g.appendTo(h),x.appendTo(h),p.linkText&&x.html(p.linkText),p.ngModel&&e.$watch("model",C=>{(0,E.each)(e.menuItems,L=>{(0,E.each)(L.submenu,k=>{k.value===C&&x.html(k.text)})})});const T=(0,E.reduce)(e.menuItems,(C,L,k)=>(L.submenu?(0,E.each)(L.submenu,(j,ht)=>{j.click="menuItemSelected("+k+","+ht+")",C.push(L.text+" "+j.text)}):(L.click="menuItemSelected("+k+")",C.push(L.text)),C),[]),I=()=>{g.hide(),g.val(""),x.show(),x.focus(),h.removeClass("open")};e.menuItemSelected=(C,L)=>{const k=e.menuItems[C],j={$item:k};k.submenu&&L!==void 0&&(j.$subItem=k.submenu[L]),e.dropdownTypeaheadOnSelect(j),I()},g.attr("data-provide","typeahead"),g.typeahead({source:T,minLength:1,items:10,updater:C=>{const L={};return(0,E.each)(e.menuItems,k=>{(0,E.each)(k.submenu,j=>{C===k.text+" "+j.text&&(L.$subItem=j,L.$item=k)})}),L.$item&&e.$apply(()=>{e.dropdownTypeaheadOnSelect(L)}),g.trigger("blur"),""}}),x.click(()=>{x.hide(),g.show(),g.focus()}),g.keyup(()=>{h.toggleClass("open",g.val()==="")}),h.mousedown(C=>{C.preventDefault(),P.blur=null}),g.blur(()=>{P.blur=setTimeout(()=>{I()},1)}),l(h.contents())(e)}}}i.ZP.directive("dropdownTypeahead",["$compile",St]),i.ZP.directive("dropdownTypeahead2",["$compile",gt]);function Nt(l){return{link:(t,s)=>{const e=s[0],h=()=>{const g=new Event("change");return e.dispatchEvent(g)},p=({animationName:g})=>{switch(g){case"onAutoFillStart":return h();case"onAutoFillCancel":return h()}return null};e.addEventListener("animationstart",p),t.$on("$destroy",()=>{e.removeEventListener("animationstart",p)})}}}i.ZP.directive("autofillEventFix",["$compile",Nt]);function Mt(l,t,s){const e='<input type="text" data-provide="typeahead" class="gf-form-input input-medium" spellcheck="false" style="display:none"></input>',h='<a class="gf-form-label" ng-class="segment.cssClass" tabindex="1" give-focus="segment.focus" ng-bind-html="segment.html"></a>',p='<a class="gf-form-input gf-form-input--dropdown" ng-class="segment.cssClass" tabindex="1" give-focus="segment.focus" ng-bind-html="segment.html"></a>';return{scope:{segment:"=",getOptions:"&",onChange:"&",debounce:"@"},link:(g,x)=>{const P=M()(e),T=g.segment,I=M()(T.selectMode?p:h);let C=null,L=null,k=!0;const j=g.debounce;P.appendTo(x),I.appendTo(x),g.updateVariableValue=R=>{R===""||T.value===R||g.$apply(()=>{const q=(0,E.find)(g.altSegments,{value:R});q?(T.value=q.value,T.html=q.html||t.trustAsHtml(s.highlightVariablesAsHtml(q.value)),T.fake=!1,T.expandable=q.expandable,q.type&&(T.type=q.type)):T.custom!=="false"&&(T.value=R,T.html=t.trustAsHtml(s.highlightVariablesAsHtml(R)),T.expandable=!0,T.fake=!1),g.onChange()})},g.switchToLink=R=>{k&&!R||(clearTimeout(L),L=null,k=!0,P.hide(),I.show(),g.updateVariableValue(P.val()))},g.inputBlur=()=>{L=setTimeout(g.switchToLink,200)},g.source=(R,q)=>{g.$apply(()=>{g.getOptions({$query:R}).then(X=>{g.altSegments=X,C=(0,E.map)(g.altSegments,it=>(0,E.escape)(it.value)),T.custom!=="false"&&!T.fake&&(0,E.indexOf)(C,T.value)===-1&&C.unshift((0,E.escape)(T.value)),q(C)})})},g.updater=R=>(R=(0,E.unescape)(R),R===T.value?(clearTimeout(L),P.focus(),R):(P.val(R),g.switchToLink(!0),R)),g.matcher=function(R){if(k)return!1;let q=this.query;q[0]==="/"&&(q=q.substring(1)),q[q.length-1]==="/"&&(q=q.substring(0,q.length-1));try{return R.toLowerCase().match(q.toLowerCase())}catch{return!1}},P.attr("data-provide","typeahead"),P.typeahead({source:g.source,minLength:0,items:1e4,updater:g.updater,matcher:g.matcher});const ht=P.data("typeahead");ht.lookup=function(){this.query=this.$element.val()||"";const R=this.source(this.query,M().proxy(this.process,this));return R&&this.process(R)},j&&(ht.lookup=(0,E.debounce)(ht.lookup,500,{leading:!0})),I.keydown(R=>{(R.keyCode===40||R.keyCode===13)&&I.click()}),I.click(()=>{C=null,P.css("width",Math.max(I.width(),80)+16+"px"),I.hide(),P.show(),P.focus(),k=!1;const R=P.data("typeahead");R&&(P.val(""),R.lookup())}),P.blur(g.inputBlur),l(x.contents())(g)}}}function At(l){return{template:'<metric-segment segment="segment" get-options="getOptionsInternal()" on-change="onSegmentChange()"></metric-segment>',restrict:"E",scope:{property:"=",options:"=",getOptions:"&",onChange:"&"},link:{pre:function(s,e,h){let p;s.valueToSegment=g=>{const x=(0,E.find)(s.options,{value:g}),P={cssClass:h.cssClass,custom:h.custom,value:x?x.text:g,selectMode:h.selectMode};return l.newSegment(P)},s.getOptionsInternal=()=>s.options?(p=s.options,Promise.resolve((0,E.map)(s.options,g=>({value:g.text})))):s.getOptions().then(g=>(p=g,(0,E.map)(g,x=>x.html?x:{value:x.text}))),s.onSegmentChange=()=>{if(p){const g=(0,E.find)(p,{text:s.segment.value});g&&g.value!==s.property?s.property=g.value:h.custom!=="false"&&(s.property=s.segment.value)}else s.property=s.segment.value;s.$$postDigest(()=>{s.$apply(()=>{s.onChange()})})},s.segment=s.valueToSegment(s.property)}}}}i.ZP.directive("metricSegment",["$compile","$sce","templateSrv",Mt]),i.ZP.directive("metricSegmentModel",["uiSegmentSrv",At]),i.ZP.directive("tip",["$compile",Ut]);function Ut(l){return{restrict:"E",link:(t,s,e)=>{let h='<i class="grafana-tip fa fa-'+(e.icon||"question-circle")+`" bs-tooltip="'`+s.text().replace(/[\'\"\\{}<>&]/g,p=>"&#"+p.charCodeAt(0)+";")+`'"></i>`;s.replaceWith(l(y().element(h))(t))}}}i.ZP.directive("compile",["$compile",Bt]);function Bt(l){return{restrict:"A",link:(t,s,e)=>{t.$watch(h=>h.$eval(e.compile),h=>{s.html(h),l(s.contents())(t)})}}}i.ZP.directive("watchChange",Ft);function Ft(){return{scope:{onchange:"&watchChange"},link:(l,t)=>{t.on("input",()=>{l.$apply(()=>{l.onchange({inputValue:t.val()})})})}}}i.ZP.directive("editorOptBool",["$compile",Yt]);function Yt(l){return{restrict:"E",link:(t,s,e)=>{const h=e.change?' ng-change="'+e.change+'"':"",p=e.tip?" <tip>"+e.tip+"</tip>":"",x='<div class="editor-option gf-form-checkbox text-center"'+(e.showIf?' ng-show="'+e.showIf+'" ':"")+'> <label for="'+e.model+'" class="small">'+e.text+p+'</label><input class="cr1" id="'+e.model+'" type="checkbox" ng-model="'+e.model+'"'+h+' ng-checked="'+e.model+'"></input> <label for="'+e.model+'" class="cr1"></label>';s.replaceWith(l(y().element(x))(t))}}}i.ZP.directive("editorCheckbox",["$compile, $interpolate",qt]);function qt(l,t){return{restrict:"E",link:(s,e,h)=>{const p=t(h.text)(s),g=t(h.model)(s),x=h.change?' ng-change="'+h.change+'"':"",P=h.tip?" <tip>"+h.tip+"</tip>":"",T='<label for="'+s.$id+g+'" class="checkbox-label">'+p+P+"</label>";let I='<input class="cr1" id="'+s.$id+g+'" type="checkbox" ng-model="'+g+'"'+x+' ng-checked="'+g+'"></input> <label for="'+s.$id+g+'" class="cr1"></label>';I=I+T,e.addClass("gf-form-checkbox"),e.html(l(y().element(I))(s))}}}i.ZP.directive("gfDropdown",["$parse","$compile","$timeout",_t]);function _t(l,t,s){function e(h,p){const x=['<ul class="dropdown-menu '+(p==="top"?"dropup":"")+'" role="menu" aria-labelledby="drop1">',"</ul>"];for(let P=0;P<h.length;P++){const T=h[P];if(T.divider){x.splice(P+1,0,'<li class="divider"></li>');continue}let I="<li"+(T.submenu&&T.submenu.length?' class="dropdown-submenu"':"")+'><a tabindex="-1" ng-href="'+(T.href||"")+'"'+(T.click?' ng-click="'+T.click+'"':"")+(T.target?' target="'+T.target+'"':"")+(T.method?' data-method="'+T.method+'"':"")+">"+(T.text||"")+"</a>";T.submenu&&T.submenu.length&&(I+=e(T.submenu).join(` `)),I+="</li>",x.splice(P+1,0,I)}return x}return{restrict:"EA",scope:!0,link:function(p,g,x){const P=l(x.gfDropdown),T=P(p);s(()=>{const I=g.data("placement");y().element(e(T,I).join("")).insertAfter(g),t(g.next("ul.dropdown-menu"))(p)}),g.addClass("dropdown-toggle").attr("data-toggle","dropdown")}}}i.ZP.directive("bsTooltip",["$parse","$compile",function(l,t){return{restrict:"A",scope:!0,link:function(e,h,p){let g=l(p.bsTooltip),x=g(e);e.$watch(p.bsTooltip,function(T,I){T!==I&&(x=T)}),h.on("show",function(T){M()(".tooltip.in").each(function(){const I=M()(this),C=I.data("tooltip");C&&!C.$element.is(h)&&I.tooltip("hide")})}),h.tooltip({title:function(){return y().isFunction(x)?x.apply(null,arguments):x},html:!0,container:"body"});const P=h.data("tooltip");P.show=function(){const T=M().fn.tooltip.Constructor.prototype.show.apply(this,arguments);return this.tip().data("tooltip",this),T},e._tooltip=function(T){h.tooltip(T)},e.hide=function(){h.tooltip("hide")},e.show=function(){h.tooltip("show")},e.dismiss=e.hide}}}]),i.ZP.directive("bsTypeahead",["$parse",function(l){return{restrict:"A",require:"?ngModel",link:function(s,e,h,p){let g=l(h.bsTypeahead),x=g(s);s.$watch(h.bsTypeahead,function(T,I){T!==I&&(x=T)}),e.attr("data-provide","typeahead"),e.typeahead({source:function(){return y().isFunction(x)?x.apply(null,arguments):x},minLength:h.minLength||1,items:h.item,updater:function(T){return p&&s.$apply(function(){p.$setViewValue(T)}),s.$emit("typeahead-updated",T),T}});const P=e.data("typeahead");P.lookup=function(){let T;return this.query=this.$element.val()||"",this.query.length<this.options.minLength?this.shown?this.hide():this:(T=(0,E.isFunction)(this.source)?this.source(this.query,M().proxy(this.process,this)):this.source,T?this.process(T):this)},h.matchAll&&(P.matcher=function(){return!0}),h.minLength==="0"&&setTimeout(function(){e.on("focus",function(){e.val().length===0&&setTimeout(e.typeahead.bind(e,"lookup"),200)})})}}}]);var te=a(76305);function ee(){return{restrict:"A",priority:1,require:"ngModel",link:(l,t,s,e)=>{s.type==="radio"||s.type==="checkbox"||(t.off("input keydown change"),t.bind("blur",()=>{l.$apply(()=>{e.$setViewValue(t.val())})}))}}}function ne(){return{restrict:"A",require:"ngModel",link:(l,t,s,e)=>{e.$parsers.push(h=>h===""?null:h)}}}function ie(){return{require:"ngModel",link:(l,t,s,e)=>{e.$validators.integer=(h,p)=>e.$isEmpty(h)||p.indexOf("$")===0||p.indexOf("+$")===0?!0:te.describeTextRange(p).invalid!==!0}}}i.ZP.directive("ngModelOnblur",ee),i.ZP.directive("emptyToNull",ne),i.ZP.directive("validTimeSpan",ie);var re=a(64714),qn=a(1460);function Ht(l,t){const{color:s,borderColor:e}=(0,re.Bx)(l);t.css("background-color",s),t.css("border-color",e)}function oe(){return{scope:{tagColorFromName:"="},link:(l,t)=>{Ht(l.tagColorFromName,t)}}}function se(){function l(t,s){if(s)return y().isFunction(t.$parent[s])?t.$parent[s]:e=>e[s]}return{restrict:"EA",scope:{model:"=ngModel",onTagsUpdated:"&"},template:"<select multiple></select>",replace:!1,link:function(t,s,e){y().isArray(t.model)||(t.model=[]);const h=M()("select",s);e.placeholder&&h.attr("placeholder",e.placeholder),h.tagsinput({typeahead:{source:y().isFunction(t.$parent[e.typeaheadSource])?t.$parent[e.typeaheadSource]:null},widthClass:e.widthClass,itemValue:l(t,e.itemvalue),itemText:l(t,e.itemtext),tagClass:y().isFunction(t.$parent[e.tagclass])?t.$parent[e.tagclass]:()=>e.tagclass}),h.on("itemAdded",p=>{t.model.indexOf(p.item)===-1&&(t.model.push(p.item),t.onTagsUpdated&&t.onTagsUpdated());const g=h.next().children("span").filter(()=>M()(this).text()===p.item);Ht(p.item,g)}),h.on("itemRemoved",p=>{const g=t.model.indexOf(p.item);g!==-1&&(t.model.splice(g,1),t.onTagsUpdated&&t.onTagsUpdated())}),t.$watch("model",()=>{y().isArray(t.model)||(t.model=[]),h.tagsinput("removeAll");for(let p=0;p<t.model.length;p++)h.tagsinput("add",t.model[p])},!0)}}}i.ZP.directive("tagColorFromName",oe),i.ZP.directive("bootstrapTagsinput",se);function ae(l){let t=l[0];const s=l[l.length-1];let e;t=t.nextSibling;for(let h=1;t!==s&&t;h++)(e||l[h]!==t)&&(e||(e=M()([].slice.call(l,0,h))),e.push(t)),t=t.nextSibling;return e||l}i.ZP.directive("rebuildOnChange",["$animate",le]);function le(l){return{multiElement:!0,terminal:!0,transclude:!0,priority:600,restrict:"E",link:(t,s,e,h,p)=>{let g,x,P;function T(){P&&(P.remove(),P=null),x&&(x.$destroy(),x=null),g&&(P=ae(g.clone),l.leave(P).then(()=>{P=null}),g=null)}t.$watch(e.property,function(C,L){x&&C!==L&&T(),!x&&(C||e.showNull)?p((k,j)=>{x=j,k[k.length++]=document.createComment(" end rebuild on change "),g={clone:k},l.enter(k,s.parent(),s)}):T()})}}}i.ZP.directive("giveFocus",()=>(l,t,s)=>{t.click(e=>{e.stopPropagation()}),l.$watch(s.giveFocus,e=>{e&&setTimeout(()=>{t.focus();const h=t[0];if(h.setSelectionRange){const p=t.val().length*2;h.setSelectionRange(p,p)}},200)},!0)});const _n={};class ce{constructor(){const t=()=>{};this.observer=new MutationObserver(t);const s={attributes:!0,attributeFilter:["class"],characterData:!1,childList:!0,subtree:!1};this.observer.observe(y().element(".delta-html")[0],s)}$onDestroy(){this.observer.disconnect()}}function ue(){return{controller:ce,replace:!1,restrict:"A"}}i.ZP.directive("diffDelta",ue);class Zt{constructor(t,s,e){this.$scope=t,this.$rootScope=s,this.$anchorScroll=e}goToLine(t){let s;const e=()=>{this.$anchorScroll(`l${t}`),s()};this.$scope.switchView().then(()=>{s=this.$rootScope.$on("json-diff-ready",e.bind(this))})}}Zt.$inject=["$scope","$rootScope","$anchorScroll"];function he(){return{controller:Zt,controllerAs:"ctrl",replace:!0,restrict:"E",scope:{line:"@lineDisplay",link:"@lineLink",switchView:"&"},template:'<a class="diff-linenum btn btn-inverse btn-small" ng-click="ctrl.goToLine(link)">Line {{ line }}</a>'}}i.ZP.directive("diffLinkJson",he);function de(){"use strict";return{restrict:"A",require:"ngModel",link:(l,t,s,e)=>{function h(g){return(g||"").split(",")}function p(g){return(0,E.isArray)(g)?(g||"").join(","):g}e.$parsers.push(h),e.$formatters.push(p)}}}i.ZP.directive("arrayJoin",de);var jt=a(82367),Kt=a(73453),pe=a(62108),fe=a(56025),me=a(74011),ge=a(62916),ve=a(36149),ye=a(36537),be=a(49257),Ce=a(71585),we=a(34667),Ee=a(94547);function vt(l,t,s){i.ZP.directive(l,["reactDirective",e=>e((0,Ee.E)(t,we.config.theme2),s)])}var xe=a(41482),Te=a(37232),Pe=a(78695),Se=a(66970),Ae=a(40387),Ot=a(42844),De=a(15372),ke=a(54281),$e=a(66310),Me=a(65469),Oe=a(15166),Le=a(87831),Ie=a(99829);const Re=({children:l,customCss:t})=>{if(!l||l.length===0)return null;const s=l.find(e=>e.active===!0);return et.createElement("div",{className:`gf-form-select-wrapper width-20 ${t}`},et.createElement("div",{className:"dropdown"},et.createElement("button",{type:"button",className:"gf-form-input dropdown-toggle","data-toggle":"dropdown",style:{textAlign:"left"}},s?.text),et.createElement("ul",{role:"menu",className:"dropdown-menu dropdown-menu--menu"},l.map(e=>e.hideFromTabs?null:et.createElement(Oe.u,{key:e.url,iconClassName:e.icon,text:e.text,href:e.url})))))},Ne=({children:l})=>!l||l.length===0?null:et.createElement("nav",null,et.createElement(Re,{customCss:"page-header__select-nav"},l),et.createElement(De.J,{className:"page-header__tabs",hideBorder:!0},l.map((t,s)=>!t.hideFromTabs&&et.createElement(ke.O,{label:t.text,active:t.active,key:`${t.url}-${s}`,icon:t.icon,href:t.url,suffix:t.tabSuffix})))),Ue=({navItem:l,renderTitle:t,actions:s,info:e,subTitle:h})=>{const p=(0,$e.wW)(Fe);if(!l)return null;const g=x=>{const P=x.icon==="grafana"?12:14,T=x.icon&&(0,Me.toIconName)(x.icon),I=h??x.subTitle;return et.createElement("div",{className:"page-header__inner"},et.createElement("span",{className:"page-header__logo"},T&&et.createElement(Kt.J,{name:T,size:"xxxl",style:{marginTop:P}}),x.img&&et.createElement("img",{className:"page-header__img",src:x.img,alt:""})),et.createElement("div",{className:(0,Ot.cx)("page-header__info-block",p.headerText)},t?t(x.text):Be(x.text,x.highlightText),e&&et.createElement(Le.S,{info:e}),I&&et.createElement("div",{className:"page-header__sub-title"},I),s&&et.createElement("div",{className:p.actions},s)))};return et.createElement("div",{className:p.headerCanvas},et.createElement("div",{className:"page-container"},et.createElement("div",{className:"page-header"},g(l),l.children&&l.children.length>0&&et.createElement(Ne,null,l.children))))};function Be(l,t){return l?et.createElement("h1",{className:"page-header__title"},l,t&&et.createElement(Ie.Z,{text:t,className:(0,Ot.css)` vertical-align: middle; `})):null}const Fe=l=>({actions:(0,Ot.css)({display:"flex",flexDirection:"row",gap:l.spacing(1)}),headerText:(0,Ot.css)({display:"flex",flexDirection:"column",gap:l.spacing(1)}),headerCanvas:(0,Ot.css)` background: ${l.colors.background.canvas}; `}),{Select:We}=jt.LegacyForms,ze=l=>{const{value:t,placeholder:s,className:e,isSearchable:h,onChange:p}=l,g=Ve(l),x=He(g,t),P=(0,et.useCallback)(T=>p(T.value),[p]);return et.createElement(We,{className:e,isMulti:!1,isClearable:!1,backspaceRemovesValue:!1,onChange:P,options:g,isSearchable:h,maxMenuHeight:500,placeholder:s,noOptionsMessage:()=>"No options found",value:x})},Ve=({variables:l=[],options:t})=>(0,et.useMemo)(()=>!Array.isArray(l)||l.length===0?t:[{label:"Template Variables",options:l.map(({name:s})=>({label:`$${s}`,value:`$${s}`}))},...t],[l,t]),He=(l,t)=>(0,et.useMemo)(()=>(l.every(e=>e.options)?(0,E.flatten)(l.map(e=>e.options)):l).find(e=>e.value===t),[l,t]);var Ze=a(1041),je=a(12969);const{SecretFormField:Ke}=jt.LegacyForms;function Qe(){vt("footer",Ae.$_,[]),vt("icon",Kt.J,["name","size","type",["onClick",{watchDepth:"reference",wrapApply:!0}]]),vt("spinner",pe.$,["inline"]),vt("helpModal",je.B,[]),vt("pageHeader",Ue,["model","noTabs"]),vt("emptyListCta",Se.Z,["title","buttonIcon","buttonLink","buttonTitle",["onClick",{watchDepth:"reference",wrapApply:!0}],"proTip","proTipLink","proTipLinkTitle","proTipTarget","infoBox","infoBoxTitle"]),vt("tagFilter",Ze.D,["tags",["onChange",{watchDepth:"reference"}],["tagOptions",{watchDepth:"reference"}]]),vt("colorPicker",fe.zH,["color",["onChange",{watchDepth:"reference",wrapApply:!0}]]),vt("seriesColorPickerPopover",me.q,["color","series","onColorChange","onToggleAxis"]),vt("unitPicker",ge.n,["value","width",["onChange",{watchDepth:"reference",wrapApply:!0}]]),vt("metricSelect",ze,["options","onChange","value","isSearchable","className","placeholder",["variables",{watchDepth:"reference"}]]),vt("cloudMonitoringQueryEditor",Pe.W,["target","onQueryChange","onExecuteQuery",["events",{watchDepth:"reference"}],["datasource",{watchDepth:"reference"}],["templateSrv",{watchDepth:"reference"}]]),vt("secretFormField",Ke,["value","isConfigured","inputWidth","labelWidth","aria-label",["onReset",{watchDepth:"reference",wrapApply:!0}],["onChange",{watchDepth:"reference",wrapApply:!0}]]),vt("graphContextMenu",ve.w,["x","y","itemsGroup",["onClose",{watchDepth:"reference",wrapApply:!0}],["getContextMenuSource",{watchDepth:"reference",wrapApply:!0}],["timeZone",{watchDepth:"reference",wrapApply:!0}]]),vt("drilldownLinksEditor",ye.d,["value","links","suggestions",["onChange",{watchDepth:"reference",wrapApply:!0}]]),vt("datasourceHttpSettingsNext",be.E,["defaultUrl","showAccessOptions","dataSourceConfig","showForwardOAuthIdentityOption",["onChange",{watchDepth:"reference",wrapApply:!0}]]),vt("folderPicker",xe.Fz,["labelClass","rootName","enableCreateNew","enableReset","initialTitle","initialFolderId","dashboardId","onCreateFolder",["enterFolderCreation",{watchDepth:"reference",wrapApply:!0}],["exitFolderCreation",{watchDepth:"reference",wrapApply:!0}],["onLoad",{watchDepth:"reference",wrapApply:!0}],["onChange",{watchDepth:"reference",wrapApply:!0}]]),vt("timePickerSettings",Te.P,["renderCount","refreshIntervals","timePickerHidden","nowDelay","timezone",["onTimeZoneChange",{watchDepth:"reference",wrapApply:!0}],["onRefreshIntervalChange",{watchDepth:"reference",wrapApply:!0}],["onNowDelayChange",{watchDepth:"reference",wrapApply:!0}],["onHideTimePickerChange",{watchDepth:"reference",wrapApply:!0}]]),vt("clipboardButton",Ce.m,[["getText",{watchDepth:"reference",wrapApply:!0}]])}var Wt=a(41135);const Ge=` <div class="dropdown cascade-open"> <a ng-click="showActionsMenu()" class="query-part-name pointer dropdown-toggle" data-toggle="dropdown">{{part.def.type}}</a> <span>(</span><span class="query-part-parameters"></span><span>)</span> <ul class="dropdown-menu"> <li ng-repeat="action in partActions"> <a ng-click="triggerPartAction(action)">{{action.text}}</a> </li> </ul> `;i.ZP.directive("queryPartEditor",["templateSrv",Je]);function Je(l){const t='<input type="text" class="hide input-mini tight-form-func-param"></input>';return{restrict:"E",template:Ge,scope:{part:"=",handleEvent:"&",debounce:"@"},link:function(e,h){const p=e.part,g=p.def,x=h.find(".query-part-parameters"),P=e.debounce;e.partActions=[];function T(R){const q=M()(this),X=q.next();X.val(p.params[R]),X.css("width",q.width()+16+"px"),q.hide(),X.show(),X.focus(),X.select();const it=X.data("typeahead");it&&(X.val(""),it.lookup())}function I(R){const q=M()(this),X=q.prev(),it=q.val();(it!==""||p.def.params[R].optional)&&(X.html(l.highlightVariablesAsHtml(it)),p.updateParam(q.val(),R),e.$apply(()=>{e.handleEvent({$event:{name:"part-param-changed"}})})),q.hide(),X.show()}function C(R,q){q.which===13&&I.call(this,R)}function L(){this.style.width=(3+this.value.length)*8+"px"}function k(R,q,X){if(!q.options&&!q.dynamicLookup)return;const it=(yt,Et)=>{if(q.options){let wt=q.options;return q.type==="int"&&(wt=(0,E.map)(wt,It=>It.toString())),wt}e.$apply(()=>{e.handleEvent({$event:{name:"get-param-options"}}).then(wt=>{const It=(0,E.map)(wt,$t=>(0,E.escape)($t.value));Et(It)})})};R.attr("data-provide","typeahead"),R.typeahead({source:it,minLength:0,items:1e3,updater:yt=>(yt=(0,E.unescape)(yt),setTimeout(()=>{I.call(R[0],X)},0),yt)});const ct=R.data("typeahead");ct.lookup=function(){this.query=this.$element.val()||"";const yt=this.source(this.query,M().proxy(this.process,this));return yt&&this.process(yt)},P&&(ct.lookup=(0,E.debounce)(ct.lookup,500,{leading:!0}))}e.showActionsMenu=()=>{(0,Wt.E)(e)(e.handleEvent({$event:{name:"get-part-actions"}}).then(R=>{e.partActions=R}))},e.triggerPartAction=R=>{e.handleEvent({$event:{name:"action",action:R}})};function j(){(0,E.each)(g.params,(R,q)=>{if(R.optional&&p.params.length<=q)return;q>0&&M()("<span>, </span>").appendTo(x);const X=l.highlightVariablesAsHtml(p.params[q]),it=M()('<a class="graphite-func-param-link pointer">'+X+"</a>"),ct=M()(t);it.appendTo(x),ct.appendTo(x),ct.blur((0,E.partial)(I,q)),ct.keyup(L),ct.keypress((0,E.partial)(C,q)),it.click((0,E.partial)(T,q)),k(ct,R,q)})}function ht(){x.empty(),j()}ht()}}}function Xe(l){let t=this.query;return t===""?!0:(t[0]==="/"&&(t=t.substring(1)),t[t.length-1]==="/"&&(t=t.substring(0,t.length-1)),l.toLowerCase().match(t.toLowerCase()))}class Qt{constructor(t,s,e,h){this.$scope=t,this.$sce=e,this.templateSrv=h,this.inputElement=s.find("input").first(),this.linkElement=s.find("a").first(),this.linkMode=!0,this.cancelBlur=null,this.labelMode=!1,this.lookupText=!1,this.debounce=!1,t.$watch("ctrl.model",this.modelChanged.bind(this))}$onInit(){this.labelMode?this.cssClasses="gf-form-label "+this.cssClass:this.cssClasses="gf-form-input gf-form-input--dropdown "+this.cssClass,this.placeholder&&this.inputElement.attr("placeholder",this.placeholder),this.inputElement.attr("data-provide","typeahead"),this.inputElement.typeahead({source:this.typeaheadSource.bind(this),minLength:0,items:1e4,updater:this.typeaheadUpdater.bind(this),matcher:Xe});const t=this.inputElement.data("typeahead");t.lookup=function(){this.query=this.$element.val()||"",this.source(this.query,this.process.bind(this))},this.debounce&&(t.lookup=(0,E.debounce)(t.lookup,500,{leading:!0})),this.linkElement.keydown(s=>{(s.keyCode===40||s.keyCode===13)&&this.linkElement.click()}),this.inputElement.keydown(s=>{s.keyCode===13&&setTimeout(()=>{this.inputElement.blur()},300)}),this.inputElement.blur(this.inputBlur.bind(this)),this.startOpen&&setTimeout(this.open.bind(this),0)}getOptionsInternal(t){return(0,Wt.E)(this.$scope)(Promise.resolve(this.getOptions({$query:t})))}isPromiseLike(t){return t&&typeof t.then=="function"}modelChanged(){(0,E.isObject)(this.model)?this.updateDisplay(this.model.text):this.lookupText?this.getOptionsInternal("").then(t=>{const s=(0,E.find)(t,{value:this.model});this.updateDisplay(s?s.text:this.model)}):this.updateDisplay(this.model)}typeaheadSource(t,s){this.getOptionsInternal(t).then(e=>{this.optionCache=e;const h=(0,E.map)(e,p=>(0,E.escape)(p.text));this.allowCustom&&this.text!==""&&(0,E.indexOf)(h,this.text)===-1&&h.unshift(this.text),s(h)})}typeaheadUpdater(t){return t===this.text?(clearTimeout(this.cancelBlur),this.inputElement.focus(),t):(this.inputElement.val(t),this.switchToLink(!0),t)}switchToLink(t){this.linkMode&&!t||(clearTimeout(this.cancelBlur),this.cancelBlur=null,this.linkMode=!0,this.inputElement.hide(),this.linkElement.show(),this.updateValue(this.inputElement.val()))}inputBlur(){this.cancelBlur=setTimeout(this.switchToLink.bind(this),200)}updateValue(t){t=(0,E.unescape)(t),!(t===""||this.text===t)&&this.$scope.$apply(()=>{const s=(0,E.find)(this.optionCache,{text:t});s?((0,E.isObject)(this.model)?this.model=s:this.model=s.value,this.text=s.text):this.allowCustom&&((0,E.isObject)(this.model)?this.model.text=this.model.value=t:this.model=t,this.text=t),this.$scope.$$postDigest(()=>{this.$scope.$apply(()=>{this.onChange({$option:s})})})})}updateDisplay(t){this.text=t,this.display=this.$sce.trustAsHtml(this.templateSrv.highlightVariablesAsHtml(t))}open(){this.inputElement.css("width",Math.max(this.linkElement.width(),80)+16+"px"),this.inputElement.show(),this.inputElement.focus(),this.linkElement.hide(),this.linkMode=!1;const t=this.inputElement.data("typeahead");t&&(this.inputElement.val(""),t.lookup())}}Qt.$inject=["$scope","$element","$sce","templateSrv"];const Ye=` <input type="text" data-provide="typeahead" class="gf-form-input" spellcheck="false" style="display:none"> </input> <a ng-class="ctrl.cssClasses" tabindex="1" ng-click="ctrl.open()" give-focus="ctrl.focus" ng-bind-html="ctrl.display || ' '"> </a> `;function qe(){return{restrict:"E",template:Ye,controller:Qt,bindToController:!0,controllerAs:"ctrl",scope:{model:"=",getOptions:"&",onChange:"&",cssClass:"@",allowCustom:"@",labelMode:"@",lookupText:"@",placeholder:"@",startOpen:"@",debounce:"@"}}}i.ZP.directive("gfFormDropdown",qe);const _e=` <div class="baron__track"> <div class="baron__bar"></div> </div> `,tn="baron baron__root",en="baron__scroller";function nn(){return{restrict:"A",link:(l,t,s)=>{let e=t.parent();const h=t;s.grafanaScrollbar&&s.grafanaScrollbar==="scrollonroot"&&(e=h),e.addClass(tn),M()(_e).appendTo(e),t.addClass(en);const p={root:e[0],scroller:h[0],bar:".baron__bar",barOnCls:"_scrollbar",scrollingCls:"_scrolling",track:".baron__track",direction:"v"},g=r()(p);l.$on("$destroy",()=>{g.dispose()})}}}i.ZP.directive("grafanaScrollbar",nn);var rn=a(17185);i.ZP.directive("jsonTree",[function(){return{restrict:"E",scope:{object:"=",startExpanded:"@",rootName:"@"},link:(t,s)=>{let e=t.startExpanded;t.startExpanded==="true"?e=2:t.startExpanded==="false"&&(e=1);const h={[t.rootName]:t.object},g=new rn.u(h,e,{animateOpen:!0}).render(!0);s.append(g)}}}]);const on=` <label for="check-{{ctrl.id}}" class="gf-form-switch-container"> <div class="gf-form-label {{ctrl.labelClass}}" ng-show="ctrl.label"> {{ctrl.label}} <info-popover mode="right-normal" ng-if="ctrl.tooltip" position="top center"> {{ctrl.tooltip}} </info-popover> </div> <div class="gf-form-switch {{ctrl.switchClass}}" ng-if="ctrl.show"> <input id="check-{{ctrl.id}}" type="checkbox" ng-model="ctrl.checked" ng-change="ctrl.internalOnChange()"> <span class="gf-form-switch__slider"></span> </div> </label> `,sn=` <label for="check-{{ctrl.id}}" class="gf-form-switch-container"> <div class="gf-form-label {{ctrl.labelClass}}" ng-show="ctrl.label"> {{ctrl.label}} <info-popover mode="right-normal" ng-if="ctrl.tooltip" position="top center"> {{ctrl.tooltip}} </info-popover> </div> <div class="gf-form-checkbox {{ctrl.switchClass}}" ng-if="ctrl.show"> <input id="check-{{ctrl.id}}" type="checkbox" ng-model="ctrl.checked" ng-change="ctrl.internalOnChange()"> <span class="gf-form-switch__checkbox"></span> </div> </label> `;class zt{constructor(t,s){this.$timeout=s,this.show=!0,this.id=t.$id}internalOnChange(){return this.$timeout(()=>this.onChange())}}zt.$inject=["$scope","$timeout"];function an(){return{restrict:"E",controller:zt,controllerAs:"ctrl",bindToController:!0,scope:{checked:"=",label:"@",labelClass:"@",tooltip:"@",switchClass:"@",onChange:"&"},template:on}}function ln(){return{restrict:"E",controller:zt,controllerAs:"ctrl",bindToController:!0,scope:{checked:"=",label:"@",labelClass:"@",tooltip:"@",switchClass:"@",onChange:"&"},template:sn}}i.ZP.directive("gfFormSwitch",an),i.ZP.directive("gfFormCheckbox",ln);function cn(){return{restrict:"E",template:`<icon name="'info-circle'" style="margin-left: 10px;" size="'xs'"></icon>`,transclude:!0,link:(l,t,s,e,h)=>{const p=s.offset||"0 -10px",g=s.position||"right middle";let x="drop-help drop-hide-out-of-bounds";const P="hover";t.addClass("gf-form-help-icon"),s.wide&&(x+=" drop-wide"),s.mode&&t.addClass("gf-form-help-icon--"+s.mode),h((T,I)=>{const C=document.createElement("div");C.className="markdown-html",(0,E.each)(T,k=>{C.appendChild(k)});const L={target:t[0],content:C,position:g,classes:x,openOn:P,hoverOpenDelay:400,tetherOptions:{offset:p,constraints:[{to:"window",attachment:"together",pin:!0}]}};l.$applyAsync(()=>{const k=new(tt())(L),j=l.$on("$destroy",()=>{k.destroy(),j()})})})}}}i.ZP.directive("infoPopover",cn),i.ZP.directive("spectrumPicker",un);function un(){return{restrict:"E",require:"ngModel",scope:!0,replace:!0,template:'<color-picker color="ngModel.$viewValue" on-change="onColorChange"></color-picker>',link:(l,t,s,e)=>{l.ngModel=e,l.onColorChange=h=>{e.$setViewValue(h)}}}}var Dt=a(12308);const hn="ace/theme/grafana-dark",dn="ace/theme/textmate",pn="text",fn=10,mn=2,gn=!0,vn=!0,yn="<div></div>";async function bn(l,t,s){const e=s.mode||pn,h=s.maxLines||fn,p=s.showGutter!==void 0,g=s.tabSize||mn,x=s.behavioursEnabled?s.behavioursEnabled==="true":gn,P=s.snippetsEnabled?s.snippetsEnabled==="true":vn,T=t.get(0),{default:I}=await a.e(5673).then(a.t.bind(a,39670,23));await a.e(6725).then(a.t.bind(a,36725,23)),await a.e(1545).then(a.t.bind(a,31545,23)),await a.e(7897).then(a.t.bind(a,47897,23)),await a.e(4011).then(a.t.bind(a,64011,23)),await a.e(753).then(a.t.bind(a,10753,23)),await a.e(1519).then(a.t.bind(a,21519,23)),await a.e(2645).then(a.t.bind(a,12645,23)),await a.e(6629).then(a.t.bind(a,26629,23)),await a.e(6814).then(a.t.bind(a,76814,23)),await a.e(7677).then(a.t.bind(a,97677,23)),await a.e(6170).then(a.t.bind(a,66170,23)),await a.e(4070).then(a.t.bind(a,44070,23)),await a.e(7428).then(a.t.bind(a,57428,23));const C=I.edit(T),L=C.getSession(),k={maxLines:h,showGutter:p,tabSize:g,behavioursEnabled:x,highlightActiveLine:!1,showPrintMargin:!1,autoScrollEditorIntoView:!0};C.setOptions(k),C.$blockScrolling=1/0,C.renderer.setScrollMargin(10,10),C.renderer.setPadding(10),R(),ht(e),q(l.content),t.addClass("gf-code-editor");const j=t.find("textarea");j.addClass("gf-form-input"),j.attr("aria-label",s.textareaLabel),l.codeEditorFocus&&setTimeout(()=>{j.focus();const X=j[0];if(X.setSelectionRange){const it=j.val().length*2;X.setSelectionRange(it,it)}},100),L.on("change",X=>{l.$apply(()=>{const it=C.getValue();l.content=it})}),l.$watch("content",(X,it)=>{const ct=C.getValue();X!==ct&&X!==it&&l.$$postDigest(()=>{q(X)})}),C.on("blur",()=>{l.onChange()}),l.$on("$destroy",()=>{C.destroy()}),C.commands.addCommand({name:"executeQuery",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:()=>{l.onChange()}});function ht(X){if(I.acequire("ace/ext/language_tools"),C.setOptions({enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:P}),l.getCompleter()){const ct=C;ct.completers=ct.completers.slice(),ct.completers.push(l.getCompleter())}const it=`ace/mode/${X}`;L.setMode(it)}function R(){let X=hn;Dt.default.bootData.user.lightTheme&&(X=dn),C.setTheme(X)}function q(X){C.setValue(X),C.clearSelection()}}function Cn(){return{restrict:"E",template:yn,scope:{content:"=",datasource:"=",codeEditorFocus:"<",onChange:"&",getCompleter:"&"},link:bn}}i.ZP.directive("codeEditor",Cn);const wn=` <div class="dropdown cascade-open"> <a ng-click="showActionsMenu()" class="query-part-name pointer dropdown-toggle" data-toggle="dropdown">{{part.label}}</a> <span>{{part.def.wrapOpen}}</span><span class="query-part-parameters"></span><span>{{part.def.wrapClose}}</span> <ul class="dropdown-menu"> <li ng-repeat="action in partActions"> <a ng-click="triggerPartAction(action)">{{action.text}}</a> </li> </ul> `;i.ZP.directive("sqlPartEditor",["templateSrv",En]);function En(l){const t='<input type="text" class="hide input-mini"></input>';return{restrict:"E",template:wn,scope:{part:"=",handleEvent:"&",debounce:"@"},link:function(e,h){const p=e.part,g=p.def,x=h.find(".query-part-parameters"),P=e.debounce;let T=null;e.partActions=[];function I(X){const it=M()(this),ct=it.next();ct.val(p.params[X]),ct.css("width",it.width()+16+"px"),it.hide(),ct.show(),ct.focus(),ct.select();const yt=ct.data("typeahead");yt&&(ct.val(""),yt.lookup())}function C(X,it){T=setTimeout(()=>{L(X,it)},200)}function L(X,it){const ct=X.prev(),yt=X.val();(yt!==""||p.def.params[it].optional)&&(ct.html(l.highlightVariablesAsHtml(yt)),p.updateParam(X.val(),it),e.$apply(()=>{e.handleEvent({$event:{name:"part-param-changed"}})})),X.hide(),ct.show()}function k(X,it){it.which===13&&L(M()(this),X)}function j(){this.style.width=(3+this.value.length)*8+"px"}function ht(X,it,ct){if(!it.options&&!it.dynamicLookup)return;const yt=(wt,It)=>{if(it.options){let $t=it.options;return it.type==="int"&&($t=(0,E.map)($t,Rt=>Rt.toString())),$t}e.$apply(()=>{e.handleEvent({$event:{name:"get-param-options",param:it}}).then($t=>{const Rt=(0,E.map)($t,Yn=>(0,E.escape)(Yn.value));(0,E.indexOf)(Rt,p.params[ct])===-1&&Rt.unshift((0,E.escape)(p.params[ct])),It(Rt)})})};X.attr("data-provide","typeahead"),X.typeahead({source:yt,minLength:0,items:1e3,updater:wt=>(wt=(0,E.unescape)(wt),wt===p.params[ct]&&(clearTimeout(T),X.focus()),wt)});const Et=X.data("typeahead");Et.lookup=function(){this.query=this.$element.val()||"";const wt=this.source(this.query,M().proxy(this.process,this));return wt&&this.process(wt)},P&&(Et.lookup=(0,E.debounce)(Et.lookup,500,{leading:!0}))}e.showActionsMenu=()=>{e.handleEvent({$event:{name:"get-part-actions"}}).then(X=>{e.partActions=X})},e.triggerPartAction=X=>{e.handleEvent({$event:{name:"action",action:X}})};function R(){(0,E.each)(g.params,(X,it)=>{if(X.optional&&p.params.length<=it)return;it>0&&M()("<span>"+g.separator+"</span>").appendTo(x);const ct=l.highlightVariablesAsHtml(p.params[it]),yt=M()('<a class="query-part__link">'+ct+"</a>"),Et=M()(t);yt.appendTo(x),Et.appendTo(x),Et.blur((0,E.partial)(C,Et,it)),Et.keyup(j),Et.keypress((0,E.partial)(k,it)),yt.click((0,E.partial)(I,it)),ht(Et,X,it)})}function q(){x.empty(),R()}q()}}}i.hF.directive("datasourceHttpSettings",()=>({scope:{current:"=",suggestUrl:"@",noDirectAccess:"@",showForwardOAuthIdentityOption:"@"},templateUrl:"public/app/angular/partials/http_settings_next.html",link:{pre:l=>{l.showAccessOption=l.noDirectAccess!=="true",l.onChange=t=>{l.current=t}}}})),i.hF.directive("datasourceTlsAuthSettings",()=>({scope:{current:"="},templateUrl:"public/app/angular/partials/tls_auth_settings.html"}));var xn=a(59882),kt=a(8929);function Gt(l,t){if(l)return l.startsWith(Dt.default.pluginsCDNBaseURL)?l:`${t.replace("plugin-cdn/",`${Dt.default.pluginsCDNBaseURL}/`)}/${l}`}i.ZP.directive("pluginComponent",["$compile","$http","$templateCache","$location",Tn]);function Tn(l,t,s,e){function h(C){if(C.template)return Promise.resolve(C.template);const L=s.get(C.templateUrl);return L?Promise.resolve(L):t.get(C.templateUrl).then(k=>k.data)}function p(C,L){if(C)return C.indexOf("public")===0?C:L+"/"+C}function g(C){return C.baseUrl.includes("plugin-cdn")?C.Component.templateUrl=Gt(C.Component.templateUrl,C.baseUrl):C.Component.templateUrl=p(C.Component.templateUrl,C.baseUrl),()=>({templateUrl:C.Component.templateUrl,template:C.Component.template,restrict:"E",controller:C.Component,controllerAs:"ctrl",bindToController:!0,scope:C.bindings,link:(L,k,j,ht)=>{ht.link&&ht.link(L,k,j,ht),ht.init&&ht.init()}})}function x(C,L){const k={name:"panel-plugin-"+C.panel.type,bindings:{dashboard:"=",panel:"=",row:"="},attrs:{dashboard:"dashboard",panel:"panel",class:"panel-height-helper"}},j=Dt.default.panels[C.panel.type];return(0,xn.Ub)(j.id).then(ht=>{const R=ht.angularPanelCtrl;return k.Component=R,!R||R.registered?k:R.templatePromise?R.templatePromise.then(q=>k):(j&&(j.baseUrl.includes("plugin-cdn")?R.templateUrl=Gt(R.templateUrl,j.baseUrl):R.templateUrl=p(R.templateUrl,j.baseUrl)),R.templatePromise=h(R).then(q=>(R.templateUrl=null,R.template=`<grafana-panel ctrl="ctrl" class="panel-height-helper">${q}</grafana-panel>`,{...k,baseUrl:j.baseUrl})),R.templatePromise)})}function P(C,L){switch(L.type){case"query-ctrl":{const k=C.ctrl.datasource;return Promise.resolve({baseUrl:k.meta.baseUrl,name:"query-ctrl-"+k.meta.id,bindings:{target:"=",panelCtrl:"=",datasource:"="},attrs:{target:"ctrl.target","panel-ctrl":"ctrl",datasource:"ctrl.datasource"},Component:k.components.QueryCtrl})}case"annotations-query-ctrl":{const k=C.ctrl.currentDatasource.meta.baseUrl,j=C.ctrl.currentDatasource.meta.id;return(0,kt.nL)(C.ctrl.currentDatasource.meta).then(ht=>({baseUrl:k,name:"annotations-query-ctrl-"+j,bindings:{annotation:"=",datasource:"="},attrs:{annotation:"ctrl.currentAnnotation",datasource:"ctrl.currentDatasource"},Component:ht.components.AnnotationsQueryCtrl}))}case"datasource-config-ctrl":{const k=C.ctrl.datasourceMeta,j=e.url();return(0,kt.nL)(k).then(ht=>(C.$watch("ctrl.current",()=>{j===e.url()&&C.onModelChanged(C.ctrl.current)},!0),{baseUrl:k.baseUrl,name:"ds-config-"+k.id,bindings:{meta:"=",current:"="},attrs:{meta:"ctrl.datasourceMeta",current:"ctrl.current"},Component:ht.angularConfigCtrl}))}case"app-config-ctrl":{const k=C.ctrl.model;return(0,kt.Av)(k).then(j=>({baseUrl:k.baseUrl,name:"app-config-"+k.id,bindings:{appModel:"=",appEditCtrl:"="},attrs:{"app-model":"ctrl.model","app-edit-ctrl":"ctrl"},Component:j.angularConfigCtrl}))}case"panel":return x(C,L);default:return Promise.reject({message:"Could not find component type: "+L.type})}}function T(C,L,k){const j=y().element(document.createElement(k.name));(0,E.each)(k.attrs,(ht,R)=>{j.attr(R,ht)}),l(j)(C),L.empty(),setTimeout(()=>{C.$applyAsync(()=>{L.append(j),setTimeout(()=>{C.$applyAsync(()=>{C.$broadcast(m.Kh.componentDidMount.name)})})})})}function I(C,L,k,j){if(j.notFound){L.empty();return}if(!j.Component)throw{message:"Failed to find exported plugin component for "+j.name};if(!j.Component.registered){const ht=k.$normalize(j.name),R=g(j);i.ZP.directive(ht,R),j.Component.registered=!0}T(C,L,j)}return{restrict:"E",link:(C,L,k)=>{P(C,k).then(j=>{I(C,L,k,j)}).catch(j=>{console.error("Plugin component error",j)})}}}var Pn=a(9772),Sn=a(32416),An=a(5354),Lt=a(5933);class Jt{constructor(t,s,e,h,p,g){(0,Pn.W)(p),(0,Sn.t)(g),t.init=()=>{t.contextSrv=h,t.appSubUrl=Dt.default.appSubUrl,t._=rt(),s.init()},e.colors=An.O9,e.onAppEvent=function(x,P,T){let I;typeof x=="string"?I=e.$on(x,P):I=e.$on(x.name,P);let C=this;C.$id===1&&!T&&console.warn("warning rootScope onAppEvent called without localscope"),T&&(C=T),C.$on("$destroy",I)},e.appEvent=(x,P)=>{typeof x=="string"?(e.$emit(x,P),Lt.Z.emit(x,P)):(e.$emit(x.name,P),Lt.Z.emit(x,P))},t.init()}}Jt.$inject=["$scope","utilSrv","$rootScope","contextSrv","angularLoader","$injector"];function Dn(){return{restrict:"E",controller:Jt,link:(l,t)=>{const s=M()("body");M().fn.modal.Constructor.prototype.enforceFocus=()=>{};let e=new Date().getTime(),h=!0;const p=60*5e3;function g(){h&&s.hasClass("page-dashboard")&&new Date().getTime()-e>p&&(h=!1,s.addClass("view-mode--inactive"))}function x(){e=new Date().getTime(),h||(h=!0,s.removeClass("view-mode--inactive"))}s.mousemove(x),s.keydown(x),document.addEventListener("wheel",x,{capture:!0,passive:!0}),document.addEventListener("visibilitychange",x),setInterval(g,2e3),s.click(P=>{const T=M()(P.target);if(T.parents().length===0)return;s.find(".dropdown-menu-open").removeClass("dropdown-menu-open");const I=T.closest("[data-click-hide]");if(I.length){const L=I.parent();I.detach(),setTimeout(()=>{L.append(I)},100)}const C=t.find(".popover");C.length>0&&T.parents(".graph-legend").length===0&&C.hide()})}}}i.ZP.directive("grafanaApp",Dn);var ti=a(3469),ei=a(70070),ni=a(26139),ii=a(526),kn=a(39317),$n=a(91368),Mn=a(46823),On=a(26858),Ln=a(22902),Xt=a(26129);class In{constructor(){this.$get=()=>{},(0,Xt.GQ)("Patch angular",!1,"RouteParamsProvider")}}class Rn{constructor(){(0,Xt.GQ)("Patch angular",!1,"RouteProvider")}$get(){return this}}var Nn=a(66695);const Un=()=>{i.hF.config(["$provide",l=>{l.decorator("$browser",["$delegate",t=>(t.onUrlChange=()=>{},t.url=()=>"",t)])}])},Bn=()=>{i.hF.config(["$provide",l=>{l.decorator("$location",["$delegate",t=>(t=new Nn.O,t)])}]),i.hF.provider("$route",Rn),i.hF.provider("$routeParams",In)};function Fn(){Un(),Bn()}function Wn(l){l.oldInvoke=l.invoke,l.invoke=(t,s,e,h)=>{const p=e?.$scope?.$parent;return p&&(p.panel&&(s.panel=p.panel),p.dashboard&&(s.dashboard=p.dashboard),p.ctrl?.target&&(s.panelCtrl=p.ctrl,s.datasource=p.ctrl.datasource,s.target=p.ctrl.target),p.ctrl?.datasourceMeta&&(s.meta=p.ctrl.datasourceMeta,s.current=p.ctrl.current),p.ctrl?.currentAnnotation&&(s.annotation=p.ctrl.currentAnnotation,s.datasource=p.ctrl.currentDatasource),p.isAppConfigCtrl&&(s.appEditCtrl=p.ctrl,s.appModel=p.ctrl.model),p.$parent?.$parent?.ctrl?.appModel&&(s.appModel=p.$parent?.$parent?.ctrl?.appModel)),l.oldInvoke(t,s,e,h)}}var zn=a(73289),Vn=a(10864),Hn=a(66574),Zn=a(75261),jn=a(39345),Kn=a(89897),Pt=a(58939);class Qn{constructor(){}init(){Lt.h.subscribe(c.le,t=>this.showModal(t.payload)),Lt.h.subscribe(c.OW,this.hideModal.bind(this))}hideModal(){(0,Pt.d)("UtilSrv","hideModal",""),this.modalScope&&this.modalScope.dismiss&&this.modalScope.dismiss()}showModal(t){(0,Pt.d)("UtilSrv","showModal","publish ShowModalReactEvent")}}var Vt=a(11285);class Gn{clearPromiseCaches(){(0,Pt.d)("annotations_srv.ts","clearPromiseCaches","DashboardQueryRunner")}getAnnotations(t){return(0,Pt.d)("annotations_srv.ts","getAnnotations","DashboardQueryRunner.getResult"),Promise.resolve({annotations:[],alertState:void 0})}getAlertStates(t){return(0,Pt.d)("annotations_srv.ts","getAlertStates","DashboardQueryRunner.getResult"),Promise.resolve(void 0)}getGlobalAnnotations(t){return(0,Pt.d)("annotations_srv.ts","getGlobalAnnotations","DashboardQueryRunner.getResult"),Promise.resolve([])}saveAnnotationEvent(t){return(0,Pt.d)("annotations_srv.ts","saveAnnotationEvent","api/saveAnnotation"),(0,Vt.xD)(t)}updateAnnotationEvent(t){return(0,Pt.d)("annotations_srv.ts","updateAnnotationEvent","api/updateAnnotation"),(0,Vt._E)(t)}deleteAnnotationEvent(t){return(0,Pt.d)("annotations_srv.ts","deleteAnnotationEvent","api/deleteAnnotation"),(0,Vt.Dl)(t)}translateQueryResult(t,s){(0,Pt.d)("annotations_srv.ts","translateQueryResult","DashboardQueryRunner/utils/translateQueryResult"),t.snapshotData&&(t=(0,E.cloneDeep)(t),delete t.snapshotData);for(const e of s)e.source=t,e.color=t.iconColor,e.type=t.name,e.isRegion=e.timeEnd&&e.time!==e.timeEnd;return s}}function Jn(){i.ZP.factory("backendSrv",()=>(0,zn.i)()),i.ZP.factory("contextSrv",()=>Hn.Vt),i.ZP.factory("dashboardSrv",()=>(0,Zn.h4)()),i.ZP.factory("datasourceSrv",()=>(0,Vn.F)()),i.ZP.factory("linkSrv",()=>(0,Kn.Bq)()),i.ZP.factory("validationSrv",()=>jn.t),i.ZP.service("annotationsSrv",Gn),i.ZP.service("utilSrv",Qn)}class Xn{constructor(){this.preBootModules=[],this.ngModuleDependencies=[],this.registerFunctions={}}init(){y().module("grafana",[]).config(["$controllerProvider","$compileProvider","$filterProvider","$httpProvider","$provide","$sceDelegateProvider",(s,e,h,p,g,x)=>{Dt.config.buildInfo.env!=="development"&&e.debugInfoEnabled(!1),p.useApplyAsync(!0),Dt.config.pluginsCDNBaseURL&&x.trustedResourceUrlList(["self",`${Dt.config.pluginsCDNBaseURL}/**`]),this.registerFunctions.controller=s.register,this.registerFunctions.directive=e.directive,this.registerFunctions.factory=g.factory,this.registerFunctions.service=g.service,this.registerFunctions.filter=h.register,g.decorator("$http",["$delegate","$templateCache",(P,T)=>{const I=P.get;return P.get=(C,L)=>(C.match(/\.html$/)&&(T.get(C)||(C+="?v="+new Date().getTime())),I(C,L)),P}])}]),this.ngModuleDependencies=["grafana.core","ngSanitize","grafana","pasvaz.bindonce","react"],i.rb.forEach(s=>{this.useModule(s)}),y().module("grafana.services").service("dashboardLoaderSrv",Mn.Bg),i.ZP.factory("timeSrv",()=>(0,On.$t)()),i.ZP.factory("templateSrv",()=>(0,kn.J)()),Qe(),Jn(),Fn(),(0,kt.kY)("angular",y()),(0,kt.kY)("app/core/utils/promiseToDigest",{promiseToDigest:Wt.E,__esModule:!0}),(0,kt.kY)("app/plugins/sdk",Ln),(0,kt.kY)("app/core/core_module",i.ZP),(0,kt.kY)("app/core/core",{coreModule:i.ZP,appEvents:Lt.Z,contextSrv:$n.contextSrv,__esModule:!0}),$.fn.tooltip.defaults.animation=!1}useModule(t){return this.preBootModules?this.preBootModules.push(t):(0,E.extend)(t,this.registerFunctions),this.ngModuleDependencies.push(t.name),t}bootstrap(){const t=y().bootstrap(document.getElementById("ngRoot"),this.ngModuleDependencies);return Wn(t),t.invoke(()=>(this.preBootModules.forEach(s=>{(0,E.extend)(s,this.registerFunctions)}),()=>{})),t}}},90108:(o,w,a)=>{"use strict";a.d(w,{k:()=>v});var n=a(89949),r=a.n(n),u=a(53933),m=a(32053),b=a(3935),i=a(39372),c=a(22377);class v extends i.q{constructor(f,y){super(f,y),this.skipDataOnInit=!1,this.dataList=[],this.useDataFrames=!1,this.panelDataObserver={next:F=>{if(this.panelData=F,F.state===u.Gu.Error&&(this.loading=!1,this.processDataError(F.error)),F.state===u.Gu.Loading){this.loading=!0,this.angularDirtyCheck();return}if(F.request){const{timeInfo:G}=F.request;G&&(this.timeInfo=G)}if(F.timeRange&&(this.range=F.timeRange),this.useDataFrames)this.handleDataFrames(F.series);else{const G=F.series.map(W=>(0,m.Zr)(W));this.handleQueryResult({data:G})}this.angularDirtyCheck()}},this.contextSrv=y.get("contextSrv"),this.datasourceSrv=y.get("datasourceSrv"),this.timeSrv=y.get("timeSrv"),this.templateSrv=y.get("templateSrv"),this.panel.datasource=this.panel.datasource||null,this.events.on(b.Kh.refresh,this.onMetricsPanelRefresh.bind(this)),this.events.on(b.Kh.panelTeardown,this.onPanelTearDown.bind(this)),this.events.on(b.Kh.componentDidMount,this.onMetricsPanelMounted.bind(this))}onMetricsPanelMounted(){const f=this.panel.getQueryRunner();this.querySubscription=f.getData({withTransforms:!0,withFieldConfig:!0}).subscribe(this.panelDataObserver)}onPanelTearDown(){this.querySubscription&&(this.querySubscription.unsubscribe(),this.querySubscription=null)}onMetricsPanelRefresh(){if(!this.otherPanelInFullscreenMode()){if(this.panel.snapshotData){this.updateTimeRange();let f=this.panel.snapshotData;return(0,n.isArray)(f)||(f=f.data),this.panelData={state:u.Gu.Done,series:f,timeRange:this.range},this.$timeout(()=>{this.events.emit(b.Kh.dataSnapshotLoad,f)})}return delete this.error,this.loading=!0,this.datasourceSrv.get(this.panel.datasource,this.panel.scopedVars).then(this.issueQueries.bind(this)).catch(f=>{this.processDataError(f)})}}processDataError(f){if(f.cancelled){console.log("Panel request cancelled",f);return}this.error=f.message||"Request Error",f.data&&(f.data.message?this.error=f.data.message:f.data.error&&(this.error=f.data.error)),this.angularDirtyCheck()}angularDirtyCheck(){this.$scope.$root.$$phase||this.$scope.$digest()}updateTimeRange(f){this.datasource=f||this.datasource,this.range=this.timeSrv.timeRange();const y=(0,c.W1)(this.panel,this.range);this.timeInfo=y.timeInfo,this.range=y.timeRange}issueQueries(f){this.updateTimeRange(f),this.datasource=f;const y=this.panel;return y.getQueryRunner().run({datasource:y.datasource,queries:y.targets,panelId:y.id,dashboardUID:this.dashboard.uid,timezone:this.dashboard.getTimezone(),timeInfo:this.timeInfo,timeRange:this.range,maxDataPoints:y.maxDataPoints||this.width,minInterval:y.interval,publicDashboardAccessToken:this.dashboard.meta.publicDashboardAccessToken,scopedVars:y.scopedVars,cacheTimeout:y.cacheTimeout,queryCachingTTL:y.queryCachingTTL,transformations:y.transformations})}handleDataFrames(f){this.loading=!1,this.dashboard&&this.dashboard.snapshot&&(this.panel.snapshotData=f.map(y=>(0,m.og)(y)));try{this.events.emit(b.Kh.dataFramesReceived,f)}catch(y){this.processDataError(y)}}handleQueryResult(f){this.loading=!1,this.dashboard.snapshot&&(this.panel.snapshotData=f.data),(!f||!f.data)&&(console.log("Data source query result invalid, missing data field:",f),f={data:[]});try{this.events.emit(b.Kh.dataReceived,f.data)}catch(y){this.processDataError(y)}}}},39372:(o,w,a)=>{"use strict";a.d(w,{q:()=>v});var n=a(89949),r=a.n(n),u=a(62435),m=a(3935),b=a(66695),i=a(12308),c=a(66574);class v{constructor(f,y){this.pluginName="",this.pluginId="",this.editModeInitiated=!1,this.loading=!1,this.onPluginTypeChange=G=>{},this.panel=this.panel??f.$parent.panel,this.dashboard=this.dashboard??f.$parent.dashboard,this.$injector=y,this.$scope=f,this.$timeout=y.get("$timeout"),this.editorTabs=[],this.$location=new b.O,this.events=new u.F,this.timing={};const F=i.default.panels[this.panel.type];F&&(this.pluginId=F.id,this.pluginName=F.name),f.$on(m.Kh.componentDidMount.name,()=>this.panelDidMount())}panelDidMount(){this.events.emit(m.Kh.componentDidMount),this.events.emit(m.Kh.initialized),this.dashboard.panelInitialized(this.panel)}renderingCompleted(){c.rv.renderingCompleted()}refresh(){this.panel.refresh()}publishAppEvent(f,y){this.$scope.$root.appEvent(f,y)}initEditMode(){this.editModeInitiated||(this.editModeInitiated=!0,this.events.emit(m.Kh.editModeInitialized))}addEditorTab(f,y,F,G){const W={title:f,directiveFn:y,icon:G};(0,n.isString)(y)&&(W.directiveFn=()=>({templateUrl:y})),F?this.editorTabs.splice(F,0,W):this.editorTabs.push(W)}getExtendedMenu(){const f=[];return this.events.emit(m.Kh.initPanelActions,f),f}async getAdditionalMenuItems(){return[]}otherPanelInFullscreenMode(){return this.dashboard.otherPanelInFullscreen(this.panel)}render(f){this.events.emit(m.Kh.render,f)}}},94125:(o,w,a)=>{"use strict";a.d(w,{G:()=>u});var n=a(89949),r=a.n(n);class u{constructor(b,i){this.$scope=b,this.$injector=i,this.panelCtrl=this.panelCtrl??b.ctrl.panelCtrl,this.target=this.target??b.ctrl.target,this.datasource=this.datasource??b.ctrl.datasource,this.panel=this.panelCtrl?.panel??b.ctrl.panelCtrl.panel,this.isLastQuery=(0,n.indexOf)(this.panel.targets,this.target)===this.panel.targets.length-1}refresh(){this.panelCtrl.refresh()}}},87071:(o,w,a)=>{"use strict";let n=a(11461);n.keys().forEach(r=>{n(r)})},41135:(o,w,a)=>{"use strict";a.d(w,{E:()=>n});const n=r=>u=>u.finally(r.$evalAsync)},15166:(o,w,a)=>{"use strict";a.d(w,{u:()=>c});var n=a(42844),r=a(27702),u=a(74639),m=a(66310),b=a(65469),i=a(73453);const c=f=>{const[y,F]=(0,r.useState)(null),G=f.type==="submenu",W=(0,m.wW)(d),J=f.iconClassName?(0,b.toIconName)(f.iconClassName):void 0;switch(f.type){case"divider":return r.createElement("li",{className:"divider"});case"group":return r.createElement("li",null,r.createElement("span",{className:W.groupLabel},f.text));default:return r.createElement("li",{className:G?`dropdown-submenu ${v(y)}`:void 0,ref:F,"data-testid":u.wl.components.Panels.Panel.menuItems(f.text)},r.createElement("a",{onClick:f.onClick,href:f.href,role:"menuitem"},J&&r.createElement(i.J,{name:J,className:W.menuIconClassName}),r.createElement("span",{className:"dropdown-item-text","aria-label":u.wl.components.Panels.Panel.headerItems(f.text)},f.text,G&&r.createElement(i.J,{name:"angle-right",className:W.shortcutIconClassName})),f.shortcut&&r.createElement("span",{className:"dropdown-menu-item-shortcut"},r.createElement(i.J,{name:"keyboard",className:W.menuIconClassName})," ",f.shortcut)),f.children)}};function v(f){if(!f)return"invisible";const y=f.parentElement.getBoundingClientRect(),F=f.getBoundingClientRect();return F.width===0?"invisible":y.right+F.width+10>window.innerWidth?"pull-left":"pull-right"}function d(f){return{menuIconClassName:(0,n.css)({marginRight:f.spacing(1),"a::after":{display:"none"}}),shortcutIconClassName:(0,n.css)({position:"absolute",top:"7px",right:f.spacing(.5),color:f.colors.text.secondary}),groupLabel:(0,n.css)({color:f.colors.text.secondary,fontSize:f.typography.size.sm,padding:f.spacing(.5,1)})}}},22902:(o,w,a)=>{"use strict";a.r(w),a.d(w,{MetricsPanelCtrl:()=>c,PanelCtrl:()=>i,QueryCtrl:()=>v,loadPluginCss:()=>r.iS});var n=a(29403),r=a(97073),u=a(90108),m=a(39372),b=a(94125);const i=(0,n.s)(m.q),c=(0,n.s)(u.k),v=(0,n.s)(b.G)},526:()=>{(function(o){"use strict";o(function(){o.support.transition=function(){var w=function(){var a=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},r;for(r in n)if(a.style[r]!==void 0)return n[r]}();return w&&{end:w}}()})})(window.jQuery),function(o){"use strict";var w="[data-toggle=dropdown]",a=function(m){var b=o(m).on("click.dropdown.data-api",this.toggle);o("html").on("click.dropdown.data-api",function(){b.parent().removeClass("open")})};a.prototype={constructor:a,toggle:function(m){var b=o(this),i,c;if(!b.is(".disabled, :disabled"))return i=r(b),c=i.hasClass("open"),n(),c||("ontouchstart"in document.documentElement&&o('<div class="dropdown-backdrop"/>').insertBefore(o(this)).on("click",n),i.toggleClass("open")),b.focus(),!1},keydown:function(m){var b,i,c,v,d,f;if(/(38|40|27)/.test(m.keyCode)&&(b=o(this),m.preventDefault(),m.stopPropagation(),!b.is(".disabled, :disabled"))){if(v=r(b),d=v.hasClass("open"),!d||d&&m.keyCode==27)return m.which==27&&v.find(w).focus(),b.click();i=o("[role=menu] li:not(.divider):visible a",v),i.length&&(f=i.index(i.filter(":focus")),m.keyCode==38&&f>0&&f--,m.keyCode==40&&f<i.length-1&&f++,~f||(f=0),i.eq(f).focus())}}};function n(){o(".dropdown-backdrop").remove(),o(w).each(function(){r(o(this)).removeClass("open")})}function r(m){var b=m.attr("data-target"),i;return b||(b=m.attr("href"),b=b&&/#[A-Za-z]/.test(b)&&b.replace(/.*(?=#[^\s]*$)/,"")),i=b&&o.find(b),(!i||!i.length)&&(i=m.parent()),i}var u=o.fn.dropdown;o.fn.dropdown=function(m){return this.each(function(){var b=o(this),i=b.data("dropdown");i||b.data("dropdown",i=new a(this)),typeof m=="string"&&i[m].call(b)})},o.fn.dropdown.Constructor=a,o.fn.dropdown.noConflict=function(){return o.fn.dropdown=u,this},o(document).on("click.dropdown.data-api",n).on("click.dropdown.data-api",".dropdown form",function(m){m.stopPropagation()}).on("click.dropdown.data-api",w,a.prototype.toggle).on("keydown.dropdown.data-api",w+", [role=menu]",a.prototype.keydown)}(window.jQuery),function(o){"use strict";var w=function(n,r){this.options=r,this.$element=o(n).delegate('[data-dismiss="modal"]',"click.dismiss.modal",o.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};w.prototype={constructor:w,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var n=this,r=o.Event("show");this.$element.trigger(r),!(this.isShown||r.isDefaultPrevented())&&(this.isShown=!0,this.escape(),this.backdrop(function(){var u=o.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),u&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus(),u?n.$element.one(o.support.transition.end,function(){n.$element.focus().trigger("shown")}):n.$element.focus().trigger("shown")}))},hide:function(n){n&&n.preventDefault();var r=this;n=o.Event("hide"),this.$element.trigger(n),!(!this.isShown||n.isDefaultPrevented())&&(this.isShown=!1,this.escape(),o(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),o.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var n=this;o(document).on("focusin.modal",function(r){n.$element[0]!==r.target&&!n.$element.has(r.target).length&&n.$element.focus()})},escape:function(){var n=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(r){r.which==27&&n.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var n=this,r=setTimeout(function(){n.$element.off(o.support.transition.end),n.hideModal()},500);this.$element.one(o.support.transition.end,function(){clearTimeout(r),n.hideModal()})},hideModal:function(){var n=this;this.$element.hide(),this.backdrop(function(){n.removeBackdrop(),n.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(n){var r=this,u=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var m=o.support.transition&&u;if(this.$backdrop=o('<div class="modal-backdrop '+u+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?o.proxy(this.$element[0].focus,this.$element[0]):o.proxy(this.hide,this)),m&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!n)return;m?this.$backdrop.one(o.support.transition.end,n):n()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),o.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(o.support.transition.end,n):n()):n&&n()}};var a=o.fn.modal;o.fn.modal=function(n){return this.each(function(){var r=o(this),u=r.data("modal"),m=o.extend({},o.fn.modal.defaults,r.data(),typeof n=="object"&&n);u||r.data("modal",u=new w(this,m)),typeof n=="string"?u[n]():m.show&&u.show()})},o.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},o.fn.modal.Constructor=w,o.fn.modal.noConflict=function(){return o.fn.modal=a,this},o(document).on("click.modal.data-api",'[data-toggle="modal"]',function(n){var r=o(this),u=r.attr("href"),m=o.find(r.attr("data-target")||u&&u.replace(/.*(?=#[^\s]+$)/,"")),b=m.data("modal")?"toggle":o.extend({remote:!/#/.test(u)&&u},m.data(),r.data());n.preventDefault(),m.modal(b).one("hide",function(){r.focus()})})}(window.jQuery),function(o){"use strict";var w=function(n,r){this.init("tooltip",n,r)};w.prototype={constructor:w,init:function(n,r,u){var m,b,i,c,v;for(this.type=n,this.$element=o(r),this.options=this.getOptions(u),this.enabled=!0,i=this.options.trigger.split(" "),v=i.length;v--;)c=i[v],c=="click"?this.$element.on("click."+this.type,this.options.selector,o.proxy(this.toggle,this)):c!="manual"&&(m=c=="hover"?"mouseenter":"focus",b=c=="hover"?"mouseleave":"blur",this.$element.on(m+"."+this.type,this.options.selector,o.proxy(this.enter,this)),this.$element.on(b+"."+this.type,this.options.selector,o.proxy(this.leave,this)));this.options.selector?this._options=o.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(n){return n=o.extend({},o.fn[this.type].defaults,this.$element.data(),n),n.delay&&typeof n.delay=="number"&&(n.delay={show:n.delay,hide:n.delay}),n},enter:function(n){var r=o.fn[this.type].defaults,u={},m;if(this._options&&o.each(this._options,function(b,i){r[b]!=i&&(u[b]=i)},this),m=o(n.currentTarget)[this.type](u).data(this.type),!m.options.delay||!m.options.delay.show)return m.show();clearTimeout(this.timeout),m.hoverState="in",this.timeout=setTimeout(function(){m.hoverState=="in"&&m.show()},m.options.delay.show)},leave:function(n){var r=o(n.currentTarget)[this.type](this._options).data(this.type);if(this.timeout&&clearTimeout(this.timeout),!r.options.delay||!r.options.delay.hide)return r.hide();r.hoverState="out",this.timeout=setTimeout(function(){r.hoverState=="out"&&r.hide()},r.options.delay.hide)},show:function(){var n,r,u,m,b,i,c=o.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),c.isDefaultPrevented())return;switch(n=this.tip(),this.setContent(),this.options.animation&&n.addClass("fade"),b=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,n.detach().css({top:0,left:0,display:"block"}),this.options.container?n.appendTo(o.find(this.options.container)):n.insertAfter(this.$element),r=this.getPosition(),u=n[0].offsetWidth,m=n[0].offsetHeight,b){case"bottom":i={top:r.top+r.height,left:r.left+r.width/2-u/2};break;case"top":i={top:r.top-m,left:r.left+r.width/2-u/2};break;case"left":i={top:r.top+r.height/2-m/2,left:r.left-u};break;case"right":i={top:r.top+r.height/2-m/2,left:r.left+r.width};break;case"topLeft":i={top:r.top-m,left:r.left+r.width/2-u*.1};break;case"topRight":i={top:r.top-m,left:r.left+r.width/2-u*.9};break;case"rightTop":i={top:r.top+r.height/2-m*.1,left:r.left+r.width};break;case"rightBottom":i={top:r.top+r.height/2-m*.9,left:r.left+r.width};break;case"bottomLeft":i={top:r.top+r.height,left:r.left+r.width/2-u*.1};break;case"bottomRight":i={top:r.top+r.height,left:r.left+r.width/2-u*.9};break;case"leftTop":i={top:r.top+r.height/2-m*.1,left:r.left-u};break;case"leftBottom":i={top:r.top+r.height/2-m*.9,left:r.left-u};break}this.applyPlacement(i,b),this.$element.trigger("shown")}},applyPlacement:function(n,r){var u=this.tip(),m=u[0].offsetWidth,b=u[0].offsetHeight,i,c,v,d;u.offset(n).addClass(r).addClass("in"),i=u[0].offsetWidth,c=u[0].offsetHeight,r=="top"&&c!=b&&(n.top=n.top+b-c,d=!0),r=="bottom"||r=="top"?(v=0,n.left<0&&(v=n.left*-2,n.left=0,u.offset(n),i=u[0].offsetWidth,c=u[0].offsetHeight),this.replaceArrow(v-m+i,i,"left")):this.replaceArrow(c-b,c,"top"),d&&u.offset(n)},replaceArrow:function(n,r,u){this.arrow().css(u,n?50*(1-n/r)+"%":"")},setContent:function(){var n=this.tip(),r=this.getTitle();n.find(".tooltip-inner").text(r),n.removeClass("fade in top bottom left right")},hide:function(){var n=this,r=this.tip(),u=o.Event("hide");if(this.$element.trigger(u),u.isDefaultPrevented())return;r.removeClass("in");function m(){var b=setTimeout(function(){r.off(o.support.transition.end).detach()},500);r.one(o.support.transition.end,function(){clearTimeout(b),r.detach()})}return o.support.transition&&this.$tip.hasClass("fade")?m():r.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var n=this.$element;(n.attr("title")||typeof n.attr("data-original-title")!="string")&&n.attr("data-original-title",n.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var n=this.$element[0];return o.extend({},typeof n.getBoundingClientRect=="function"?n.getBoundingClientRect():{width:n.offsetWidth,height:n.offsetHeight},this.$element.offset())},getTitle:function(){var n,r=this.$element,u=this.options;return n=r.attr("data-original-title")||(typeof u.title=="function"?u.title.call(r[0]):u.title),n},tip:function(){return this.$tip=this.$tip||o(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(n){var r=n?o(n.currentTarget)[this.type](this._options).data(this.type):this;r.tip().hasClass("in")?r.hide():r.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var a=o.fn.tooltip;o.fn.tooltip=function(n){return this.each(function(){var r=o(this),u=r.data("tooltip"),m=typeof n=="object"&&n;u||r.data("tooltip",u=new w(this,m)),typeof n=="string"&&u[n]()})},o.fn.tooltip.Constructor=w,o.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},o.fn.tooltip.noConflict=function(){return o.fn.tooltip=a,this}}(window.jQuery),function(o){"use strict";var w=function(n){this.element=o(n)};w.prototype={constructor:w,show:function(){var n=this.element,r=n.closest("ul:not(.dropdown-menu)"),u=n.attr("data-target"),m,b,i;u||(u=n.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,"")),!n.parent("li").hasClass("active")&&(m=r.find(".active:last a")[0],i=o.Event("show",{relatedTarget:m}),n.trigger(i),!i.isDefaultPrevented()&&(b=o.find(u),this.activate(n.parent("li"),r),this.activate(b,b.parent(),function(){n.trigger({type:"shown",relatedTarget:m})})))},activate:function(n,r,u){var m=r.find("> .active"),b=u&&o.support.transition&&m.hasClass("fade");function i(){m.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),n.addClass("active"),b?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu")&&n.closest("li.dropdown").addClass("active"),u&&u()}b?m.one(o.support.transition.end,i):i(),m.removeClass("in")}};var a=o.fn.tab;o.fn.tab=function(n){return this.each(function(){var r=o(this),u=r.data("tab");u||r.data("tab",u=new w(this)),typeof n=="string"&&u[n]()})},o.fn.tab.Constructor=w,o.fn.tab.noConflict=function(){return o.fn.tab=a,this},o(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(n){n.preventDefault(),o(this).tab("show")})}(window.jQuery),function(o){"use strict";var w=function(n,r){this.$element=o(n),this.options=o.extend({},o.fn.typeahead.defaults,r),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=o(this.options.menu),this.shown=!1,this.listen()};w.prototype={constructor:w,select:function(){var n=this.$menu.find(".active").attr("data-value")||this.$element.val();return this.$element.val(this.updater(n)).change(),this.hide()},updater:function(n){return n},show:function(){var n=o.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:n.top+n.height,left:n.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(n){var r;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(r=o.isFunction(this.source)?this.source(this.query,o.proxy(this.process,this)):this.source,r?this.process(r):this)},process:function(n){var r=this;return n=o.grep(n,function(u){return r.matcher(u)}),n=this.sorter(n),n.length?this.render(n.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(n){return~n.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(n){for(var r=[],u=[],m=[],b;b=n.shift();)b.toLowerCase().indexOf(this.query.toLowerCase())?~b.indexOf(this.query)?u.push(b):m.push(b):r.push(b);return r.concat(u,m)},highlighter:function(n){var r=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return r?n.replace(new RegExp("("+r+")","ig"),function(u,m){return"<strong>"+m+"</strong>"}):n},render:function(n){var r=this;return n=o(n).map(function(u,m){return u=o(r.options.item).attr("data-value",m),u.find("a").html(r.highlighter(m)),u[0]}),this.$menu.html(n),this},next:function(n){var r=this.$menu.find(".active").removeClass("active"),u=r.next();u.length||(u=o(this.$menu.find("li")[0])),u.addClass("active")},prev:function(n){var r=this.$menu.find(".active").removeClass("active"),u=r.prev();u.length||(u=this.$menu.find("li").last()),u.addClass("active")},listen:function(){this.$element.on("focus",o.proxy(this.focus,this)).on("blur",o.proxy(this.blur,this)).on("keypress",o.proxy(this.keypress,this)).on("keyup",o.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",o.proxy(this.keydown,this)),this.$menu.on("click",o.proxy(this.click,this)).on("mouseenter","li",o.proxy(this.mouseenter,this)).on("mouseleave","li",o.proxy(this.mouseleave,this))},destroy:function(){this.$element.off().removeData("typeahead"),this.$menu.off()},eventSupported:function(n){var r=n in this.$element;return r||(this.$element.setAttribute(n,"return;"),r=typeof this.$element[n]=="function"),r},move:function(n){if(this.shown&&!(n.shiftKey&&n.keyCode===40)){switch(n.keyCode){case 9:case 13:case 27:n.preventDefault();break;case 38:n.preventDefault(),this.prev();break;case 40:n.preventDefault(),this.next();break}n.stopPropagation()}},keydown:function(n){this.suppressKeyPressRepeat=~o.inArray(n.keyCode,[40,38,9,13,27,57]),this.move(n)},keypress:function(n){this.suppressKeyPressRepeat||this.move(n)},keyup:function(n){switch(n.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}n.keyCode===13&&typeof this.$menu.find(".active").attr("data-value")>"u"?this.$element.submit():(n.stopPropagation(),n.preventDefault())},focus:function(n){this.focused=!0},blur:function(n){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(n){n.stopPropagation(),n.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(n){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),o(n.currentTarget).addClass("active")},mouseleave:function(n){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var a=o.fn.typeahead;o.fn.typeahead=function(n){return this.each(function(){var r=o(this),u=r.data("typeahead"),m=typeof n=="object"&&n;u||r.data("typeahead",u=new w(this,m)),typeof n=="string"&&u[n]()})},o.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},o.fn.typeahead.Constructor=w,o.fn.typeahead.noConflict=function(){return o.fn.typeahead=a,this},o(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(n){var r=o(this);r.data("typeahead")||r.typeahead(r.data())})}(window.jQuery),function(o){"use strict";var w=function(n,r){this.options=o.extend({},o.fn.affix.defaults,r),this.$window=o(window).on("scroll.affix.data-api",o.proxy(this.checkPosition,this)).on("click.affix.data-api",o.proxy(function(){setTimeout(o.proxy(this.checkPosition,this),1)},this)),this.$element=o(n),this.checkPosition()};w.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=o(document).height(),r=this.$window.scrollTop(),u=this.$element.offset(),m=this.options.offset,b=m.bottom,i=m.top,c="affix affix-top affix-bottom",v;typeof m!="object"&&(b=i=m),typeof i=="function"&&(i=m.top()),typeof b=="function"&&(b=m.bottom()),v=this.unpin!=null&&r+this.unpin<=u.top?!1:b!=null&&u.top+this.$element.height()>=n-b?"bottom":i!=null&&r<=i?"top":!1,this.affixed!==v&&(this.affixed=v,this.unpin=v=="bottom"?u.top-r:null,this.$element.removeClass(c).addClass("affix"+(v?"-"+v:"")))}};var a=o.fn.affix;o.fn.affix=function(n){return this.each(function(){var r=o(this),u=r.data("affix"),m=typeof n=="object"&&n;u||r.data("affix",u=new w(this,m)),typeof n=="string"&&u[n]()})},o.fn.affix.Constructor=w,o.fn.affix.defaults={offset:0},o.fn.affix.noConflict=function(){return o.fn.affix=a,this},o(window).on("load",function(){o('[data-spy="affix"]').each(function(){var n=o(this),r=n.data();r.offset=r.offset||{},r.offsetBottom&&(r.offset.bottom=r.offsetBottom),r.offsetTop&&(r.offset.top=r.offsetTop),n.affix(r)})})}(window.jQuery)},1460:()=>{(function(o){"use strict";var w={tagClass:function(i){return"label label-info"},itemValue:function(i){return i&&i.toString()},itemText:function(i){return this.itemValue(i)},freeInput:!0,maxTags:void 0,confirmKeys:[13],onTagExists:function(i,c){c.hide().fadeIn()}};function a(i,c){this.itemsArray=[],this.$element=o(i),this.$element.hide(),this.widthClass=c.widthClass||"width-9",this.isSelect=i.tagName==="SELECT",this.multiple=this.isSelect&&i.hasAttribute("multiple"),this.objectItems=c&&c.itemValue,this.placeholderText=i.hasAttribute("placeholder")?this.$element.attr("placeholder"):"",this.$container=o('<div class="bootstrap-tagsinput"></div>'),this.$input=o('<input class="gf-form-input '+this.widthClass+'" type="text" placeholder="'+this.placeholderText+'"/>').appendTo(this.$container),this.$element.after(this.$container),this.build(c)}a.prototype={constructor:a,add:function(i,c){var v=this;if(!(v.options.maxTags&&v.itemsArray.length>=v.options.maxTags)&&!(i!==!1&&!i)){if(typeof i=="object"&&!v.objectItems)throw"Can't add objects when itemValue option is not set";if(!i.toString().match(/^\s*$/)){if(v.isSelect&&!v.multiple&&v.itemsArray.length>0&&v.remove(v.itemsArray[0]),typeof i=="string"&&this.$element[0].tagName==="INPUT"){var d=i.split(",");if(d.length>1){for(var f=0;f<d.length;f++)this.add(d[f],!0);c||v.pushVal();return}}var y=v.options.itemValue(i),F=v.options.itemText(i),G=v.options.tagClass(i),W=o.grep(v.itemsArray,function(E){return v.options.itemValue(E)===y})[0];if(W){if(v.options.onTagExists){var J=o(".tag",v.$container).filter(function(){return o(this).data("item")===W});v.options.onTagExists(i,J)}return}v.itemsArray.push(i);var U=o('<span class="tag '+m(G)+'">'+m(F)+'<span data-role="remove"></span></span>');if(U.data("item",i),v.findInputWrapper().before(U),U.after(" "),v.isSelect&&!o('option[value="'+escape(y)+'"]',v.$element)[0]){var H=o("<option selected>"+m(F)+"</option>");H.data("item",i),H.attr("value",y),v.$element.append(H)}c||v.pushVal(),v.options.maxTags===v.itemsArray.length&&v.$container.addClass("bootstrap-tagsinput-max"),v.$element.trigger(o.Event("itemAdded",{item:i}))}}},remove:function(i,c){var v=this;v.objectItems&&(typeof i=="object"?i=o.grep(v.itemsArray,function(d){return v.options.itemValue(d)==v.options.itemValue(i)})[0]:i=o.grep(v.itemsArray,function(d){return v.options.itemValue(d)==i})[0]),i&&(o(".tag",v.$container).filter(function(){return o(this).data("item")===i}).remove(),o("option",v.$element).filter(function(){return o(this).data("item")===i}).remove(),v.itemsArray.splice(o.inArray(i,v.itemsArray),1)),c||v.pushVal(),v.options.maxTags>v.itemsArray.length&&v.$container.removeClass("bootstrap-tagsinput-max"),v.$element.trigger(o.Event("itemRemoved",{item:i}))},removeAll:function(){var i=this;for(o(".tag",i.$container).remove(),o("option",i.$element).remove();i.itemsArray.length>0;)i.itemsArray.pop();i.pushVal(),i.options.maxTags&&!this.isEnabled()&&this.enable()},refresh:function(){var i=this;o(".tag",i.$container).each(function(){var c=o(this),v=c.data("item"),d=i.options.itemValue(v),f=i.options.itemText(v),y=i.options.tagClass(v);if(c.attr("class",null),c.addClass("tag "+m(y)),c.contents().filter(function(){return this.nodeType==3})[0].nodeValue=m(f),i.isSelect){var F=o("option",i.$element).filter(function(){return o(this).data("item")===v});F.attr("value",d)}})},items:function(){return this.itemsArray},pushVal:function(){var i=this,c=o.map(i.items(),function(v){return i.options.itemValue(v).toString()});i.$element.val(c,!0).trigger("change")},build:function(i){var c=this;c.options=o.extend({},w,i);var v=c.options.typeahead||{};c.objectItems&&(c.options.freeInput=!1),n(c.options,"itemValue"),n(c.options,"itemText"),n(c.options,"tagClass"),c.options.source&&(v.source=c.options.source),v.source&&o.fn.typeahead&&(r(v,"source"),c.$input.typeahead({source:function(d,f){function y(W){for(var J=[],U=0;U<W.length;U++){var H=c.options.itemText(W[U]);F[H]=W[U],J.push(H)}f(J)}this.map={};var F=this.map,G=v.source(d);o.isFunction(G.success)?G.success(y):o.when(G).then(y)},updater:function(d){c.add(this.map[d])},matcher:function(d){return d.toLowerCase().indexOf(this.query.trim().toLowerCase())!==-1},sorter:function(d){return d.sort()},highlighter:function(d){var f=new RegExp("("+this.query+")","gi");return d.replace(f,"<strong>$1</strong>")}})),c.$container.on("click",o.proxy(function(d){c.$input.focus()},c)),c.$container.on("blur","input",o.proxy(function(d){var f=o(d.target);c.add(f.val()),f.val(""),d.preventDefault()},c)),c.$container.on("keydown","input",o.proxy(function(d){var f=o(d.target),y=c.findInputWrapper();switch(d.which){case 8:if(b(f[0])===0){var F=y.prev();F&&c.remove(F.data("item"))}break;case 46:if(b(f[0])===0){var G=y.next();G&&c.remove(G.data("item"))}break;case 37:var W=y.prev();f.val().length===0&&W[0]&&(W.before(y),f.focus());break;case 39:var J=y.next();f.val().length===0&&J[0]&&(J.after(y),f.focus());break;default:c.options.freeInput&&o.inArray(d.which,c.options.confirmKeys)>=0&&(c.add(f.val()),f.val(""),d.preventDefault())}f.attr("size",Math.max(this.inputSize,f.val().length))},c)),c.$container.on("click","[data-role=remove]",o.proxy(function(d){c.remove(o(d.target).closest(".tag").data("item")),d.stopPropagation()},c)),c.options.itemValue===w.itemValue&&(c.$element[0].tagName==="INPUT"?c.add(c.$element.val()):o("option",c.$element).each(function(){c.add(o(this).attr("value"),!0)}))},destroy:function(){var i=this;i.$container.off("keypress","input"),i.$container.off("click","[role=remove]"),i.$container.remove(),i.$element.removeData("tagsinput"),i.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){for(var i=this.$input[0],c=this.$container[0];i&&i.parentNode!==c;)i=i.parentNode;return o(i)}},o.fn.tagsinput=function(i,c){var v=[];return this.each(function(){var d=o(this).data("tagsinput");if(!d)d=new a(this,i),o(this).data("tagsinput",d),v.push(d),this.tagName==="SELECT"&&o("option",o(this)).attr("selected","selected"),o(this).val(o(this).val());else{var f=d[i](c);f!==void 0&&v.push(f)}}),typeof i=="string"?v.length>1?v:v[0]:v},o.fn.tagsinput.Constructor=a;function n(i,c){if(typeof i[c]!="function"){var v=i[c];i[c]=function(d){return d[v]}}}function r(i,c){if(typeof i[c]!="function"){var v=i[c];i[c]=function(){return v}}}var u=o("<div />");function m(i){return i?u.text(i).html():""}function b(i){var c=0;if(document.selection){i.focus();var v=document.selection.createRange();v.moveStart("character",-i.value.length),c=v.text.length}else(i.selectionStart||i.selectionStart=="0")&&(c=i.selectionStart);return c}o(function(){o("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput()})})(window.jQuery)},26139:()=>{(function(){"use strict";/** * Bindonce - Zero watches binding for AngularJs * @version v0.3.1 * @link https://github.com/Pasvaz/bindonce * @author Pasquale Vazzana <pasqualevazzana@gmail.com> * @license MIT License, http://www.opensource.org/licenses/MIT */var o=angular.module("pasvaz.bindonce",[]);o.directive("bindonce",function(){var w=function(r){if(r&&r.length!==0){var u=angular.lowercase(""+r);r=!(u==="f"||u==="0"||u==="false"||u==="no"||u==="n"||u==="[]")}else r=!1;return r},a=parseInt((/msie (\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10);isNaN(a)&&(a=parseInt((/trident\/.*; rv:(\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10));var n={restrict:"AM",controller:["$scope","$element","$attrs","$interpolate",function(r,u,m,b){var i=function(d,f,y){var F=f==="show"?"":"none",G=f==="hide"?"":"none";d.css("display",w(y)?F:G)},c=function(d,f){if(angular.isObject(f)&&!angular.isArray(f)){var y=[];angular.forEach(f,function(F,G){F&&y.push(G)}),f=y}f&&d.addClass(angular.isArray(f)?f.join(" "):f)},v={watcherRemover:void 0,binders:[],group:m.boName,element:u,ran:!1,addBinder:function(d){this.binders.push(d),this.ran&&this.runBinders()},setupWatcher:function(d){var f=this;this.watcherRemover=r.$watch(d,function(y){y!==void 0&&(f.removeWatcher(),f.runBinders())},!0)},removeWatcher:function(){this.watcherRemover!==void 0&&(this.watcherRemover(),this.watcherRemover=void 0)},runBinders:function(){for(;this.binders.length>0;){var d=this.binders.shift();if(!(this.group&&this.group!=d.group)){var f=d.scope.$eval(d.interpolate?b(d.value):d.value);switch(d.attr){case"boIf":w(f)&&d.transclude(d.scope.$new(),function(W){var J=d.element.parent(),U=d.element&&d.element[d.element.length-1],H=J&&J[0]||U&&U.parentNode,E=U&&U.nextSibling||null;angular.forEach(W,function(rt){H.insertBefore(rt,E)})});break;case"boSwitch":var y,F=d.controller[0];(y=F.cases["!"+f]||F.cases["?"])&&(d.scope.$eval(d.attrs.change),angular.forEach(y,function(W){W.transclude(d.scope.$new(),function(J){var U=W.element.parent(),H=W.element&&W.element[W.element.length-1],E=U&&U[0]||H&&H.parentNode,rt=H&&H.nextSibling||null;angular.forEach(J,function(pt){E.insertBefore(pt,rt)})})}));break;case"boSwitchWhen":var G=d.controller[0];G.cases["!"+d.attrs.boSwitchWhen]=G.cases["!"+d.attrs.boSwitchWhen]||[],G.cases["!"+d.attrs.boSwitchWhen].push({transclude:d.transclude,element:d.element});break;case"boSwitchDefault":var G=d.controller[0];G.cases["?"]=G.cases["?"]||[],G.cases["?"].push({transclude:d.transclude,element:d.element});break;case"hide":case"show":i(d.element,d.attr,f);break;case"class":c(d.element,f);break;case"text":d.element.text(f);break;case"html":d.element.html(f);break;case"style":d.element.css(f);break;case"src":d.element.attr(d.attr,f),a&&d.element.prop("src",f);break;case"attr":angular.forEach(d.attrs,function(W,J){var U,H;J.match(/^boAttr./)&&d.attrs[J]&&(U=J.replace(/^boAttr/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),H=d.scope.$eval(d.attrs[J]),d.element.attr(U,H))});break;case"href":case"alt":case"title":case"id":case"value":d.element.attr(d.attr,f);break}}}this.ran=!0}};return v}],link:function(r,u,m,b){var i=m.bindonce?r.$eval(m.bindonce):!0;i!==void 0?b.runBinders():(b.setupWatcher(m.bindonce),u.bind("$destroy",b.removeWatcher))}};return n}),angular.forEach([{directiveName:"boShow",attribute:"show"},{directiveName:"boHide",attribute:"hide"},{directiveName:"boClass",attribute:"class"},{directiveName:"boText",attribute:"text"},{directiveName:"boBind",attribute:"text"},{directiveName:"boHtml",attribute:"html"},{directiveName:"boSrcI",attribute:"src",interpolate:!0},{directiveName:"boSrc",attribute:"src"},{directiveName:"boHrefI",attribute:"href",interpolate:!0},{directiveName:"boHref",attribute:"href"},{directiveName:"boAlt",attribute:"alt"},{directiveName:"boTitle",attribute:"title"},{directiveName:"boId",attribute:"id"},{directiveName:"boStyle",attribute:"style"},{directiveName:"boValue",attribute:"value"},{directiveName:"boAttr",attribute:"attr"},{directiveName:"boIf",transclude:"element",terminal:!0,priority:1e3},{directiveName:"boSwitch",require:"boSwitch",controller:function(){this.cases={}}},{directiveName:"boSwitchWhen",transclude:"element",priority:800,require:"^boSwitch"},{directiveName:"boSwitchDefault",transclude:"element",priority:800,require:"^boSwitch"}],function(w){var a=200;return o.directive(w.directiveName,function(){var n={priority:w.priority||a,transclude:w.transclude||!1,terminal:w.terminal||!1,require:["^bindonce"].concat(w.require||[]),controller:w.controller,compile:function(r,u,m){return function(b,i,c,v){var d=v[0],f=c.boParent;if(f&&d.group!==f){var y=d.element.parent();d=void 0;for(var F;y[0].nodeType!==9&&y.length;){if((F=y.data("$bindonceController"))&&F.group===f){d=F;break}y=y.parent()}if(!d)throw new Error("No bindonce controller: "+f)}d.addBinder({element:i,attr:w.attribute||w.directiveName,attrs:c,value:c[w.directiveName],interpolate:w.interpolate,group:f,transclude:m,controller:v.slice(1),scope:b})}}};return n})})})()},96370:()=>{/** * @license AngularJS v1.8.3 * (c) 2010-2020 Google LLC. http://angularjs.org * License: MIT */(function(o,w){"use strict";function a(W,J){if(r(W)){J=J||[];for(var U=0,H=W.length;U<H;U++)J[U]=W[U]}else if(u(W)){J=J||{};for(var E in W)E.charAt(0)==="$"&&E.charAt(1)==="$"||(J[E]=W[E])}return J||W}function n(W,J){var U=[],H=W.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(E,rt,pt,K){var ot=K==="?"||K==="*?",lt=K==="*"||K==="*?";return U.push({name:pt,optional:ot}),rt=rt||"",(ot?"(?:"+rt:rt+"(?:")+(lt?"(.+?)":"([^/]+)")+(ot?"?)?":")")}).replace(/([/$*])/g,"\\$1");return J.ignoreTrailingSlashes&&(H=H.replace(/\/+$/,"")+"/*"),{keys:U,regexp:new RegExp("^"+H+"(?:[?#]|$)",J.caseInsensitiveMatch?"i":"")}}var r,u,m,b,i=w.module("ngRoute",[]).info({angularVersion:"1.8.3"}).provider("$route",d).run(f),c=w.$$minErr("ngRoute"),v;function d(){r=w.isArray,u=w.isObject,m=w.isDefined,b=w.noop;function W(U,H){return w.extend(Object.create(U),H)}var J={};this.when=function(U,H){var E=a(H);if(w.isUndefined(E.reloadOnUrl)&&(E.reloadOnUrl=!0),w.isUndefined(E.reloadOnSearch)&&(E.reloadOnSearch=!0),w.isUndefined(E.caseInsensitiveMatch)&&(E.caseInsensitiveMatch=this.caseInsensitiveMatch),J[U]=w.extend(E,{originalPath:U},U&&n(U,E)),U){var rt=U[U.length-1]==="/"?U.substr(0,U.length-1):U+"/";J[rt]=w.extend({originalPath:U,redirectTo:U},n(rt,E))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(U){return typeof U=="string"&&(U={redirectTo:U}),this.when(null,U),this},v=!0,this.eagerInstantiationEnabled=function(H){return m(H)?(v=H,this):v},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(U,H,E,rt,pt,K,ot,lt){var S=!1,st,et,ut={routes:J,reload:function(){S=!0;var N={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,S=!1}};U.$evalAsync(function(){nt(N),N.defaultPrevented||_()})},updateParams:function(N){if(this.current&&this.current.$$route)N=w.extend({},this.current.params,N),H.path(xt(this.current.$$route.originalPath,N)),H.search(N);else throw c("norout","Tried updating route with no current route")}};return U.$on("$locationChangeStart",nt),U.$on("$locationChangeSuccess",_),ut;function A(N,B){var D=B.keys,V={};if(!B.regexp)return null;var Z=B.regexp.exec(N);if(!Z)return null;for(var tt=1,Y=Z.length;tt<Y;++tt){var ft=D[tt-1],O=Z[tt];ft&&O&&(V[ft.name]=O)}return V}function nt(N){var B=ut.current;st=bt(),et=Ct(st,B),!et&&(B||st)&&U.$broadcast("$routeChangeStart",st,B).defaultPrevented&&N&&N.preventDefault()}function _(){var N=ut.current,B=st;if(et)N.params=B.params,w.copy(N.params,E),U.$broadcast("$routeUpdate",N);else if(B||N){S=!1,ut.current=B;var D=rt.resolve(B);lt.$$incOutstandingRequestCount("$route"),D.then(z).then(Q).then(function(V){return V&&D.then(mt).then(function(Z){B===ut.current&&(B&&(B.locals=Z,w.copy(B.params,E)),U.$broadcast("$routeChangeSuccess",B,N))})}).catch(function(V){B===ut.current&&U.$broadcast("$routeChangeError",B,N,V)}).finally(function(){lt.$$completeOutstandingRequest(b,"$route")})}}function z(N){var B={route:N,hasRedirection:!1};if(N){if(N.redirectTo)if(w.isString(N.redirectTo))B.path=xt(N.redirectTo,N.params),B.search=N.params,B.hasRedirection=!0;else{var D=H.path(),V=H.search(),Z=N.redirectTo(N.pathParams,D,V);w.isDefined(Z)&&(B.url=Z,B.hasRedirection=!0)}else if(N.resolveRedirectTo)return rt.resolve(pt.invoke(N.resolveRedirectTo)).then(function(tt){return w.isDefined(tt)&&(B.url=tt,B.hasRedirection=!0),B})}return B}function Q(N){var B=!0;if(N.route!==ut.current)B=!1;else if(N.hasRedirection){var D=H.url(),V=N.url;V?H.url(V).replace():V=H.path(N.path).search(N.search).replace().url(),V!==D&&(B=!1)}return B}function mt(N){if(N){var B=w.extend({},N.resolve);w.forEach(B,function(V,Z){B[Z]=w.isString(V)?pt.get(V):pt.invoke(V,null,null,Z)});var D=dt(N);return w.isDefined(D)&&(B.$template=D),rt.all(B)}}function dt(N){var B,D;return w.isDefined(B=N.template)?w.isFunction(B)&&(B=B(N.params)):w.isDefined(D=N.templateUrl)&&(w.isFunction(D)&&(D=D(N.params)),w.isDefined(D)&&(N.loadedTemplateUrl=ot.valueOf(D),B=K(D))),B}function bt(){var N,B;return w.forEach(J,function(D,V){!B&&(N=A(H.path(),D))&&(B=W(D,{params:w.extend({},H.search(),N),pathParams:N}),B.$$route=D)}),B||J[null]&&W(J[null],{params:{},pathParams:{}})}function Ct(N,B){return!S&&N&&B&&N.$$route===B.$$route&&(!N.reloadOnUrl||!N.reloadOnSearch&&w.equals(N.pathParams,B.pathParams))}function xt(N,B){var D=[];return w.forEach((N||"").split(":"),function(V,Z){if(Z===0)D.push(V);else{var tt=V.match(/(\w+)(?:[?*])?(.*)/),Y=tt[1];D.push(B[Y]),D.push(tt[2]||""),delete B[Y]}}),D.join("")}}]}f.$inject=["$injector"];function f(W){v&&W.get("$route")}i.provider("$routeParams",y);function y(){this.$get=function(){return{}}}i.directive("ngView",F),i.directive("ngView",G),F.$inject=["$route","$anchorScroll","$animate"];function F(W,J,U){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(H,E,rt,pt,K){var ot,lt,S,st=rt.autoscroll,et=rt.onload||"";H.$on("$routeChangeSuccess",A),A();function ut(){S&&(U.cancel(S),S=null),ot&&(ot.$destroy(),ot=null),lt&&(S=U.leave(lt),S.done(function(nt){nt!==!1&&(S=null)}),lt=null)}function A(){var nt=W.current&&W.current.locals,_=nt&&nt.$template;if(w.isDefined(_)){var z=H.$new(),Q=W.current,mt=K(z,function(dt){U.enter(dt,null,lt||E).done(function(Ct){Ct!==!1&&w.isDefined(st)&&(!st||H.$eval(st))&&J()}),ut()});lt=mt,ot=Q.scope=z,ot.$emit("$viewContentLoaded"),ot.$eval(et)}else ut()}}}}G.$inject=["$compile","$controller","$route"];function G(W,J,U){return{restrict:"ECA",priority:-400,link:function(H,E){var rt=U.current,pt=rt.locals;E.html(pt.$template);var K=W(E.contents());if(rt.controller){pt.$scope=H;var ot=J(rt.controller,pt);rt.controllerAs&&(H[rt.controllerAs]=ot),E.data("$ngControllerController",ot),E.children().data("$ngControllerController",ot)}H[rt.resolveAs||"$resolve"]=pt,K(H)}}}})(window,window.angular)},3469:(o,w,a)=>{a(96370),o.exports="ngRoute"},3754:()=>{/** * @license AngularJS v1.8.3 * (c) 2010-2020 Google LLC. http://angularjs.org * License: MIT */(function(o,w){"use strict";var a=w.$$minErr("$sanitize"),n,r,u,m,b,i,c,v,d,f;function y(){var G=!1,W=!1;this.$get=["$$sanitizeUri",function(D){return G=!0,W&&r(st,lt),function(V){var Z=[];return d(V,f(Z,function(tt,Y){return!/^unsafe:/.test(D(tt,Y))})),Z.join("")}}],this.enableSvg=function(D){return b(D)?(W=D,this):W},this.addValidElements=function(D){return G||(m(D)&&(D={htmlElements:D}),Q(lt,D.svgElements),Q(H,D.htmlVoidElements),Q(st,D.htmlVoidElements),Q(st,D.htmlElements)),this},this.addValidAttrs=function(D){return G||r(nt,z(D,!0)),this},n=w.bind,r=w.extend,u=w.forEach,m=w.isArray,b=w.isDefined,i=w.$$lowercase,c=w.noop,d=dt,f=xt,v=o.Node.prototype.contains||function(D){return!!(this.compareDocumentPosition(D)&16)};var J=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,U=/([^#-~ |!])/g,H=_("area,br,col,hr,img,wbr"),E=_("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rt=_("rp,rt"),pt=r({},rt,E),K=r({},E,_("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),ot=r({},rt,_("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),lt=_("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),S=_("script,style"),st=r({},H,K,ot,pt),et=_("background,cite,href,longdesc,src,xlink:href,xml:base"),ut=_("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),A=_("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),nt=r({},et,A,ut);function _(D,V){return z(D.split(","),V)}function z(D,V){var Z={},tt;for(tt=0;tt<D.length;tt++)Z[V?i(D[tt]):D[tt]]=!0;return Z}function Q(D,V){V&&V.length&&r(D,z(V))}var mt=function(D,V){if(Y())return ft;if(!V||!V.implementation)throw a("noinert","Can't create an inert html document");var Z=V.implementation.createHTMLDocument("inert"),tt=(Z.documentElement||Z.getDocumentElement()).querySelector("body");return O;function Y(){try{return!!ft("")}catch{return!1}}function ft(at){at="<remove></remove>"+at;try{var M=new D.DOMParser().parseFromString(at,"text/html").body;return M.firstChild.remove(),M}catch{return}}function O(at){return tt.innerHTML=at,V.documentMode&&N(tt),tt}}(o,o.document);function dt(D,V){D==null?D="":typeof D!="string"&&(D=""+D);var Z=mt(D);if(!Z)return"";var tt=5;do{if(tt===0)throw a("uinput","Failed to sanitize html because the input is unstable");tt--,D=Z.innerHTML,Z=mt(D)}while(D!==Z.innerHTML);for(var Y=Z.firstChild;Y;){switch(Y.nodeType){case 1:V.start(Y.nodeName.toLowerCase(),bt(Y.attributes));break;case 3:V.chars(Y.textContent);break}var ft;if(!(ft=Y.firstChild)&&(Y.nodeType===1&&V.end(Y.nodeName.toLowerCase()),ft=B("nextSibling",Y),!ft))for(;ft==null&&(Y=B("parentNode",Y),Y!==Z);)ft=B("nextSibling",Y),Y.nodeType===1&&V.end(Y.nodeName.toLowerCase());Y=ft}for(;Y=Z.firstChild;)Z.removeChild(Y)}function bt(D){for(var V={},Z=0,tt=D.length;Z<tt;Z++){var Y=D[Z];V[Y.name]=Y.value}return V}function Ct(D){return D.replace(/&/g,"&").replace(J,function(V){var Z=V.charCodeAt(0),tt=V.charCodeAt(1);return"&#"+((Z-55296)*1024+(tt-56320)+65536)+";"}).replace(U,function(V){return"&#"+V.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function xt(D,V){var Z=!1,tt=n(D,D.push);return{start:function(Y,ft){Y=i(Y),!Z&&S[Y]&&(Z=Y),!Z&&st[Y]===!0&&(tt("<"),tt(Y),u(ft,function(O,at){var M=i(at),Tt=Y==="img"&&M==="src"||M==="background";nt[M]===!0&&(et[M]!==!0||V(O,Tt))&&(tt(" "),tt(at),tt('="'),tt(Ct(O)),tt('"'))}),tt(">"))},end:function(Y){Y=i(Y),!Z&&st[Y]===!0&&H[Y]!==!0&&(tt("</"),tt(Y),tt(">")),Y==Z&&(Z=!1)},chars:function(Y){Z||tt(Ct(Y))}}}function N(D){for(;D;){if(D.nodeType===o.Node.ELEMENT_NODE)for(var V=D.attributes,Z=0,tt=V.length;Z<tt;Z++){var Y=V[Z],ft=Y.name.toLowerCase();(ft==="xmlns:ns1"||ft.lastIndexOf("ns1:",0)===0)&&(D.removeAttributeNode(Y),Z--,tt--)}var O=D.firstChild;O&&N(O),D=B("nextSibling",D)}}function B(D,V){var Z=V[D];if(Z&&v.call(V,Z))throw a("elclob","Failed to sanitize html because the element is clobbered: {0}",V.outerHTML||V.outerText);return Z}}function F(G){var W=[],J=f(W,c);return J.chars(G),W.join("")}w.module("ngSanitize",[]).provider("$sanitize",y).info({angularVersion:"1.8.3"}),w.module("ngSanitize").filter("linky",["$sanitize",function(G){var W=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,J=/^mailto:/i,U=w.$$minErr("linky"),H=w.isDefined,E=w.isFunction,rt=w.isObject,pt=w.isString;return function(K,ot,lt){if(K==null||K==="")return K;if(!pt(K))throw U("notstring","Expected string but received: {0}",K);for(var S=E(lt)?lt:rt(lt)?function(){return lt}:function(){return{}},st,et=K,ut=[],A,nt;st=et.match(W);)A=st[0],!st[2]&&!st[4]&&(A=(st[3]?"http://":"mailto:")+A),nt=st.index,_(et.substr(0,nt)),z(A,st[0].replace(J,"")),et=et.substring(nt+st[0].length);return _(et),G(ut.join(""));function _(Q){Q&&ut.push(F(Q))}function z(Q,mt){var dt,bt=S(Q);ut.push("<a ");for(dt in bt)ut.push(dt+'="'+bt[dt]+'" ');H(ot)&&!("target"in bt)&&ut.push('target="',ot,'" '),ut.push('href="',Q.replace(/"/g,"""),'">'),_(mt),ut.push("</a>")}}}])})(window,window.angular)},70070:(o,w,a)=>{a(3754),o.exports="ngSanitize"},74882:o=>{"use strict";function w(a){var n=this,r;if(this._au)return;function u(){n.root[n.origin.offset]?b():m()}function m(){r||(r=setInterval(function(){n.root[n.origin.offset]&&(b(),n.update())},300))}function b(){clearInterval(r),r=null}var i=n._debounce(function(){n.update()},300);this._observer=new a(function(){u(),n.update(),i()}),this.on("init",function(){n._observer.observe(n.root,{childList:!0,subtree:!0,characterData:!0}),u()}),this.on("dispose",function(){n._observer.disconnect(),b(),delete n._observer}),this._au=!0}o.exports=function(n){var r=n.MutationObserver||n.WebKitMutationObserver||n.MozMutationObserver||null;return function(){return r?(w.call(this,r),this):this}}},18123:(o,w,a)=>{"use strict";var n=a(33299).qs;o.exports=function(u){var m,b,i,c,v=this,d;c=u.screen||.9,u.forward&&(m=n(u.forward,this.clipper),d={element:m,handler:function(){var f=v.pos()+(u.delta||30);v.pos(f)},type:"click"},this._eventHandlers.push(d),this.event(d.element,d.type,d.handler,"on")),u.backward&&(b=n(u.backward,this.clipper),d={element:b,handler:function(){var f=v.pos()-(u.delta||30);v.pos(f)},type:"click"},this._eventHandlers.push(d),this.event(d.element,d.type,d.handler,"on")),u.track&&(u.track===!0?i=this.track:i=n(u.track,this.clipper),i&&(d={element:i,handler:function(f){if(f.target==i){var y=f["offset"+v.origin.x],F=v.bar[v.origin.offsetPos],G=0;y<F?G=-1:y>F+v.bar[v.origin.offset]&&(G=1);var W=v.pos()+G*c*v.scroller[v.origin.client];v.pos(W)}},type:"mousedown"},this._eventHandlers.push(d),this.event(d.element,d.type,d.handler,"on")))}},79931:(o,w,a)=>{"use strict";var n=function(){return this||(0,eval)("this")}(),r=n&&n.window||n,u=a(33299).B,m=a(33299).iv,b=a(33299).IH,i=a(33299).e$,c=a(33299).rm,v=a(33299).d9,d=a(33299).qs,f=K,y=["left","top","right","bottom","width","height"],F=[],G={v:{x:"Y",pos:y[1],oppos:y[3],crossPos:y[0],crossOpPos:y[2],size:y[5],crossSize:y[4],crossMinSize:"min-"+y[4],crossMaxSize:"max-"+y[4],client:"clientHeight",crossClient:"clientWidth",scrollEdge:"scrollLeft",offset:"offsetHeight",crossOffset:"offsetWidth",offsetPos:"offsetTop",scroll:"scrollTop",scrollSize:"scrollHeight"},h:{x:"X",pos:y[0],oppos:y[2],crossPos:y[1],crossOpPos:y[3],size:y[4],crossSize:y[5],crossMinSize:"min-"+y[5],crossMaxSize:"max-"+y[5],client:"clientWidth",crossClient:"clientHeight",scrollEdge:"scrollTop",offset:"offsetWidth",crossOffset:"offsetHeight",offsetPos:"offsetLeft",scroll:"scrollLeft",scrollSize:"scrollWidth"}},W=17,J=15,U=/[\s\S]*Macintosh[\s\S]*\) Gecko[\s\S]*/,H=U.test(r.navigator&&r.navigator.userAgent),E,rt,pt;function K(A){var nt=!!A,_=A&&A[0]||A,z=typeof A=="string"||_ instanceof HTMLElement,Q=z?{root:A}:v(A),mt,dt,bt={direction:"v",barOnCls:"_scrollbar",resizeDebounce:0,event:u,cssGuru:!1,impact:"scroller",position:"static"};Q=Q||{};for(var Ct in bt)Q[Ct]==null&&(Q[Ct]=bt[Ct]);mt=this&&this instanceof r.jQuery,Q._chain?dt=Q.root:mt?Q.root=dt=this[0]:dt=d(Q.root||Q.scroller);var xt=st(dt,Q.direction),N=+xt;if(Q.index=N,N==N&&xt!==null&&F[N])return F[N];Q.root&&Q.scroller?Q.scroller=d(Q.scroller,dt):Q.scroller=dt,Q.root=dt;var B=et(Q);return B.autoUpdate&&B.autoUpdate(),B}function ot(A,nt){var _=0,z=A;for((z.length===void 0||z===r)&&(z=[z]);z[_];)nt.call(this,z[_],_),_++}function lt(){return new Date().getTime()}function S(A,nt,_){A._eventHandlers=A._eventHandlers||[{element:A.scroller,handler:function(z){A.scroll(z)},type:"scroll"},{element:A.root,handler:function(){A.update()},type:"transitionend animationend"},{element:A.scroller,handler:function(){A.update()},type:"keyup"},{element:A.bar,handler:function(z){z.preventDefault(),A.selection(),A.drag.now=1,A.draggingCls&&b(A.root,A.draggingCls)},type:"touchstart mousedown"},{element:document,handler:function(){A.selection(1),A.drag.now=0,A.draggingCls&&c(A.root,A.draggingCls)},type:"mouseup blur touchend"},{element:document,handler:function(z){z.button!=2&&A._pos0(z)},type:"touchstart mousedown"},{element:document,handler:function(z){A.drag.now&&A.drag(z)},type:"mousemove touchmove"},{element:r,handler:function(){A.update()},type:"resize"},{element:A.root,handler:function(){A.update()},type:"sizeChange"},{element:A.clipper,handler:function(){A.clipperOnScroll()},type:"scroll"}],ot(A._eventHandlers,function(z){if(z.element)if(z.element.length&&z.element!==r)for(var Q=0;Q<z.element.length;Q++)nt(z.element[Q],z.type,z.handler,_);else nt(z.element,z.type,z.handler,_)})}function st(A,nt,_,z){var Q="data-baron-"+nt+"-id";return _=="on"?A.setAttribute(Q,z):_=="off"&&A.removeAttribute(Q),A.getAttribute(Q)}function et(A){var nt=new K.prototype.constructor(A);return S(nt,A.event,"on"),st(nt.root,A.direction,"on",F.length),F.push(nt),nt.update(),nt}function ut(A){if(this.events&&this.events[A])for(var nt=0;nt<this.events[A].length;nt++){var _=Array.prototype.slice.call(arguments,1);this.events[A][nt].apply(this,_)}}K.prototype={_debounce:function(A,nt){var _=this,z,Q,mt=function(){if(_._disposed){clearTimeout(z),z=_=null;return}var dt=lt()-Q;dt<nt&&dt>=0?z=setTimeout(mt,nt-dt):(z=null,A())};return function(){Q=lt(),z||(z=setTimeout(mt,nt))}},constructor:function(A){var nt,_,z,Q,mt,dt,bt;dt=lt(),this.params=A,this.event=A.event,this.events={},this.root=A.root,this.scroller=d(A.scroller),this.bar=d(A.bar,this.root),z=this.track=d(A.track,this.root),!this.track&&this.bar&&(z=this.bar.parentNode),this.clipper=this.scroller.parentNode,this.direction=A.direction,this.rtl=A.rtl,this.origin=G[this.direction],this.barOnCls=A.barOnCls,this.scrollingCls=A.scrollingCls,this.draggingCls=A.draggingCls,this.impact=A.impact,this.position=A.position,this.rtl=A.rtl,this.barTopLimit=0,this.resizeDebounce=A.resizeDebounce;function Ct(O){var at=this.barMinSize||20,M=O;M>0&&M<at&&(M=at),this.bar&&m(this.bar,this.origin.size,parseInt(M,10)+"px")}function xt(O){if(this.bar){var at=m(this.bar,this.origin.pos),M=+O+"px";M&&M!=at&&m(this.bar,this.origin.pos,M)}}function N(){return z[this.origin.client]-this.barTopLimit-this.bar[this.origin.offset]}function B(O){return O*N.call(this)+this.barTopLimit}function D(O){return(O-this.barTopLimit)/N.call(this)}this.cursor=function(O){return O["client"+this.origin.x]||(((O.originalEvent||O).touches||{})[0]||{})["page"+this.origin.x]};function V(){return!1}if(this.pos=function(O){var at="page"+this.origin.x+"Offset",M=this.scroller[at]?at:this.origin.scroll;return O!==void 0&&(this.scroller[M]=O),this.scroller[M]},this.rpos=function(O){var at=this.scroller[this.origin.scrollSize]-this.scroller[this.origin.client],M;return O?M=this.pos(O*at):M=this.pos(),M/(at||1)},this.barOn=function(O){if(this.barOnCls){var at=this.scroller[this.origin.client]>=this.scroller[this.origin.scrollSize];O||at?i(this.root,this.barOnCls)&&c(this.root,this.barOnCls):i(this.root,this.barOnCls)||b(this.root,this.barOnCls)}},this._pos0=function(O){_=this.cursor(O)-nt},this.drag=function(O){var at=D.call(this,this.cursor(O)-_),M=this.scroller[this.origin.scrollSize]-this.scroller[this.origin.client];this.scroller[this.origin.scroll]=at*M},this.selection=function(O){this.event(document,"selectpos selectstart",V,O?"off":"on")},this.resize=function(){var O=this,at=O.resizeDebounce===void 0?300:O.resizeDebounce,M=0;lt()-dt<at&&(clearTimeout(Q),M=at);function Tt(){var St=O.scroller[O.origin.crossOffset],gt=O.scroller[O.origin.crossClient],Nt=0,Mt,At;if(H?Nt=J:gt>0&&St===0&&(St=gt+W),St)if(O.barOn(),O.impact=="scroller"){var Ut=St-gt+Nt;if(O.position=="static")Mt=m(O.scroller,O.origin.crossSize),At=O.clipper[O.origin.crossClient]+Ut+"px",Mt!=At&&O._setCrossSizes(O.scroller,At);else{var Bt={},Ft=O.rtl?"Left":"Right";O.direction=="h"&&(Ft="Bottom"),Bt["padding"+Ft]=Ut+"px",m(O.scroller,Bt)}}else Mt=m(O.clipper,O.origin.crossSize),At=gt+"px",Mt!=At&&O._setCrossSizes(O.clipper,At);Array.prototype.unshift.call(arguments,"resize"),ut.apply(O,arguments),dt=lt()}M?Q=setTimeout(Tt,M):Tt()},this.updatePositions=function(O){var at,M=this;M.bar&&(at=(z[M.origin.client]-M.barTopLimit)*M.scroller[M.origin.client]/M.scroller[M.origin.scrollSize],(O||parseInt(bt,10)!=parseInt(at,10))&&(Ct.call(M,at),bt=at),nt=B.call(M,M.rpos()),xt.call(M,nt)),Array.prototype.unshift.call(arguments,"scroll"),ut.apply(M,arguments)},this.scroll=function(){var O=this;O.updatePositions(),O.scrollingCls&&(mt||b(O.root,O.scrollingCls),clearTimeout(mt),mt=setTimeout(function(){c(O.root,O.scrollingCls),mt=void 0},300))},this.clipperOnScroll=function(){this.rtl?this.clipper[this.origin.scrollEdge]=this.clipper[this.origin.scrollSize]:this.clipper[this.origin.scrollEdge]=0},this._setCrossSizes=function(O,at){var M={};M[this.origin.crossSize]=at,M[this.origin.crossMinSize]=at,M[this.origin.crossMaxSize]=at,m(O,M)},this._dumbCss=function(O){if(!A.cssGuru){var at=O?"hidden":null,M=O?"none":null;m(this.clipper,{overflow:at,msOverflowStyle:M,position:this.position=="static"?"":"relative"});var Tt=O?"scroll":null,St=this.direction=="v"?"y":"x",gt={};gt["overflow-"+St]=Tt,gt["box-sizing"]="border-box",gt.margin="0",gt.border="0",this.position=="absolute"&&(gt.position="absolute",gt.top="0",this.direction=="h"?gt.left=gt.right="0":(gt.bottom="0",gt.right=this.rtl?"0":"",gt.left=this.rtl?"":"0")),m(this.scroller,gt)}},this._dumbCss(!0),H){var Z="paddingRight",tt={},Y=r.getComputedStyle(this.scroller)[[Z]];A.direction=="h"?Z="paddingBottom":A.rtl&&(Z="paddingLeft");var ft=parseInt(Y,10);ft!=ft&&(ft=0),tt[Z]=J+ft+"px",m(this.scroller,tt)}return this},update:function(A){return ut.call(this,"upd",A),this.resize(1),this.updatePositions(1),this},dispose:function(){S(this,this.event,"off"),st(this.root,this.params.direction,"off"),this.params.direction=="v"?this._setCrossSizes(this.scroller,""):this._setCrossSizes(this.clipper,""),this._dumbCss(!1),this.barOn(!0),ut.call(this,"dispose"),F[this.params.index]=null,this.params=null,this._disposed=!0},on:function(A,nt,_){for(var z=A.split(" "),Q=0;Q<z.length;Q++)z[Q]=="init"?nt.call(this,_):(this.events[z[Q]]=this.events[z[Q]]||[],this.events[z[Q]].push(function(mt){nt.call(this,mt||_)}))},baron:function(A){return A.root=this.params.root,A.scroller=this.params.scroller,A.direction=this.params.direction=="v"?"h":"v",A._chain=!0,K(A)}},K.prototype.constructor.prototype=K.prototype,K.noConflict=function(){return r.baron=f,K},K.version="3.0.1",K.prototype.autoUpdate=a(74882)(r),K.prototype.fix=a(87085),K.prototype.controls=a(18123),o.exports=K},87085:(o,w,a)=>{"use strict";var n=a(86230),r=a(33299).iv,u=a(33299).IH,m=a(33299).rm;o.exports=function(i){var c,v,d={outside:"",inside:"",before:"",after:"",past:"",future:"",radius:0,minView:0},f=[],y=[],F=[],G=this.scroller,W=this.event,J=this;function U(K,ot,lt){var S=ot,st=lt==1?"pos":"oppos";v<(d.minView||0)&&(S=void 0),r(c[K],this.origin.pos,""),r(c[K],this.origin.oppos,""),m(c[K],d.outside),S!==void 0&&(S+="px",r(c[K],this.origin[st],S),u(c[K],d.outside))}function H(K){try{var ot=document.createEvent("WheelEvent");ot.initWebKitWheelEvent(K.originalEvent.wheelDeltaX,K.originalEvent.wheelDeltaY),G.dispatchEvent(ot),K.preventDefault()}catch{}}function E(K){var ot;for(var lt in K)d[lt]=K[lt];if(d.elements instanceof HTMLElement?c=[d.elements]:typeof d.elements=="string"?c=this.scroller.querySelectorAll(d.elements):d.elements&&d.elements[0]instanceof HTMLElement&&(c=d.elements),c){v=this.scroller[this.origin.client];for(var S=0;S<c.length;S++)ot={},ot[this.origin.size]=c[S][this.origin.offset]+"px",c[S].parentNode!==this.scroller&&r(c[S].parentNode,ot),ot={},ot[this.origin.crossSize]=c[S].parentNode[this.origin.crossClient]+"px",r(c[S],ot),v-=c[S][this.origin.offset],F[S]=c[S].parentNode[this.origin.offsetPos],f[S]=f[S-1]||0,y[S]=y[S-1]||Math.min(F[S],0),c[S-1]&&(f[S]+=c[S-1][this.origin.offset],y[S]+=c[S-1][this.origin.offset]),S==0&&F[S]==0||(this.event(c[S],"mousewheel",H,"off"),this.event(c[S],"mousewheel",H));d.limiter&&c[0]&&(this.track&&this.track!=this.scroller?(ot={},ot[this.origin.pos]=c[0].parentNode[this.origin.offset]+"px",r(this.track,ot)):this.barTopLimit=c[0].parentNode[this.origin.offset],this.scroll()),d.limiter===!1&&(this.barTopLimit=0)}var st={element:c,handler:function(){for(var ut=this.parentNode,A=ut.offsetTop,nt,_=0;_<c.length;_++)c[_]===this&&(nt=_);var z=A-f[nt];d.scroll?d.scroll({x1:J.scroller.scrollTop,x2:z}):J.scroller.scrollTop=z},type:"click"};if(d.clickable){this._eventHandlers.push(st);for(var et=0;et<st.element.length;et++)W(st.element[et],st.type,st.handler,"on")}}this.on("init",E,i);var rt=[],pt=[];return this.on("init scroll",function(){var K,ot,lt,S;if(c){var st;for(S=0;S<c.length;S++)K=0,F[S]-this.pos()<y[S]+d.radius?(K=1,ot=f[S]):F[S]-this.pos()>y[S]+v-d.radius?(K=2,ot=this.scroller[this.origin.client]-c[S][this.origin.offset]-f[S]-v):(K=3,ot=void 0),lt=!1,(F[S]-this.pos()<y[S]||F[S]-this.pos()>y[S]+v)&&(lt=!0),(K!=rt[S]||lt!=pt[S])&&(U.call(this,S,ot,K),rt[S]=K,pt[S]=lt,st=!0);if(st)for(S=0;S<c.length;S++)rt[S]==1&&d.past&&(u(c[S],d.past),m(c[S],d.future)),rt[S]==2&&d.future&&(u(c[S],d.future),m(c[S],d.past)),rt[S]==3&&(m(c[S],d.past),m(c[S],d.future),u(c[S],d.inside)),rt[S]!=rt[S+1]&&rt[S]==1?(u(c[S],d.before),m(c[S],d.after)):rt[S]!=rt[S-1]&&rt[S]==2?(u(c[S],d.after),m(c[S],d.before)):(m(c[S],d.before),m(c[S],d.after)),d.grad&&(pt[S]?u(c[S],d.grad):m(c[S],d.grad))}}),this.on("resize upd",function(K){E.call(this,K&&K.fix)}),this}},86230:o=>{o.exports=function(a,n,r){var u=console[a]||console.log,m=["Baron: "+n,r];Function.prototype.apply.call(u,console,m)}},33299:o=>{"use strict";var w,a=!1;try{var n=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,n)}catch{}o.exports.B=function(m,b,i,c){var v=b.split(" "),d=c=="on"?"add":"remove";v.forEach(function(f){var y=!1;["scroll","touchstart","touchmove"].indexOf(f)!=-1&&a&&(y={passive:!0}),m[d+"EventListener"](f,i,y)})};function r(u,m){for(var b in u)u.hasOwnProperty(b)&&m(b,u[b])}o.exports.iv=function(m,b,i){var c;if(i===void 0){if(typeof b=="string")return m.style[b];c=b}else c={},c[b]=i;r(c,function(v,d){m.style[v]=d})},o.exports.IH=function(m,b){b&&m.classList.add(b)},o.exports.rm=function(m,b){b&&m.classList.remove(b)},o.exports.e$=function(m,b){return b?m.classList.contains(b):!1},o.exports.d9=function(m){var b={},i=m||{};return r(i,function(c,v){b[c]=v}),b},o.exports.qs=function(m,b){if(m instanceof HTMLElement)return m;var i=b||document;return i.querySelector(m)},w=r}}]); //# sourceMappingURL=3633.acef4a1394f4c10cf087.js.map