1234567 |
- /*! For license information please see 8981.8c75d193e1386fe82cfd.js.LICENSE.txt */
- (self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[8981],{63773:(e,t,n)=>{"use strict";n.d(t,{O:()=>s});var i=n(43215),o=n(90923);const r={http:80,https:443,ftp:21};class s{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(e,t){let n=this;return function(){return(0,i.deprecationWarning)("$location",e.name,t||"locationService"),e.apply(n,arguments)}}absUrl(){return`${window.location.origin}${this.url()}`}hash(e){if((0,o.navigationLogger)("AngularLocationWrapper",!1,"Angular compat layer: hash"),e)throw new Error("AngularLocationWrapper method not implemented.");return o.locationService.getLocation().hash.slice(1)}host(){return new URL(window.location.href).hostname}path(e){(0,o.navigationLogger)("AngularLocationWrapper",!1,"Angular compat layer: path");const t=o.locationService.getLocation();if(null!=e){let n=String(e);n=n.startsWith("/")?n:`/${n}`;const i=new URL(`${window.location.origin}${n}`);return o.locationService.push({pathname:i.pathname,search:i.search.length>0?i.search:t.search,hash:i.hash.length>0?i.hash:t.hash}),this}return null===e?(o.locationService.push("/"),this):t.pathname}port(){const e=new URL(window.location.href);return parseInt(e.port,10)||r[e.protocol]||null}protocol(){return new URL(window.location.href).protocol.slice(0,-1)}replace(){throw new Error("AngularLocationWrapper method not implemented.")}search(e,t){if((0,o.navigationLogger)("AngularLocationWrapper",!1,"Angular compat layer: search"),!e)return o.locationService.getSearchObject();if(e&&arguments.length>1)return o.locationService.partial({[e]:t}),this;if(e){let t;t="object"==typeof e?Object.assign({},e):(0,o.locationSearchToObject)(e);for(const e of Object.keys(t))null!==t[e]&&void 0!==t[e]||delete t[e];const n=i.urlUtil.renderUrl(o.locationService.getLocation().pathname,t);o.locationService.push(n)}return this}state(e){throw(0,o.navigationLogger)("AngularLocationWrapper",!1,"Angular compat layer: state"),new Error("AngularLocationWrapper method not implemented.")}url(e){if((0,o.navigationLogger)("AngularLocationWrapper",!1,"Angular compat layer: url"),void 0!==e)return e.startsWith("#")?o.locationService.push(Object.assign({},o.locationService.getLocation(),{hash:e})):e.startsWith("?")?o.locationService.push(Object.assign({},o.locationService.getLocation(),{search:e})):0===e.trim().length?o.locationService.push("/"):o.locationService.push(e),o.locationService;const t=o.locationService.getLocation();return`${t.pathname}${t.search}${t.hash}`}}},20469:(e,t,n)=>{"use strict";n.d(t,{ZP:()=>a,hF:()=>r,rb:()=>s});var i=n(93964),o=n.n(i);const r=o().module("grafana.core",["ngRoute"]),s=[r,o().module("grafana.controllers",[]),o().module("grafana.directives",[]),o().module("grafana.factories",[]),o().module("grafana.services",[]),o().module("grafana.filters",[]),o().module("grafana.routes",[])],a=r},58981:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AngularApp:()=>it,coreModule:()=>l.hF});var i=n(93120),o=n.n(i),r=n(99918),s=n(43215),a=n(90923),l=n(20469),c=n(21169);l.hF.directive("grafanaPanel",["$rootScope","$document","$timeout",(e,t,n)=>({restrict:"E",template:'\n <ng-transclude class="panel-height-helper"></ng-transclude>\n',transclude:!0,scope:{ctrl:"="},link:(e,t)=>{const i=e.ctrl,l=e.ctrl.panel,h=new r.w0;let u;function p(){i.height=e.$parent.$parent.size.height,i.width=e.$parent.$parent.size.width}i.events.on(s.PanelEvents.componentDidMount,(()=>{if(i.__proto__.constructor.scrollable){const e="baron baron__root baron__clipper panel-content--scrollable",n="baron__scroller",i='\n <div class="baron__track">\n <div class="baron__bar"></div>\n </div>\n ',r=t,s=t.find(":first").find(":first");r.addClass(e),$(i).appendTo(r),s.addClass(n),u=o()({root:r[0],scroller:s[0],bar:".baron__bar",barOnCls:"_scrollbar",scrollingCls:"_scrolling"}),u.scroll()}})),p(),h.add(l.events.subscribe(a.RefreshEvent,(()=>{p(),i.events.emit("refresh")}))),h.add(l.events.subscribe(c._z,(e=>{var t;null!==(t=e.payload)&&void 0!==t&&t.fromAngular||(p(),n((()=>{u&&u.update(),i.events.emit("render")})))}))),h.add(i.events.subscribe(c._z,(e=>{e.payload&&(e.payload.fromAngular=!0,l.events.publish(e))}))),e.$on("$destroy",(()=>{t.off(),h.unsubscribe(),i.events.emit(s.PanelEvents.panelTeardown),i.events.removeAllListeners(),u&&u.dispose()})),l.events.publish(c.GT)}})]);n(88643);var h=n(93964),u=n.n(h);f.$inject=["dynamicDirectiveSrv"];const p=u().module("grafana.directives"),d={};function f(e){return e.create({scope:{ctrl:"=",editorTab:"="},directive:e=>{const t=e.ctrl.pluginId,n=e.editorTab.title.toLowerCase().replace(" ","-").replace("&","").replace(" ","").replace(" ","-");if(d[t]){if(d[t][n])return d[t][n]}else d[t]=[];const i={fn:()=>e.editorTab.directiveFn(),name:`panel-editor-tab-${t}${n}`};return d[t][n]=i,i}})}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}p.directive("panelEditorTab",f);class g{constructor(){m(this,"target",void 0),m(this,"queryCtrl",void 0),m(this,"panelCtrl",void 0),m(this,"panel",void 0),m(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))}}g.$inject=[],l.hF.directive("queryEditorRow",(function(){return{restrict:"E",controller:g,bindToController:!0,controllerAs:"ctrl",templateUrl:"public/app/angular/panel/partials/query_editor_row.html",transclude:!0,scope:{queryCtrl:"=",canCollapse:"=",hasTextEditMode:"="}}}));n(2489);var v=n(82897),b=n.n(v),y=n(7166);l.ZP.filter("stringSort",(()=>e=>e.sort())),l.ZP.filter("slice",(()=>(e,t,n)=>(0,v.isUndefined)(e)?e:e.slice(t,n))),l.ZP.filter("stringify",(()=>e=>(0,v.isObject)(e)&&!(0,v.isArray)(e)?u().toJson(e):(0,v.isNull)(e)?null:e.toString())),l.ZP.filter("moment",(()=>(e,t)=>(0,s.dateTime)(e).fromNow())),l.ZP.filter("interpolateTemplateVars",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,y.J)();const t=(t,n)=>{let i;return i=n.ctrl?(n.ctrl.panel||n.ctrl.row).scopedVars:n.row.scopedVars,e.replaceWithText(t,i)};return t.$stateful=!0,t}));class w{constructor(){}set(){console.warn("old deprecated alert srv being used")}}w.$inject=[],l.ZP.service("alertSrv",w);class C{constructor(e){this.$compile=e}addDirective(e,t,n){const i=u().element(document.createElement(t));this.$compile(i)(n),e.empty(),e.append(i)}link(e,t,n,i){const o=i.directive(e);o&&o.fn?(o.fn.registered||(l.ZP.directive(n.$normalize(o.name),o.fn),o.fn.registered=!0),this.addDirective(t,o.name,e)):t.empty()}create(e){return{restrict:"E",scope:e.scope,link:(t,n,i)=>{if(e.watchPath){let o=null;t.$watch(e.watchPath,(()=>{o&&o.$destroy(),o=t.$new(),this.link(o,n,i,e)}))}else this.link(t,n,i,e)}}}}C.$inject=["$compile"],l.ZP.service("dynamicDirectiveSrv",C);var k=n(68404),x=n(87524);function S(e,t){if(u().isFunction(e))return e;if(!e)throw new Error("ReactComponent name attribute must be specified");let n;try{n=t.get(e)}catch(e){}if(!n)try{n=e.split(".").reduce(((e,t)=>e[t]),window)}catch(e){}if(!n)throw Error("Cannot find react component "+e);return n}function T(e,t,n){return Object.keys(e||{}).reduce(((i,o)=>{const r=e[o],s=(n||{})[o]||{};return i[o]=u().isFunction(r)&&!1!==s.wrapApply?function(e,t){if(e.wrappedInApply)return e;const n=function(){const n=arguments,i=t.$root.$$phase;return"$apply"===i||"$digest"===i?e.apply(null,n):t.$apply((()=>e.apply(null,n)))};return n.wrappedInApply=!0,n}(r,t):r,i}),{})}function E(e,t,n,i){const o=u().isFunction(t.$watchCollection),r=u().isFunction(t.$watchGroup),s=[];for(const l of n){const n=(a=l,Array.isArray(a)?a[0]:a),c=M(e,l);n&&!n.match(/\(.*\)/)&&"one-time"!==c&&("collection"===c&&o?t.$watchCollection(n,i):"reference"===c&&r?s.push(n):t.$watch(n,i,"reference"!==c))}var a;"one-time"===e&&i(),s.length&&t.$watchGroup(s,i)}function A(e,t,n,i){n.$evalAsync((()=>{x.render(k.createElement(e,t),i[0])}))}function P(e){return Array.isArray(e)?e[1]:{}}function D(e,t){return e[Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase()||(0,v.kebabCase)(e)===(0,v.kebabCase)(t)))]}function M(e,t){return Array.isArray(t)&&u().isObject(t[1])&&t[1].watchDepth||e}const L=u().module("react",[]);function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){const n=this;class i{constructor(n){return O(this,"value",void 0),O(this,"html",void 0),O(this,"type",void 0),O(this,"expandable",void 0),O(this,"text",void 0),O(this,"cssClass",void 0),O(this,"fake",void 0),O(this,"custom",void 0),O(this,"selectMode",void 0),"*"===n||"*"===n.value?(this.value="*",this.html=e.trustAsHtml('<i class="fa fa-asterisk"><i>'),this.type=n.type,void(this.expandable=!0)):(0,v.isString)(n)?(this.value=n,void(this.html=e.trustAsHtml(t.highlightVariablesAsHtml(this.value)))):(this.text=n.value,this.cssClass=n.cssClass,this.custom=n.custom,this.type=n.type,this.fake=n.fake,this.value=n.value,this.selectMode=n.selectMode,this.expandable=n.expandable,void(this.html=n.html||e.trustAsHtml(t.highlightVariablesAsHtml(this.value))))}}this.getSegmentForValue=function(e,t){return e?this.newSegment(e):this.newSegment({value:t,fake:!0})},this.newSelectMeasurement=()=>new i({value:"select measurement",fake:!0}),this.newFake=(e,t,n)=>new i({value:e,fake:!0,type:t,cssClass:n}),this.newSegment=e=>new i(e),this.newKey=e=>new i({value:e,type:"key",cssClass:"query-segment-key"}),this.newKeyValue=e=>new i({value:e,type:"value",cssClass:"query-segment-value"}),this.newCondition=e=>new i({value:e,type:"condition",cssClass:"query-keyword"}),this.newOperator=e=>new i({value:e,type:"operator",cssClass:"query-segment-operator"}),this.newOperators=e=>(0,v.map)(e,(e=>new i({value:e,type:"operator",cssClass:"query-segment-operator"}))),this.transformToSegments=(e,i)=>o=>{const r=(0,v.map)(o,(e=>n.newSegment({value:e.text,expandable:e.expandable})));return e&&(0,v.each)(t.getVariables(),(e=>{void 0!==i&&i!==e.type||r.unshift(n.newSegment({type:"value",value:"$"+e.name,expandable:!0}))})),r},this.newSelectMetric=()=>new i({value:"select metric",fake:!0}),this.newPlusButton=()=>new i({fake:!0,html:'<i class="fa fa-plus "></i>',type:"plus-button",cssClass:"query-part"})}L.directive("reactComponent",["$injector",e=>({restrict:"E",replace:!0,link:function(t,n,i){const o=S(i.name,e),r=()=>{const e=T(t.$eval(i.props),t);A(o,e,t,n)};i.props?E(i.watchDepth,t,[i.props],r):r(),t.$on("$destroy",(()=>{i.onScopeDestroy?t.$eval(i.onScopeDestroy,{unmountComponent:x.unmountComponentAtNode.bind(this,n[0])}):x.unmountComponentAtNode(n[0])}))}})]),L.factory("reactDirective",["$injector",e=>(t,n,i,o)=>{const r={restrict:"E",replace:!0,link:function(i,r,s){const a=S(t,e),l=()=>{let e={};const t={};n.forEach((n=>{const o=function(e){return Array.isArray(e)?e[0]:e}(n);e[o]=i.$eval(D(s,o)),t[o]=P(n)})),e=T(e,i,t),e=u().extend({},e,o),A(a,e,i,r)},c=(n=n||Object.keys(a.propTypes||{})).map((e=>Array.isArray(e)?[D(s,e[0]),P(e)]:D(s,e)));n.length?E(s.watchDepth,i,c,l):l(),i.$on("$destroy",(()=>{s.onScopeDestroy?i.$eval(s.onScopeDestroy,{unmountComponent:x.unmountComponentAtNode.bind(this,r[0])}):x.unmountComponentAtNode(r[0])}))}};return u().extend(r,i)}]),I.$inject=["$sce","templateSrv"],l.ZP.service("uiSegmentSrv",I);var j=n(13426),q=n.n(j);function F(e,t,n){let i=null;this.close=()=>{i&&i.close()},this.show=o=>{i&&(i.close(),i=null);const r=(0,v.extend)(t.$new(!0),o.model);let s;r.dismiss=()=>{s.close()};const a=document.createElement("div");return a.innerHTML=o.template,e(a)(r),n((()=>{s=new(q())({target:o.element,content:a,position:o.position,classes:o.classNames||"drop-popover",openOn:o.openOn,hoverCloseDelay:200,tetherOptions:{constraints:[{to:"scrollParent",attachment:"together"}]}}),s.on("close",(()=>{setTimeout((()=>{r.$destroy(),s.tether&&s.destroy(),o.onClose&&o.onClose()})),i=null})),i=s,i.open()}),100),()=>{s&&s.close()}}}F.$inject=["$compile","$rootScope","$timeout"],l.ZP.service("popoverSrv",F);class R{constructor(e){var t,n,i;i=[],(n="timers")in(t=this)?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,this.$timeout=e}register(e){return this.timers.push(e),e}cancel(e){this.timers=(0,v.without)(this.timers,e),this.$timeout.cancel(e)}cancelAll(){(0,v.each)(this.timers,(e=>{this.$timeout.cancel(e)})),this.timers=[]}}R.$inject=["$timeout"],l.ZP.service("timer",R);class _{constructor(e,t){this.$compile=e,this.$rootScope=t}load(e,t,n){const i=this.$rootScope.$new();(0,v.assign)(i,t);const o=this.$compile(n)(i);return u().element(e).append(o),{destroy:()=>{i.$destroy(),o.remove()},digest:()=>{i.$$phase||i.$digest()},getScope:()=>i}}}_.$inject=["$compile","$rootScope"],l.ZP.service("angularLoader",_);var N=n(98572),z=n.n(N);const Z=z()(window);function W(e){return{scope:{menuItems:"=dropdownTypeahead",dropdownTypeaheadOnSelect:"&dropdownTypeaheadOnSelect",model:"=ngModel"},link:(t,n,i)=>{const o=z()('<input type="text" class="gf-form-input input-medium tight-form-input" spellcheck="false" style="display:none"></input>'),r=z()('<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>');o.appendTo(n),r.appendTo(n),i.linkText&&r.html(i.linkText),i.ngModel&&t.$watch("model",(e=>{(0,v.each)(t.menuItems,(t=>{(0,v.each)(t.submenu,(t=>{t.value===e&&r.html(t.text)}))}))}));const s=(0,v.reduce)(t.menuItems,((e,t,n)=>(t.submenu?(0,v.each)(t.submenu,((i,o)=>{i.click="menuItemSelected("+n+","+o+")",e.push(t.text+" "+i.text)})):(t.click="menuItemSelected("+n+")",e.push(t.text)),e)),[]);t.menuItemSelected=(e,i)=>{const s=t.menuItems[e],a={$item:s};s.submenu&&void 0!==i&&(a.$subItem=s.submenu[i]),t.dropdownTypeaheadOnSelect(a),o.hide(),o.val(""),r.show(),r.focus(),n.removeClass("open")},o.attr("data-provide","typeahead"),o.typeahead({source:s,minLength:1,items:10,updater:e=>{const n={};return(0,v.each)(t.menuItems,(t=>{(0,v.each)(t.submenu,(i=>{e===t.text+" "+i.text&&(n.$subItem=i,n.$item=t)}))})),n.$item&&t.$apply((()=>{t.dropdownTypeaheadOnSelect(n)})),o.trigger("blur"),""}}),r.click((()=>{r.hide(),o.show(),o.focus()})),o.keyup((()=>{n.toggleClass("open",""===o.val())})),n.mousedown((e=>{e.preventDefault()})),o.blur((()=>{o.hide(),o.val(""),r.show(),r.focus(),setTimeout((()=>{n.removeClass("open")}),200)})),e(n.contents())(t)}}}function V(e){return{scope:{menuItems:"=dropdownTypeahead2",dropdownTypeaheadOnSelect:"&dropdownTypeaheadOnSelect",model:"=ngModel",buttonTemplateClass:"@"},link:(t,n,i)=>{const o=z()('<input type="text" class="gf-form-input" spellcheck="false" style="display:none"></input>');t.buttonTemplateClass||(t.buttonTemplateClass="gf-form-input");const r=z()('<a class="{{buttonTemplateClass}} dropdown-toggle" tabindex="1" gf-dropdown="menuItems" data-toggle="dropdown" ><i class="fa fa-plus"></i></a>'),s={blur:null};o.appendTo(n),r.appendTo(n),i.linkText&&r.html(i.linkText),i.ngModel&&t.$watch("model",(e=>{(0,v.each)(t.menuItems,(t=>{(0,v.each)(t.submenu,(t=>{t.value===e&&r.html(t.text)}))}))}));const a=(0,v.reduce)(t.menuItems,((e,t,n)=>(t.submenu?(0,v.each)(t.submenu,((i,o)=>{i.click="menuItemSelected("+n+","+o+")",e.push(t.text+" "+i.text)})):(t.click="menuItemSelected("+n+")",e.push(t.text)),e)),[]),l=()=>{o.hide(),o.val(""),r.show(),r.focus(),n.removeClass("open")};t.menuItemSelected=(e,n)=>{const i=t.menuItems[e],o={$item:i};i.submenu&&void 0!==n&&(o.$subItem=i.submenu[n]),t.dropdownTypeaheadOnSelect(o),l()},o.attr("data-provide","typeahead"),o.typeahead({source:a,minLength:1,items:10,updater:e=>{const n={};return(0,v.each)(t.menuItems,(t=>{(0,v.each)(t.submenu,(i=>{e===t.text+" "+i.text&&(n.$subItem=i,n.$item=t)}))})),n.$item&&t.$apply((()=>{t.dropdownTypeaheadOnSelect(n)})),o.trigger("blur"),""}}),r.click((()=>{r.hide(),o.show(),o.focus()})),o.keyup((()=>{n.toggleClass("open",""===o.val())})),n.mousedown((e=>{e.preventDefault(),s.blur=null})),o.blur((()=>{s.blur=setTimeout((()=>{l()}),1)})),e(n.contents())(t)}}}function U(e){return{link:(e,t)=>{const n=t[0],i=()=>{const e=new Event("change");return n.dispatchEvent(e)},o=e=>{let{animationName:t}=e;switch(t){case"onAutoFillStart":case"onAutoFillCancel":return i()}return null};n.addEventListener("animationstart",o),e.$on("$destroy",(()=>{n.removeEventListener("animationstart",o)}))}}}function H(e,t,n){return{scope:{segment:"=",getOptions:"&",onChange:"&",debounce:"@"},link:(i,o)=>{const r=z()('<input type="text" data-provide="typeahead" class="gf-form-input input-medium" spellcheck="false" style="display:none"></input>'),s=i.segment,a=z()(s.selectMode?'<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>':'<a class="gf-form-label" ng-class="segment.cssClass" tabindex="1" give-focus="segment.focus" ng-bind-html="segment.html"></a>');let l=null,c=null,h=!0;const u=i.debounce;r.appendTo(o),a.appendTo(o),i.updateVariableValue=e=>{""!==e&&s.value!==e&&i.$apply((()=>{const o=(0,v.find)(i.altSegments,{value:e});o?(s.value=o.value,s.html=o.html||t.trustAsHtml(n.highlightVariablesAsHtml(o.value)),s.fake=!1,s.expandable=o.expandable,o.type&&(s.type=o.type)):"false"!==s.custom&&(s.value=e,s.html=t.trustAsHtml(n.highlightVariablesAsHtml(e)),s.expandable=!0,s.fake=!1),i.onChange()}))},i.switchToLink=e=>{h&&!e||(clearTimeout(c),c=null,h=!0,r.hide(),a.show(),i.updateVariableValue(r.val()))},i.inputBlur=()=>{c=setTimeout(i.switchToLink,200)},i.source=(e,t)=>{i.$apply((()=>{i.getOptions({$query:e}).then((e=>{i.altSegments=e,l=(0,v.map)(i.altSegments,(e=>(0,v.escape)(e.value))),"false"!==s.custom&&(s.fake||-1!==(0,v.indexOf)(l,s.value)||l.unshift((0,v.escape)(s.value))),t(l)}))}))},i.updater=e=>(e=(0,v.unescape)(e))===s.value?(clearTimeout(c),r.focus(),e):(r.val(e),i.switchToLink(!0),e),i.matcher=function(e){if(h)return!1;let t=this.query;"/"===t[0]&&(t=t.substring(1)),"/"===t[t.length-1]&&(t=t.substring(0,t.length-1));try{return e.toLowerCase().match(t.toLowerCase())}catch(e){return!1}},r.attr("data-provide","typeahead"),r.typeahead({source:i.source,minLength:0,items:1e4,updater:i.updater,matcher:i.matcher});const p=r.data("typeahead");p.lookup=function(){this.query=this.$element.val()||"";const e=this.source(this.query,z().proxy(this.process,this));return e?this.process(e):e},u&&(p.lookup=(0,v.debounce)(p.lookup,500,{leading:!0})),a.keydown((e=>{40!==e.keyCode&&13!==e.keyCode||a.click()})),a.click((()=>{l=null,r.css("width",Math.max(a.width(),80)+16+"px"),a.hide(),r.show(),r.focus(),h=!1;const e=r.data("typeahead");e&&(r.val(""),e.lookup())})),r.blur(i.inputBlur),e(o.contents())(i)}}}function B(e){return{template:'<metric-segment segment="segment" get-options="getOptionsInternal()" on-change="onSegmentChange()"></metric-segment>',restrict:"E",scope:{property:"=",options:"=",getOptions:"&",onChange:"&"},link:{pre:function(t,n,i){let o;t.valueToSegment=n=>{const o=(0,v.find)(t.options,{value:n}),r={cssClass:i.cssClass,custom:i.custom,value:o?o.text:n,selectMode:i.selectMode};return e.newSegment(r)},t.getOptionsInternal=()=>t.options?(o=t.options,Promise.resolve((0,v.map)(t.options,(e=>({value:e.text}))))):t.getOptions().then((e=>(o=e,(0,v.map)(e,(e=>e.html?e:{value:e.text}))))),t.onSegmentChange=()=>{if(o){const e=(0,v.find)(o,{text:t.segment.value});e&&e.value!==t.property?t.property=e.value:"false"!==i.custom&&(t.property=t.segment.value)}else t.property=t.segment.value;t.$$postDigest((()=>{t.$apply((()=>{t.onChange()}))}))},t.segment=t.valueToSegment(t.property)}}}}function Q(e){return{restrict:"E",link:(t,n,i)=>{let o='<i class="grafana-tip fa fa-'+(i.icon||"question-circle")+'" bs-tooltip="\''+n.text().replace(/[\'\"\\{}<>&]/g,(e=>"&#"+e.charCodeAt(0)+";"))+"'\"></i>";n.replaceWith(e(u().element(o))(t))}}}function G(e){return{restrict:"A",link:(t,n,i)=>{t.$watch((e=>e.$eval(i.compile)),(i=>{n.html(i),e(n.contents())(t)}))}}}function K(e){return{restrict:"E",link:(t,n,i)=>{const o=i.change?' ng-change="'+i.change+'"':"",r=i.tip?" <tip>"+i.tip+"</tip>":"",s='<div class="editor-option gf-form-checkbox text-center"'+(i.showIf?' ng-show="'+i.showIf+'" ':"")+'> <label for="'+i.model+'" class="small">'+i.text+r+'</label><input class="cr1" id="'+i.model+'" type="checkbox" ng-model="'+i.model+'"'+o+' ng-checked="'+i.model+'"></input> <label for="'+i.model+'" class="cr1"></label>';n.replaceWith(e(u().element(s))(t))}}}function Y(e,t){return{restrict:"E",link:(n,i,o)=>{const r=t(o.text)(n),s=t(o.model)(n),a=o.change?' ng-change="'+o.change+'"':"",l=o.tip?" <tip>"+o.tip+"</tip>":"",c='<label for="'+n.$id+s+'" class="checkbox-label">'+r+l+"</label>";let h='<input class="cr1" id="'+n.$id+s+'" type="checkbox" ng-model="'+s+'"'+a+' ng-checked="'+s+'"></input> <label for="'+n.$id+s+'" class="cr1"></label>';h+=c,i.addClass("gf-form-checkbox"),i.html(e(u().element(h))(n))}}}function J(e,t,n){function i(e,t){const n=['<ul class="dropdown-menu '+("top"===t?"dropup":"")+'" role="menu" aria-labelledby="drop1">',"</ul>"];for(let t=0;t<e.length;t++){const o=e[t];if(o.divider){n.splice(t+1,0,'<li class="divider"></li>');continue}let r="<li"+(o.submenu&&o.submenu.length?' class="dropdown-submenu"':"")+'><a tabindex="-1" ng-href="'+(o.href||"")+'"'+(o.click?' ng-click="'+o.click+'"':"")+(o.target?' target="'+o.target+'"':"")+(o.method?' data-method="'+o.method+'"':"")+">"+(o.text||"")+"</a>";o.submenu&&o.submenu.length&&(r+=i(o.submenu).join("\n")),r+="</li>",n.splice(t+1,0,r)}return n}return{restrict:"EA",scope:!0,link:function(o,r,s){const a=e(s.gfDropdown)(o);n((()=>{const e=r.data("placement");u().element(i(a,e).join("")).insertAfter(r),t(r.next("ul.dropdown-menu"))(o)})),r.addClass("dropdown-toggle").attr("data-toggle","dropdown")}}}z().fn.place_tt=(()=>{const e={offset:5};return function(t,n,i){return i=z().extend(!0,{},e,i),this.each((()=>{const e=z()(this);let o,r;e.addClass("grafana-tooltip"),z()("#tooltip").remove(),e.appendTo(document.body),i.compile&&u().element(document).injector().invoke(["$compile","$rootScope",(t,n)=>{const o=n.$new(!0);(0,v.extend)(o,i.scopeData),t(e)(o),o.$digest(),o.$destroy()}]),o=e.outerWidth(!0),r=e.outerHeight(!0);const s=t+i.offset+o>Z.width()?t-i.offset-o:t+i.offset,a=n+i.offset+r>Z.height()?n-i.offset-r:n+i.offset;e.css("left",s>0?s:0),e.css("top",a>0?a:0)}))}})(),V.$inject=["$compile"],W.$inject=["$compile"],l.ZP.directive("dropdownTypeahead",W),l.ZP.directive("dropdownTypeahead2",V),U.$inject=["$compile"],l.ZP.directive("autofillEventFix",U),B.$inject=["uiSegmentSrv"],H.$inject=["$compile","$sce","templateSrv"],l.ZP.directive("metricSegment",H),l.ZP.directive("metricSegmentModel",B),J.$inject=["$parse","$compile","$timeout"],Y.$inject=["$compile","$interpolate"],K.$inject=["$compile"],G.$inject=["$compile"],Q.$inject=["$compile"],l.ZP.directive("tip",Q),l.ZP.directive("compile",G),l.ZP.directive("watchChange",(function(){return{scope:{onchange:"&watchChange"},link:(e,t)=>{t.on("input",(()=>{e.$apply((()=>{e.onchange({inputValue:t.val()})}))}))}}})),l.ZP.directive("editorOptBool",K),l.ZP.directive("editorCheckbox",Y),l.ZP.directive("gfDropdown",J),l.ZP.directive("bsTooltip",["$parse","$compile",function(e,t){return{restrict:"A",scope:!0,link:function(t,n,i){var o=e(i.bsTooltip)(t);t.$watch(i.bsTooltip,(function(e,t){e!==t&&(o=e)})),n.on("show",(function(e){z()(".tooltip.in").each((function(){var e=z()(this),t=e.data("tooltip");t&&!t.$element.is(n)&&e.tooltip("hide")}))})),n.tooltip({title:function(){return u().isFunction(o)?o.apply(null,arguments):o},html:!0,container:"body"}),n.data("tooltip").show=function(){var e=z().fn.tooltip.Constructor.prototype.show.apply(this,arguments);return this.tip().data("tooltip",this),e},t._tooltip=function(e){n.tooltip(e)},t.hide=function(){n.tooltip("hide")},t.show=function(){n.tooltip("show")},t.dismiss=t.hide}}}]),l.ZP.directive("bsTypeahead",["$parse",function(e){return{restrict:"A",require:"?ngModel",link:function(t,n,i,o){var r=e(i.bsTypeahead)(t);t.$watch(i.bsTypeahead,(function(e,t){e!==t&&(r=e)})),n.attr("data-provide","typeahead"),n.typeahead({source:function(){return u().isFunction(r)?r.apply(null,arguments):r},minLength:i.minLength||1,items:i.item,updater:function(e){return o&&t.$apply((function(){o.$setViewValue(e)})),t.$emit("typeahead-updated",e),e}});var s=n.data("typeahead");s.lookup=function(){var e;return this.query=this.$element.val()||"",this.query.length<this.options.minLength?this.shown?this.hide():this:(e=(0,v.isFunction)(this.source)?this.source(this.query,z().proxy(this.process,this)):this.source)?this.process(e):this},i.matchAll&&(s.matcher=function(){return!0}),"0"===i.minLength&&setTimeout((function(){n.on("focus",(function(){0===n.val().length&&setTimeout(n.typeahead.bind(n,"lookup"),200)}))}))}}}]),l.ZP.directive("ngModelOnblur",(function(){return{restrict:"A",priority:1,require:"ngModel",link:(e,t,n,i)=>{"radio"!==n.type&&"checkbox"!==n.type&&(t.off("input keydown change"),t.bind("blur",(()=>{e.$apply((()=>{i.$setViewValue(t.val())}))})))}}})),l.ZP.directive("emptyToNull",(function(){return{restrict:"A",require:"ngModel",link:(e,t,n,i)=>{i.$parsers.push((e=>""===e?null:e))}}})),l.ZP.directive("validTimeSpan",(function(){return{require:"ngModel",link:(e,t,n,i)=>{i.$validators.integer=(e,t)=>{if(i.$isEmpty(e))return!0;if(0===t.indexOf("$")||0===t.indexOf("+$"))return!0;return!0!==s.rangeUtil.describeTextRange(t).invalid}}}}));var X=n(69783);n(90402);function ee(e,t){const{color:n,borderColor:i}=(0,X.getTagColorsFromName)(e);t.css("background-color",n),t.css("border-color",i)}function te(e){return{multiElement:!0,terminal:!0,transclude:!0,priority:600,restrict:"E",link:(t,n,i,o,r)=>{let s,a,l;function c(){l&&(l.remove(),l=null),a&&(a.$destroy(),a=null),s&&(l=function(e){let t=e[0];const n=e[e.length-1];let i;t=t.nextSibling;for(let o=1;t!==n&&t;o++)(i||e[o]!==t)&&(i||(i=z()([].slice.call(e,0,o))),i.push(t)),t=t.nextSibling;return i||e}(s.clone),e.leave(l).then((()=>{l=null})),s=null)}t.$watch(i.property,(function(t,o){a&&t!==o&&c(),a||!t&&!i.showNull?c():r(((t,i)=>{a=i,t[t.length++]=document.createComment(" end rebuild on change "),s={clone:t},e.enter(t,n.parent(),n)}))}))}}}l.ZP.directive("tagColorFromName",(function(){return{scope:{tagColorFromName:"="},link:(e,t)=>{ee(e.tagColorFromName,t)}}})),l.ZP.directive("bootstrapTagsinput",(function(){function e(e,t){if(t)return u().isFunction(e.$parent[t])?e.$parent[t]:e=>e[t]}return{restrict:"EA",scope:{model:"=ngModel",onTagsUpdated:"&"},template:"<select multiple></select>",replace:!1,link:function(t,n,i){u().isArray(t.model)||(t.model=[]);const o=z()("select",n);i.placeholder&&o.attr("placeholder",i.placeholder),o.tagsinput({typeahead:{source:u().isFunction(t.$parent[i.typeaheadSource])?t.$parent[i.typeaheadSource]:null},widthClass:i.widthClass,itemValue:e(t,i.itemvalue),itemText:e(t,i.itemtext),tagClass:u().isFunction(t.$parent[i.tagclass])?t.$parent[i.tagclass]:()=>i.tagclass}),o.on("itemAdded",(e=>{-1===t.model.indexOf(e.item)&&(t.model.push(e.item),t.onTagsUpdated&&t.onTagsUpdated());const n=o.next().children("span").filter((()=>z()(this).text()===e.item));ee(e.item,n)})),o.on("itemRemoved",(e=>{const n=t.model.indexOf(e.item);-1!==n&&(t.model.splice(n,1),t.onTagsUpdated&&t.onTagsUpdated())})),t.$watch("model",(()=>{u().isArray(t.model)||(t.model=[]),o.tagsinput("removeAll");for(let e=0;e<t.model.length;e++)o.tagsinput("add",t.model[e])}),!0)}}})),te.$inject=["$animate"],l.ZP.directive("rebuildOnChange",te),l.ZP.directive("giveFocus",(()=>(e,t,n)=>{t.click((e=>{e.stopPropagation()})),e.$watch(n.giveFocus,(e=>{e&&setTimeout((()=>{t.focus();const e=t[0];if(e.setSelectionRange){const n=2*t.val().length;e.setSelectionRange(n,n)}}),200)}),!0)}));class ne{constructor(){var e,t,n;n=void 0,(t="observer")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;this.observer=new MutationObserver((()=>{}));this.observer.observe(u().element(".delta-html")[0],{attributes:!0,attributeFilter:["class"],characterData:!1,childList:!0,subtree:!1})}$onDestroy(){this.observer.disconnect()}}ne.$inject=[],l.ZP.directive("diffDelta",(function(){return{controller:ne,replace:!1,restrict:"A"}}));class ie{constructor(e,t,n){this.$scope=e,this.$rootScope=t,this.$anchorScroll=n}goToLine(e){let t;const n=()=>{this.$anchorScroll(`l${e}`),t()};this.$scope.switchView().then((()=>{t=this.$rootScope.$on("json-diff-ready",n.bind(this))}))}}ie.$inject=["$scope","$rootScope","$anchorScroll"],l.ZP.directive("diffLinkJson",(function(){return{controller:ie,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>'}})),l.ZP.directive("arrayJoin",(function(){return{restrict:"A",require:"ngModel",link:(e,t,n,i)=>{i.$parsers.push((function(e){return(e||"").split(",")})),i.$formatters.push((function(e){return(0,v.isArray)(e)?(e||"").join(","):e}))}}}));var oe=n(11622);function re(e,t,n){l.ZP.directive(e,["reactDirective",e=>e((0,oe.ER)(t),n)])}var se=n(95513),ae=n(24581),le=n(47379),ce=n(28436),he=n(63310),ue=n(11832),pe=n(45916);const{Select:de}=X.LegacyForms,fe=e=>{const{value:t,placeholder:n,className:i,isSearchable:o,onChange:r}=e,s=me(e),a=ge(s,t),l=(0,k.useCallback)((e=>r(e.value)),[r]);return(0,pe.jsx)(de,{className:i,isMulti:!1,isClearable:!1,backspaceRemovesValue:!1,onChange:l,options:s,isSearchable:o,maxMenuHeight:500,placeholder:n,noOptionsMessage:()=>"No options found",value:a})},me=e=>{let{variables:t=[],options:n}=e;return(0,k.useMemo)((()=>Array.isArray(t)&&0!==t.length?[{label:"Template Variables",options:t.map((e=>{let{name:t}=e;return{label:`$${t}`,value:`$${t}`}}))},...n]:n),[t,n])},ge=(e,t)=>(0,k.useMemo)((()=>(e.every((e=>e.options))?(0,v.flatten)(e.map((e=>e.options))):e).find((e=>e.value===t))),[e,t]);var ve=n(67907),be=n(67163),ye=n(34400),we=n(90441),$e=n(11410);const Ce=(0,k.memo)((function(e){var t;const{expr:n,maxLines:i,instant:o,datasource:r,onChange:s}=e,a={refId:"",expr:n,maxLines:i,instant:o};return(0,pe.jsx)("div",{className:"gf-form-group",children:(0,pe.jsx)($e.n,{datasource:r,query:a,onChange:s,onRunQuery:()=>{},onBlur:()=>{},history:[],ExtraFieldElement:(0,pe.jsx)(we.JX,{lineLimitValue:(null==a||null===(t=a.maxLines)||void 0===t?void 0:t.toString())||"",resolution:a.resolution||1,query:a,onRunQuery:()=>{},onChange:s})})})})),{SecretFormField:ke}=X.LegacyForms;var xe=n(11938);Se.$inject=["templateSrv"];function Se(e){return{restrict:"E",template:'\n<div class="dropdown cascade-open">\n<a ng-click="showActionsMenu()" class="query-part-name pointer dropdown-toggle" data-toggle="dropdown">{{part.def.type}}</a>\n<span>(</span><span class="query-part-parameters"></span><span>)</span>\n<ul class="dropdown-menu">\n <li ng-repeat="action in partActions">\n <a ng-click="triggerPartAction(action)">{{action.text}}</a>\n </li>\n</ul>\n',scope:{part:"=",handleEvent:"&",debounce:"@"},link:function(t,n){const i=t.part,o=i.def,r=n.find(".query-part-parameters"),s=t.debounce;function a(e){const t=z()(this),n=t.next();n.val(i.params[e]),n.css("width",t.width()+16+"px"),t.hide(),n.show(),n.focus(),n.select();const o=n.data("typeahead");o&&(n.val(""),o.lookup())}function l(n){const o=z()(this),r=o.prev(),s=o.val();(""!==s||i.def.params[n].optional)&&(r.html(e.highlightVariablesAsHtml(s)),i.updateParam(o.val(),n),t.$apply((()=>{t.handleEvent({$event:{name:"part-param-changed"}})}))),o.hide(),r.show()}function c(e,t){13===t.which&&l.call(this,e)}function h(){this.style.width=8*(3+this.value.length)+"px"}function u(){(0,v.each)(o.params,((n,o)=>{if(n.optional&&i.params.length<=o)return;o>0&&z()("<span>, </span>").appendTo(r);const u=e.highlightVariablesAsHtml(i.params[o]),p=z()('<a class="graphite-func-param-link pointer">'+u+"</a>"),d=z()('<input type="text" class="hide input-mini tight-form-func-param"></input>');p.appendTo(r),d.appendTo(r),d.blur((0,v.partial)(l,o)),d.keyup(h),d.keypress((0,v.partial)(c,o)),p.click((0,v.partial)(a,o)),function(e,n,i){if(!n.options&&!n.dynamicLookup)return;e.attr("data-provide","typeahead"),e.typeahead({source:(e,i)=>{if(n.options){let e=n.options;return"int"===n.type&&(e=(0,v.map)(e,(e=>e.toString()))),e}t.$apply((()=>{t.handleEvent({$event:{name:"get-param-options"}}).then((e=>{const t=(0,v.map)(e,(e=>(0,v.escape)(e.value)));i(t)}))}))},minLength:0,items:1e3,updater:t=>(t=(0,v.unescape)(t),setTimeout((()=>{l.call(e[0],i)}),0),t)});const o=e.data("typeahead");o.lookup=function(){this.query=this.$element.val()||"";const e=this.source(this.query,z().proxy(this.process,this));return e?this.process(e):e},s&&(o.lookup=(0,v.debounce)(o.lookup,500,{leading:!0}))}(d,n,o)}))}t.partActions=[],t.showActionsMenu=()=>{(0,xe.E)(t)(t.handleEvent({$event:{name:"get-part-actions"}}).then((e=>{t.partActions=e})))},t.triggerPartAction=e=>{t.handleEvent({$event:{name:"action",action:e}})},r.empty(),u()}}}function Te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e){let t=this.query;return""===t||("/"===t[0]&&(t=t.substring(1)),"/"===t[t.length-1]&&(t=t.substring(0,t.length-1)),e.toLowerCase().match(t.toLowerCase()))}l.ZP.directive("queryPartEditor",Se);class Ae{constructor(e,t,n,i){Te(this,"inputElement",void 0),Te(this,"linkElement",void 0),Te(this,"model",void 0),Te(this,"display",void 0),Te(this,"text",void 0),Te(this,"options",void 0),Te(this,"cssClass",void 0),Te(this,"cssClasses",void 0),Te(this,"allowCustom",void 0),Te(this,"labelMode",void 0),Te(this,"linkMode",void 0),Te(this,"cancelBlur",void 0),Te(this,"onChange",void 0),Te(this,"getOptions",void 0),Te(this,"optionCache",void 0),Te(this,"lookupText",void 0),Te(this,"placeholder",void 0),Te(this,"startOpen",void 0),Te(this,"debounce",void 0),this.$scope=e,this.$sce=n,this.templateSrv=i,this.inputElement=t.find("input").first(),this.linkElement=t.find("a").first(),this.linkMode=!0,this.cancelBlur=null,this.labelMode=!1,this.lookupText=!1,this.debounce=!1,e.$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:Ee});const e=this.inputElement.data("typeahead");e.lookup=function(){this.query=this.$element.val()||"",this.source(this.query,this.process.bind(this))},this.debounce&&(e.lookup=(0,v.debounce)(e.lookup,500,{leading:!0})),this.linkElement.keydown((e=>{40!==e.keyCode&&13!==e.keyCode||this.linkElement.click()})),this.inputElement.keydown((e=>{13===e.keyCode&&setTimeout((()=>{this.inputElement.blur()}),300)})),this.inputElement.blur(this.inputBlur.bind(this)),this.startOpen&&setTimeout(this.open.bind(this),0)}getOptionsInternal(e){return(0,xe.E)(this.$scope)(Promise.resolve(this.getOptions({$query:e})))}isPromiseLike(e){return e&&"function"==typeof e.then}modelChanged(){(0,v.isObject)(this.model)?this.updateDisplay(this.model.text):this.lookupText?this.getOptionsInternal("").then((e=>{const t=(0,v.find)(e,{value:this.model});this.updateDisplay(t?t.text:this.model)})):this.updateDisplay(this.model)}typeaheadSource(e,t){this.getOptionsInternal(e).then((e=>{this.optionCache=e;const n=(0,v.map)(e,(e=>(0,v.escape)(e.text)));this.allowCustom&&""!==this.text&&-1===(0,v.indexOf)(n,this.text)&&n.unshift(this.text),t(n)}))}typeaheadUpdater(e){return e===this.text?(clearTimeout(this.cancelBlur),this.inputElement.focus(),e):(this.inputElement.val(e),this.switchToLink(!0),e)}switchToLink(e){this.linkMode&&!e||(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(e){""!==(e=(0,v.unescape)(e))&&this.text!==e&&this.$scope.$apply((()=>{const t=(0,v.find)(this.optionCache,{text:e});t?((0,v.isObject)(this.model)?this.model=t:this.model=t.value,this.text=t.text):this.allowCustom&&((0,v.isObject)(this.model)?this.model.text=this.model.value=e:this.model=e,this.text=e),this.$scope.$$postDigest((()=>{this.$scope.$apply((()=>{this.onChange({$option:t})}))}))}))}updateDisplay(e){this.text=e,this.display=this.$sce.trustAsHtml(this.templateSrv.highlightVariablesAsHtml(e))}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 e=this.inputElement.data("typeahead");e&&(this.inputElement.val(""),e.lookup())}}Ae.$inject=["$scope","$element","$sce","templateSrv"];l.ZP.directive("gfFormDropdown",(function(){return{restrict:"E",template:'\n<input type="text"\n data-provide="typeahead"\n class="gf-form-input"\n spellcheck="false"\n style="display:none">\n</input>\n<a ng-class="ctrl.cssClasses"\n tabindex="1"\n ng-click="ctrl.open()"\n give-focus="ctrl.focus"\n ng-bind-html="ctrl.display || \' \'">\n</a>\n',controller:Ae,bindToController:!0,controllerAs:"ctrl",scope:{model:"=",getOptions:"&",onChange:"&",cssClass:"@",allowCustom:"@",labelMode:"@",lookupText:"@",placeholder:"@",startOpen:"@",debounce:"@"}}}));function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}l.ZP.directive("grafanaScrollbar",(function(){return{restrict:"A",link:(e,t,n)=>{let i=t.parent();const r=t;n.grafanaScrollbar&&"scrollonroot"===n.grafanaScrollbar&&(i=r),i.addClass("baron baron__root"),z()('\n<div class="baron__track">\n <div class="baron__bar"></div>\n</div>\n').appendTo(i),t.addClass("baron__scroller");const s={root:i[0],scroller:r[0],bar:".baron__bar",barOnCls:"_scrollbar",scrollingCls:"_scrolling",track:".baron__track",direction:"v"},a=o()(s);e.$on("$destroy",(()=>{a.dispose()}))}}})),l.ZP.directive("jsonTree",[function(){return{restrict:"E",scope:{object:"=",startExpanded:"@",rootName:"@"},link:(e,t)=>{let n=e.startExpanded;"true"===e.startExpanded?n=2:"false"===e.startExpanded&&(n=1);const i={[e.rootName]:e.object},o=new X.JsonExplorer(i,n,{animateOpen:!0}).render(!0);t.append(o)}}}]);class De{constructor(e,t){Pe(this,"onChange",void 0),Pe(this,"checked",void 0),Pe(this,"show",void 0),Pe(this,"id",void 0),Pe(this,"label",void 0),this.$timeout=t,this.show=!0,this.id=e.$id}internalOnChange(){return this.$timeout((()=>this.onChange()))}}De.$inject=["$scope","$timeout"],l.ZP.directive("gfFormSwitch",(function(){return{restrict:"E",controller:De,controllerAs:"ctrl",bindToController:!0,scope:{checked:"=",label:"@",labelClass:"@",tooltip:"@",switchClass:"@",onChange:"&"},template:'\n<label for="check-{{ctrl.id}}" class="gf-form-switch-container">\n <div class="gf-form-label {{ctrl.labelClass}}" ng-show="ctrl.label">\n {{ctrl.label}}\n <info-popover mode="right-normal" ng-if="ctrl.tooltip" position="top center">\n {{ctrl.tooltip}}\n </info-popover>\n </div>\n <div class="gf-form-switch {{ctrl.switchClass}}" ng-if="ctrl.show">\n <input id="check-{{ctrl.id}}" type="checkbox" ng-model="ctrl.checked" ng-change="ctrl.internalOnChange()">\n <span class="gf-form-switch__slider"></span>\n </div>\n</label>\n'}})),l.ZP.directive("gfFormCheckbox",(function(){return{restrict:"E",controller:De,controllerAs:"ctrl",bindToController:!0,scope:{checked:"=",label:"@",labelClass:"@",tooltip:"@",switchClass:"@",onChange:"&"},template:'\n<label for="check-{{ctrl.id}}" class="gf-form-switch-container">\n <div class="gf-form-label {{ctrl.labelClass}}" ng-show="ctrl.label">\n {{ctrl.label}}\n <info-popover mode="right-normal" ng-if="ctrl.tooltip" position="top center">\n {{ctrl.tooltip}}\n </info-popover>\n </div>\n <div class="gf-form-checkbox {{ctrl.switchClass}}" ng-if="ctrl.show">\n <input id="check-{{ctrl.id}}" type="checkbox" ng-model="ctrl.checked" ng-change="ctrl.internalOnChange()">\n <span class="gf-form-switch__checkbox"></span>\n </div>\n</label>\n'}})),l.ZP.directive("infoPopover",(function(){return{restrict:"E",template:'<icon name="\'info-circle\'" style="margin-left: 10px;" size="\'xs\'"></icon>',transclude:!0,link:(e,t,n,i,o)=>{const r=n.offset||"0 -10px",s=n.position||"right middle";let a="drop-help drop-hide-out-of-bounds";t.addClass("gf-form-help-icon"),n.wide&&(a+=" drop-wide"),n.mode&&t.addClass("gf-form-help-icon--"+n.mode),o(((n,i)=>{const o=document.createElement("div");o.className="markdown-html",(0,v.each)(n,(e=>{o.appendChild(e)}));const l={target:t[0],content:o,position:s,classes:a,openOn:"hover",hoverOpenDelay:400,tetherOptions:{offset:r,constraints:[{to:"window",attachment:"together",pin:!0}]}};e.$applyAsync((()=>{const t=new(q())(l),n=e.$on("$destroy",(()=>{t.destroy(),n()}))}))}))}}})),l.ZP.directive("spectrumPicker",(function(){return{restrict:"E",require:"ngModel",scope:!0,replace:!0,template:'<color-picker color="ngModel.$viewValue" on-change="onColorChange"></color-picker>',link:(e,t,n,i)=>{e.ngModel=i,e.onColorChange=e=>{i.$setViewValue(e)}}}}));var Me=n(78837);async function Le(e,t,i){const o=i.mode||"text",r=i.maxLines||10,s=void 0!==i.showGutter,a=i.tabSize||2,l=!i.behavioursEnabled||"true"===i.behavioursEnabled,c=!i.snippetsEnabled||"true"===i.snippetsEnabled,h=t.get(0),{default:u}=await n.e(5673).then(n.t.bind(n,29208,23));await n.e(3409).then(n.t.bind(n,93409,23)),await n.e(957).then(n.t.bind(n,10957,23)),await n.e(1523).then(n.t.bind(n,31523,23)),await n.e(6899).then(n.t.bind(n,26899,23)),await n.e(3711).then(n.t.bind(n,93711,23)),await n.e(6847).then(n.t.bind(n,96847,23)),await n.e(2795).then(n.t.bind(n,52795,23)),await n.e(1716).then(n.t.bind(n,21716,23)),await n.e(4079).then(n.t.bind(n,14079,23)),await n.e(9705).then(n.t.bind(n,99705,23)),await n.e(718).then(n.t.bind(n,50718,23)),await n.e(9064).then(n.t.bind(n,9064,23)),await n.e(7428).then(n.t.bind(n,23299,23));const p=u.edit(h),d=p.getSession(),f={maxLines:r,showGutter:s,tabSize:a,behavioursEnabled:l,highlightActiveLine:!1,showPrintMargin:!1,autoScrollEditorIntoView:!0};p.setOptions(f),p.$blockScrolling=1/0,p.renderer.setScrollMargin(10,10),p.renderer.setPadding(10),function(){let e="ace/theme/grafana-dark";Me.ZP.bootData.user.lightTheme&&(e="ace/theme/textmate");p.setTheme(e)}(),function(t){if(u.acequire("ace/ext/language_tools"),p.setOptions({enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:c}),e.getCompleter()){const t=p;t.completers=t.completers.slice(),t.completers.push(e.getCompleter())}const n=`ace/mode/${t}`;d.setMode(n)}(o),g(e.content),t.addClass("gf-code-editor");const m=t.find("textarea");function g(e){p.setValue(e),p.clearSelection()}m.addClass("gf-form-input"),m.attr("aria-label",i.textareaLabel),e.codeEditorFocus&&setTimeout((()=>{m.focus();const e=m[0];if(e.setSelectionRange){const t=2*m.val().length;e.setSelectionRange(t,t)}}),100),d.on("change",(t=>{e.$apply((()=>{const t=p.getValue();e.content=t}))})),e.$watch("content",((t,n)=>{const i=p.getValue();t!==i&&t!==n&&e.$$postDigest((()=>{g(t)}))})),p.on("blur",(()=>{e.onChange()})),e.$on("$destroy",(()=>{p.destroy()})),p.commands.addCommand({name:"executeQuery",bindKey:{win:"Ctrl-Enter",mac:"Command-Enter"},exec:()=>{e.onChange()}})}l.ZP.directive("codeEditor",(function(){return{restrict:"E",template:"<div></div>",scope:{content:"=",datasource:"=",codeEditorFocus:"<",onChange:"&",getCompleter:"&"},link:Le}})),Oe.$inject=["templateSrv"];function Oe(e){return{restrict:"E",template:'\n<div class="dropdown cascade-open">\n<a ng-click="showActionsMenu()" class="query-part-name pointer dropdown-toggle" data-toggle="dropdown">{{part.label}}</a>\n<span>{{part.def.wrapOpen}}</span><span class="query-part-parameters"></span><span>{{part.def.wrapClose}}</span>\n<ul class="dropdown-menu">\n <li ng-repeat="action in partActions">\n <a ng-click="triggerPartAction(action)">{{action.text}}</a>\n </li>\n</ul>\n',scope:{part:"=",handleEvent:"&",debounce:"@"},link:function(t,n){const i=t.part,o=i.def,r=n.find(".query-part-parameters"),s=t.debounce;let a=null;function l(e){const t=z()(this),n=t.next();n.val(i.params[e]),n.css("width",t.width()+16+"px"),t.hide(),n.show(),n.focus(),n.select();const o=n.data("typeahead");o&&(n.val(""),o.lookup())}function c(e,t){a=setTimeout((()=>{h(e,t)}),200)}function h(n,o){const r=n.prev(),s=n.val();(""!==s||i.def.params[o].optional)&&(r.html(e.highlightVariablesAsHtml(s)),i.updateParam(n.val(),o),t.$apply((()=>{t.handleEvent({$event:{name:"part-param-changed"}})}))),n.hide(),r.show()}function u(e,t){13===t.which&&h(z()(this),e)}function p(){this.style.width=8*(3+this.value.length)+"px"}function d(){(0,v.each)(o.params,((n,h)=>{if(n.optional&&i.params.length<=h)return;h>0&&z()("<span>"+o.separator+"</span>").appendTo(r);const d=e.highlightVariablesAsHtml(i.params[h]),f=z()('<a class="query-part__link">'+d+"</a>"),m=z()('<input type="text" class="hide input-mini"></input>');f.appendTo(r),m.appendTo(r),m.blur((0,v.partial)(c,m,h)),m.keyup(p),m.keypress((0,v.partial)(u,h)),f.click((0,v.partial)(l,h)),function(e,n,o){if(!n.options&&!n.dynamicLookup)return;e.attr("data-provide","typeahead"),e.typeahead({source:(e,r)=>{if(n.options){let e=n.options;return"int"===n.type&&(e=(0,v.map)(e,(e=>e.toString()))),e}t.$apply((()=>{t.handleEvent({$event:{name:"get-param-options",param:n}}).then((e=>{const t=(0,v.map)(e,(e=>(0,v.escape)(e.value)));-1===(0,v.indexOf)(t,i.params[o])&&t.unshift((0,v.escape)(i.params[o])),r(t)}))}))},minLength:0,items:1e3,updater:t=>(t=(0,v.unescape)(t))===i.params[o]?(clearTimeout(a),e.focus(),t):t});const r=e.data("typeahead");r.lookup=function(){this.query=this.$element.val()||"";const e=this.source(this.query,z().proxy(this.process,this));return e?this.process(e):e},s&&(r.lookup=(0,v.debounce)(r.lookup,500,{leading:!0}))}(m,n,h)}))}t.partActions=[],t.showActionsMenu=()=>{t.handleEvent({$event:{name:"get-part-actions"}}).then((e=>{t.partActions=e}))},t.triggerPartAction=e=>{t.handleEvent({$event:{name:"action",action:e}})},r.empty(),d()}}}l.ZP.directive("sqlPartEditor",Oe),l.hF.directive("datasourceHttpSettings",(()=>({scope:{current:"=",suggestUrl:"@",noDirectAccess:"@",showForwardOAuthIdentityOption:"@"},templateUrl:"public/app/angular/partials/http_settings_next.html",link:{pre:e=>{e.showAccessOption="true"!==e.noDirectAccess,e.onChange=t=>{e.current=t}}}}))),l.hF.directive("datasourceTlsAuthSettings",(()=>({scope:{current:"="},templateUrl:"public/app/angular/partials/tls_auth_settings.html"})));var Ie=n(75064),je=n(92808);function qe(e,t,n,i){function o(e,t){if(e)return 0===e.indexOf("public")?e:t+"/"+e}function r(e,i){const r={name:"panel-plugin-"+e.panel.type,bindings:{dashboard:"=",panel:"=",row:"="},attrs:{dashboard:"dashboard",panel:"panel",class:"panel-height-helper"}},s=Me.ZP.panels[e.panel.type];return(0,Ie.U)(s.id).then((e=>{const i=e.angularPanelCtrl;return r.Component=i,!i||i.registered?r:i.templatePromise?i.templatePromise.then((e=>r)):(s&&(i.templateUrl=o(i.templateUrl,s.baseUrl)),i.templatePromise=function(e){if(e.template)return Promise.resolve(e.template);const i=n.get(e.templateUrl);return i?Promise.resolve(i):t.get(e.templateUrl).then((e=>e.data))}(i).then((e=>(i.templateUrl=null,i.template=`<grafana-panel ctrl="ctrl" class="panel-height-helper">${e}</grafana-panel>`,r))),i.templatePromise)}))}function a(t,n,i,r){if(r.notFound)n.empty();else{if(!r.Component)throw{message:"Failed to find exported plugin component for "+r.name};if(!r.Component.registered){const e=i.$normalize(r.name),t=((a=r).Component.templateUrl=o(a.Component.templateUrl,a.baseUrl),()=>({templateUrl:a.Component.templateUrl,template:a.Component.template,restrict:"E",controller:a.Component,controllerAs:"ctrl",bindToController:!0,scope:a.bindings,link:(e,t,n,i)=>{i.link&&i.link(e,t,n,i),i.init&&i.init()}}));l.ZP.directive(e,t),r.Component.registered=!0}var a;!function(t,n,i){const o=u().element(document.createElement(i.name));(0,v.each)(i.attrs,((e,t)=>{o.attr(t,e)})),e(o)(t),n.empty(),setTimeout((()=>{t.$applyAsync((()=>{n.append(o),setTimeout((()=>{t.$applyAsync((()=>{t.$broadcast(s.PanelEvents.componentDidMount.name)}))}))}))}))}(t,n,r)}}return{restrict:"E",link:(e,t,n)=>{(function(e,t){switch(t.type){case"query-ctrl":{const t=e.ctrl.datasource;return Promise.resolve({baseUrl:t.meta.baseUrl,name:"query-ctrl-"+t.meta.id,bindings:{target:"=",panelCtrl:"=",datasource:"="},attrs:{target:"ctrl.target","panel-ctrl":"ctrl",datasource:"ctrl.datasource"},Component:t.components.QueryCtrl})}case"annotations-query-ctrl":{const t=e.ctrl.currentDatasource.meta.baseUrl,n=e.ctrl.currentDatasource.meta.id;return(0,je.nL)(e.ctrl.currentDatasource.meta).then((e=>({baseUrl:t,name:"annotations-query-ctrl-"+n,bindings:{annotation:"=",datasource:"="},attrs:{annotation:"ctrl.currentAnnotation",datasource:"ctrl.currentDatasource"},Component:e.components.AnnotationsQueryCtrl})))}case"datasource-config-ctrl":{const t=e.ctrl.datasourceMeta,n=i.url();return(0,je.nL)(t).then((o=>(e.$watch("ctrl.current",(()=>{n===i.url()&&e.onModelChanged(e.ctrl.current)}),!0),{baseUrl:t.baseUrl,name:"ds-config-"+t.id,bindings:{meta:"=",current:"="},attrs:{meta:"ctrl.datasourceMeta",current:"ctrl.current"},Component:o.angularConfigCtrl})))}case"app-config-ctrl":{const t=e.ctrl.model;return(0,je.Av)(t).then((e=>({baseUrl:t.baseUrl,name:"app-config-"+t.id,bindings:{appModel:"=",appEditCtrl:"="},attrs:{"app-model":"ctrl.model","app-edit-ctrl":"ctrl"},Component:e.angularConfigCtrl})))}case"panel":return r(e);default:return Promise.reject({message:"Could not find component type: "+t.type})}})(e,n).then((i=>{a(e,t,n,i)})).catch((e=>{console.error("Plugin component error",e)}))}}}qe.$inject=["$compile","$http","$templateCache","$location"],l.ZP.directive("pluginComponent",qe);var Fe=n(5831),Re=n(19281),_e=n(58170);class Ne{constructor(e,t,n,i,o,r){(0,a.setAngularLoader)(o),(0,a.setLegacyAngularInjector)(r),(0,a.setAppEvents)(Fe.Z),(0,Re.Bp)(),e.init=()=>{e.contextSrv=i,e.appSubUrl=Me.ZP.appSubUrl,e._=b(),t.init()},n.colors=X.colors,n.onAppEvent=function(e,t,i){let o;o="string"==typeof e?n.$on(e,t):n.$on(e.name,t);let r=this;1!==r.$id||i||console.warn("warning rootScope onAppEvent called without localscope"),i&&(r=i),r.$on("$destroy",o)},n.appEvent=(e,t)=>{"string"==typeof e?(n.$emit(e,t),Fe.Z.emit(e,t)):(n.$emit(e.name,t),Fe.Z.emit(e,t))},e.init()}}Ne.$inject=["$scope","utilSrv","$rootScope","contextSrv","angularLoader","$injector"],l.ZP.directive("grafanaApp",(function(){return{restrict:"E",controller:Ne,link:(e,t)=>{const n=z()("body");z().fn.modal.Constructor.prototype.enforceFocus=()=>{},Fe.Z.on(_e.RW.Ai,(()=>{n.toggleClass("sidemenu-hidden")}));let i=(new Date).getTime(),o=!0;function r(){i=(new Date).getTime(),o||(o=!0,n.removeClass("view-mode--inactive"))}n.mousemove(r),n.keydown(r),document.addEventListener("wheel",r,{capture:!0,passive:!0}),document.addEventListener("visibilitychange",r),setInterval((function(){o&&n.hasClass("page-dashboard")&&(new Date).getTime()-i>3e5&&(o=!1,n.addClass("view-mode--inactive"))}),2e3),n.click((e=>{const i=z()(e.target);if(0===i.parents().length)return;n.find(".dropdown-menu-open").removeClass("dropdown-menu-open");const o=i.closest("[data-click-hide]");if(o.length){const e=o.parent();o.detach(),setTimeout((()=>{e.append(o)}),100)}const r=t.find(".popover");r.length>0&&0===i.parents(".graph-legend").length&&r.hide()}))}}}));n(62405),n(91118),n(6002),n(526);var ze=n(61959),Ze=n(36103),We=n(75478),Ve=n(60974);class Ue{constructor(){var e,t,n;n=()=>{},(t="$get")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,(0,a.navigationLogger)("Patch angular",!1,"RouteParamsProvider")}}class He{constructor(){(0,a.navigationLogger)("Patch angular",!1,"RouteProvider")}$get(){return this}}var Be=n(63773);function Qe(){l.hF.config(["$provide",e=>{e.decorator("$browser",["$delegate",e=>(e.onUrlChange=()=>{},e.url=()=>"",e)])}]),l.hF.config(["$provide",e=>{e.decorator("$location",["$delegate",e=>new Be.O])}]),l.hF.provider("$route",He),l.hF.provider("$routeParams",Ue)}var Ge=n(98163),Ke=n(22305),Ye=n(42235),Je=n(7929);class Xe{constructor(){var e,t,n;n=void 0,(t="modalScope")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}init(){Fe.h.subscribe(c.le,(e=>this.showModal(e.payload))),Fe.h.subscribe(c.OW,this.hideModal.bind(this))}hideModal(){(0,s.deprecationWarning)("UtilSrv","hideModal",""),this.modalScope&&this.modalScope.dismiss&&this.modalScope.dismiss()}showModal(e){(0,s.deprecationWarning)("UtilSrv","showModal","publish ShowModalReactEvent")}}Xe.$inject=[];var et=n(54361);class tt{clearPromiseCaches(){(0,s.deprecationWarning)("annotations_srv.ts","clearPromiseCaches","DashboardQueryRunner")}getAnnotations(e){return(0,s.deprecationWarning)("annotations_srv.ts","getAnnotations","DashboardQueryRunner.getResult"),Promise.resolve({annotations:[],alertState:void 0})}getAlertStates(e){return(0,s.deprecationWarning)("annotations_srv.ts","getAlertStates","DashboardQueryRunner.getResult"),Promise.resolve(void 0)}getGlobalAnnotations(e){return(0,s.deprecationWarning)("annotations_srv.ts","getGlobalAnnotations","DashboardQueryRunner.getResult"),Promise.resolve([])}saveAnnotationEvent(e){return(0,s.deprecationWarning)("annotations_srv.ts","saveAnnotationEvent","api/saveAnnotation"),(0,et.xD)(e)}updateAnnotationEvent(e){return(0,s.deprecationWarning)("annotations_srv.ts","updateAnnotationEvent","api/updateAnnotation"),(0,et._E)(e)}deleteAnnotationEvent(e){return(0,s.deprecationWarning)("annotations_srv.ts","deleteAnnotationEvent","api/deleteAnnotation"),(0,et.Dl)(e)}translateQueryResult(e,t){(0,s.deprecationWarning)("annotations_srv.ts","translateQueryResult","DashboardQueryRunner/utils/translateQueryResult"),e.snapshotData&&delete(e=(0,v.cloneDeep)(e)).snapshotData;for(const n of t)n.source=e,n.color=e.iconColor,n.type=e.name,n.isRegion=n.timeEnd&&n.time!==n.timeEnd;return t}}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class it{constructor(){nt(this,"ngModuleDependencies",void 0),nt(this,"preBootModules",void 0),nt(this,"registerFunctions",void 0),this.preBootModules=[],this.ngModuleDependencies=[],this.registerFunctions={}}init(){u().module("grafana",[]).config(["$controllerProvider","$compileProvider","$filterProvider","$httpProvider","$provide",(e,t,n,i,o)=>{"development"!==Me.vc.buildInfo.env&&t.debugInfoEnabled(!1),i.useApplyAsync(!0),this.registerFunctions.controller=e.register,this.registerFunctions.directive=t.directive,this.registerFunctions.factory=o.factory,this.registerFunctions.service=o.service,this.registerFunctions.filter=n.register,o.decorator("$http",["$delegate","$templateCache",(e,t)=>{const n=e.get;return e.get=(e,i)=>(e.match(/\.html$/)&&(t.get(e)||(e+="?v="+(new Date).getTime())),n(e,i)),e}])}]),this.ngModuleDependencies=["grafana.core","ngSanitize","grafana","pasvaz.bindonce","react"],l.rb.forEach((e=>{this.useModule(e)})),u().module("grafana.services").service("dashboardLoaderSrv",Ze.Bg),l.ZP.factory("timeSrv",(()=>(0,We.$t)())),l.ZP.factory("templateSrv",(()=>(0,a.getTemplateSrv)())),re("footer",he.$_,[]),re("icon",X.Icon,["name","size","type",["onClick",{watchDepth:"reference",wrapApply:!0}]]),re("spinner",X.Spinner,["inline"]),re("helpModal",be.B,[]),re("pageHeader",ue.Z,["model","noTabs"]),re("emptyListCta",ce.Z,["title","buttonIcon","buttonLink","buttonTitle",["onClick",{watchDepth:"reference",wrapApply:!0}],"proTip","proTipLink","proTipLinkTitle","proTipTarget","infoBox","infoBoxTitle"]),re("searchField",ye.Um,["query","autoFocus",["onChange",{watchDepth:"reference"}],["onKeyDown",{watchDepth:"reference"}]]),re("searchResults",ye.sZ,["results","editable","selectors",["onSelectionChanged",{watchDepth:"reference"}],["onTagSelected",{watchDepth:"reference"}],["onFolderExpanding",{watchDepth:"reference"}],["onToggleSelection",{watchDepth:"reference"}]]),re("searchFilters",ye.fC,["allChecked","canMove","canDelete","tagFilterOptions","selectedStarredFilter","selectedTagFilter",["onSelectAllChanged",{watchDepth:"reference"}],["deleteItem",{watchDepth:"reference"}],["moveTo",{watchDepth:"reference"}],["onStarredFilterChange",{watchDepth:"reference"}],["onTagFilterChange",{watchDepth:"reference"}]]),re("tagFilter",ve.D,["tags",["onChange",{watchDepth:"reference"}],["tagOptions",{watchDepth:"reference"}]]),re("colorPicker",X.ColorPicker,["color",["onChange",{watchDepth:"reference",wrapApply:!0}]]),re("seriesColorPickerPopover",X.SeriesColorPickerPopoverWithTheme,["color","series","onColorChange","onToggleAxis"]),re("unitPicker",X.UnitPicker,["value","width",["onChange",{watchDepth:"reference",wrapApply:!0}]]),re("metricSelect",fe,["options","onChange","value","isSearchable","className","placeholder",["variables",{watchDepth:"reference"}]]),re("cloudMonitoringQueryEditor",le.W,["target","onQueryChange","onExecuteQuery",["events",{watchDepth:"reference"}],["datasource",{watchDepth:"reference"}],["templateSrv",{watchDepth:"reference"}]]),re("secretFormField",ke,["value","isConfigured","inputWidth","labelWidth","aria-label",["onReset",{watchDepth:"reference",wrapApply:!0}],["onChange",{watchDepth:"reference",wrapApply:!0}]]),re("graphContextMenu",X.GraphContextMenu,["x","y","itemsGroup",["onClose",{watchDepth:"reference",wrapApply:!0}],["getContextMenuSource",{watchDepth:"reference",wrapApply:!0}],["timeZone",{watchDepth:"reference",wrapApply:!0}]]),re("drilldownLinksEditor",X.DataLinksInlineEditor,["value","links","suggestions",["onChange",{watchDepth:"reference",wrapApply:!0}]]),re("lokiAnnotationsQueryEditor",Ce,["expr","maxLines","instant","onChange",["datasource",{watchDepth:"reference"}]]),re("datasourceHttpSettingsNext",X.DataSourceHttpSettings,["defaultUrl","showAccessOptions","dataSourceConfig","showForwardOAuthIdentityOption",["onChange",{watchDepth:"reference",wrapApply:!0}]]),re("folderPicker",se.E,["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}]]),re("timePickerSettings",ae.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}]]),re("clipboardButton",X.ClipboardButton,[["getText",{watchDepth:"reference",wrapApply:!0}]]),l.ZP.factory("backendSrv",(()=>(0,a.getBackendSrv)())),l.ZP.factory("contextSrv",(()=>Ge.Vt)),l.ZP.factory("dashboardSrv",(()=>(0,Ke.h4)())),l.ZP.factory("datasourceSrv",(()=>(0,a.getDataSourceSrv)())),l.ZP.factory("linkSrv",(()=>(0,Je.Bq)())),l.ZP.factory("validationSrv",(()=>Ye.t)),l.ZP.service("annotationsSrv",tt),l.ZP.service("utilSrv",Xe),Qe(),(0,je.kY)("angular",u()),(0,je.kY)("app/core/utils/promiseToDigest",{promiseToDigest:xe.E,__esModule:!0}),(0,je.kY)("app/plugins/sdk",Ve),(0,je.kY)("app/core/core_module",l.ZP),(0,je.kY)("app/core/core",{coreModule:l.ZP,appEvents:Fe.Z,contextSrv:ze.Vt,__esModule:!0}),$.fn.tooltip.defaults.animation=!1}useModule(e){return this.preBootModules?this.preBootModules.push(e):(0,v.extend)(e,this.registerFunctions),this.ngModuleDependencies.push(e.name),e}bootstrap(){const e=u().bootstrap(document.getElementById("ngRoot"),this.ngModuleDependencies);return function(e){e.oldInvoke=e.invoke,e.invoke=(t,n,i,o)=>{var r;const s=null==i||null===(r=i.$scope)||void 0===r?void 0:r.$parent;var a,l,c,h,u,p,d,f,m;return s&&(s.panel&&(n.panel=s.panel),s.dashboard&&(n.dashboard=s.dashboard),null!==(a=s.ctrl)&&void 0!==a&&a.target&&(n.panelCtrl=s.ctrl,n.datasource=s.ctrl.datasource,n.target=s.ctrl.target),null!==(l=s.ctrl)&&void 0!==l&&l.datasourceMeta&&(n.meta=s.ctrl.datasourceMeta,n.current=s.ctrl.current),null!==(c=s.ctrl)&&void 0!==c&&c.currentAnnotation&&(n.annotation=s.ctrl.currentAnnotation,n.datasource=s.ctrl.currentDatasource),s.isAppConfigCtrl&&(n.appEditCtrl=s.ctrl,n.appModel=s.ctrl.model),null!==(h=s.$parent)&&void 0!==h&&null!==(u=h.$parent)&&void 0!==u&&null!==(p=u.ctrl)&&void 0!==p&&p.appModel&&(n.appModel=null===(d=s.$parent)||void 0===d||null===(f=d.$parent)||void 0===f||null===(m=f.ctrl)||void 0===m?void 0:m.appModel)),e.oldInvoke(t,n,i,o)}}(e),e.invoke((()=>(this.preBootModules.forEach((e=>{(0,v.extend)(e,this.registerFunctions)})),()=>{}))),e}}},15866:(e,t,n)=>{"use strict";n.d(t,{k:()=>l});var i=n(82897),o=n(43215),r=n(91082),s=n(60301);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l extends r.q{constructor(e,t){super(e,t),a(this,"contextSrv",void 0),a(this,"datasourceSrv",void 0),a(this,"timeSrv",void 0),a(this,"templateSrv",void 0),a(this,"interval",void 0),a(this,"intervalMs",void 0),a(this,"resolution",void 0),a(this,"timeInfo",void 0),a(this,"skipDataOnInit",!1),a(this,"dataList",[]),a(this,"querySubscription",void 0),a(this,"useDataFrames",!1),a(this,"panelData",void 0),a(this,"panelDataObserver",{next:e=>{if(this.panelData=e,e.state===o.LoadingState.Error&&(this.loading=!1,this.processDataError(e.error)),e.state===o.LoadingState.Loading)return this.loading=!0,void this.angularDirtyCheck();if(e.request){const{timeInfo:t}=e.request;t&&(this.timeInfo=t)}if(e.timeRange&&(this.range=e.timeRange),this.useDataFrames)this.handleDataFrames(e.series);else{const t=e.series.map((e=>(0,o.toLegacyResponseData)(e)));this.handleQueryResult({data:t})}this.angularDirtyCheck()}}),this.contextSrv=t.get("contextSrv"),this.datasourceSrv=t.get("datasourceSrv"),this.timeSrv=t.get("timeSrv"),this.templateSrv=t.get("templateSrv"),this.panel.datasource=this.panel.datasource||null,this.events.on(o.PanelEvents.refresh,this.onMetricsPanelRefresh.bind(this)),this.events.on(o.PanelEvents.panelTeardown,this.onPanelTearDown.bind(this)),this.events.on(o.PanelEvents.componentDidMount,this.onMetricsPanelMounted.bind(this))}onMetricsPanelMounted(){const e=this.panel.getQueryRunner();this.querySubscription=e.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 e=this.panel.snapshotData;return(0,i.isArray)(e)||(e=e.data),this.panelData={state:o.LoadingState.Done,series:e,timeRange:this.range},this.$timeout((()=>{this.events.emit(o.PanelEvents.dataSnapshotLoad,e)}))}return delete this.error,this.loading=!0,this.datasourceSrv.get(this.panel.datasource,this.panel.scopedVars).then(this.issueQueries.bind(this)).catch((e=>{this.processDataError(e)}))}}processDataError(e){e.cancelled?console.log("Panel request cancelled",e):(this.error=e.message||"Request Error",e.data&&(e.data.message?this.error=e.data.message:e.data.error&&(this.error=e.data.error)),this.angularDirtyCheck())}angularDirtyCheck(){this.$scope.$root.$$phase||this.$scope.$digest()}updateTimeRange(e){this.datasource=e||this.datasource,this.range=this.timeSrv.timeRange();const t=(0,s.W1)(this.panel,this.range);this.timeInfo=t.timeInfo,this.range=t.timeRange}issueQueries(e){this.updateTimeRange(e),this.datasource=e;const t=this.panel;return t.getQueryRunner().run({datasource:t.datasource,queries:t.targets,panelId:t.id,dashboardId:this.dashboard.id,timezone:this.dashboard.getTimezone(),timeInfo:this.timeInfo,timeRange:this.range,maxDataPoints:t.maxDataPoints||this.width,minInterval:t.interval,scopedVars:t.scopedVars,cacheTimeout:t.cacheTimeout,transformations:t.transformations})}handleDataFrames(e){this.loading=!1,this.dashboard&&this.dashboard.snapshot&&(this.panel.snapshotData=e.map((e=>(0,o.toDataFrameDTO)(e))));try{this.events.emit(o.PanelEvents.dataFramesReceived,e)}catch(e){this.processDataError(e)}}handleQueryResult(e){this.loading=!1,this.dashboard.snapshot&&(this.panel.snapshotData=e.data),e&&e.data||(console.log("Data source query result invalid, missing data field:",e),e={data:[]});try{this.events.emit(o.PanelEvents.dataReceived,e.data)}catch(e){this.processDataError(e)}}}},91082:(e,t,n)=>{"use strict";n.d(t,{q:()=>c});var i=n(82897),o=n(43215),r=n(63773),s=n(78837),a=n(98163);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class c{constructor(e,t){var n,i;l(this,"panel",void 0),l(this,"error",void 0),l(this,"pluginName",""),l(this,"pluginId",""),l(this,"editorTabs",void 0),l(this,"$scope",void 0),l(this,"$injector",void 0),l(this,"$timeout",void 0),l(this,"editModeInitiated",!1),l(this,"containerHeight",void 0),l(this,"events",void 0),l(this,"loading",!1),l(this,"timing",void 0),l(this,"$location",void 0),l(this,"onPluginTypeChange",(e=>{})),this.panel=null!==(n=this.panel)&&void 0!==n?n:e.$parent.panel,this.dashboard=null!==(i=this.dashboard)&&void 0!==i?i:e.$parent.dashboard,this.$injector=t,this.$scope=e,this.$timeout=t.get("$timeout"),this.editorTabs=[],this.$location=new r.O,this.events=new o.EventBusSrv,this.timing={};const a=s.ZP.panels[this.panel.type];a&&(this.pluginId=a.id,this.pluginName=a.name),e.$on(o.PanelEvents.componentDidMount.name,(()=>this.panelDidMount()))}panelDidMount(){this.events.emit(o.PanelEvents.componentDidMount),this.events.emit(o.PanelEvents.initialized),this.dashboard.panelInitialized(this.panel)}renderingCompleted(){a.rv.renderingCompleted()}refresh(){this.panel.refresh()}publishAppEvent(e,t){this.$scope.$root.appEvent(e,t)}initEditMode(){this.editModeInitiated||(this.editModeInitiated=!0,this.events.emit(o.PanelEvents.editModeInitialized))}addEditorTab(e,t,n,o){const r={title:e,directiveFn:t,icon:o};(0,i.isString)(t)&&(r.directiveFn=()=>({templateUrl:t})),n?this.editorTabs.splice(n,0,r):this.editorTabs.push(r)}getExtendedMenu(){const e=[];return this.events.emit(o.PanelEvents.initPanelActions,e),e}async getAdditionalMenuItems(){return[]}otherPanelInFullscreenMode(){return this.dashboard.otherPanelInFullscreen(this.panel)}render(e){this.events.emit(o.PanelEvents.render,e)}}},88643:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(82897);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class r{constructor(e,t){var n,r,s,a,l;o(this,"target",void 0),o(this,"datasource",void 0),o(this,"panelCtrl",void 0),o(this,"panel",void 0),o(this,"hasRawMode",void 0),o(this,"error",void 0),o(this,"isLastQuery",void 0),this.$scope=e,this.$injector=t,this.panelCtrl=null!==(n=this.panelCtrl)&&void 0!==n?n:e.ctrl.panelCtrl,this.target=null!==(r=this.target)&&void 0!==r?r:e.ctrl.target,this.datasource=null!==(s=this.datasource)&&void 0!==s?s:e.ctrl.datasource,this.panel=null!==(a=null===(l=this.panelCtrl)||void 0===l?void 0:l.panel)&&void 0!==a?a:e.ctrl.panelCtrl.panel,this.isLastQuery=(0,i.indexOf)(this.panel.targets,this.target)===this.panel.targets.length-1}refresh(){this.panelCtrl.refresh()}}},2489:(e,t,n)=>{let i=n(11461);i.keys().forEach((e=>{i(e)}))},11938:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});const i=e=>t=>t.finally(e.$evalAsync)},90441:(e,t,n)=>{"use strict";n.d(t,{JX:()=>f,TQ:()=>p,Wz:()=>m,oZ:()=>d,uG:()=>u});var i,o=n(36636),r=n(82897),s=(n(68404),n(90923)),a=n(69783),l=n(91871),c=n(45916);const h=["instant","range"];const u=[{value:l.EM.Range,label:"Range",description:"Run query over a range of time."},{value:l.EM.Instant,label:"Instant",description:'Run query against a single point in time. For this query, the "To" time is used.'}];s.config.featureToggles.lokiLive&&u.push({value:l.EM.Stream,label:"Stream",description:"Run a query and keep sending results on an interval"});const p={value:1,label:"1/1"},d=[p].concat((0,r.map)([2,3,4,5,10],(e=>({value:e,label:"1/"+e}))));function f(e){var t,n;const{lineLimitValue:r,resolution:s,onRunQuery:p,runOnBlur:f,onChange:g}=e,v=null!==(t=e.query)&&void 0!==t?t:{};let b=null!==(n=v.queryType)&&void 0!==n?n:v.instant?l.EM.Instant:l.EM.Range;function y(e){const t=function(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}(v,h);g(Object.assign({},t,{queryType:e}))}return(0,c.jsxs)("div",{"aria-label":"Loki extra field",className:"gf-form-inline",children:[(0,c.jsxs)("div",{"data-testid":"queryTypeField",className:(0,o.cx)("gf-form explore-input-margin",o.css`
- flex-wrap: nowrap;
- `),"aria-label":"Query type field",children:[i||(i=(0,c.jsx)(a.InlineFormLabel,{width:"auto",children:"Query type"})),(0,c.jsx)(a.RadioButtonGroup,{options:u,value:b,onChange:e=>{y(e),f&&p()}})]}),(0,c.jsxs)("div",{"data-testid":"lineLimitField",className:(0,o.cx)("gf-form",o.css`
- flex-wrap: nowrap;
- `),"aria-label":"Line limit field",children:[(0,c.jsx)(a.InlineField,{label:"Line limit",tooltip:"Upper limit for number of log lines returned by query.",children:(0,c.jsx)(a.Input,{className:"width-4",placeholder:"auto",type:"number",min:0,onChange:function(e){v.maxLines!==m(e.currentTarget.value)&&function(e){const t=Object.assign({},v,{maxLines:m(e)});g(t)}(e.currentTarget.value)},onKeyDown:function(e){"Enter"===e.key&&p()},value:r,onBlur:()=>{f&&p()}})}),(0,c.jsx)(a.InlineField,{label:"Resolution",tooltip:"Resolution 1/1 sets step parameter of Loki metrics range queries such that each pixel corresponds to one data point. For better performance, lower resolutions can be picked. 1/2 only retrieves a data point for every other pixel, and 1/10 retrieves one data point per 10 pixels.",children:(0,c.jsx)(a.Select,{isSearchable:!1,onChange:function(e){const t=Object.assign({},v,{resolution:e.value});g(t)},options:d,value:s,"aria-label":"Select resolution"})})]})]})}function m(e){return 0===e.length?NaN:e.length>0&&(isNaN(+e)||+e<0)?0:+e}},91871:(e,t,n)=>{"use strict";let i,o,r;n.d(t,{EM:()=>o,ox:()=>i,sb:()=>r}),function(e){e.Stream="streams",e.Vector="vector",e.Matrix="matrix"}(i||(i={})),function(e){e.Range="range",e.Instant="instant",e.Stream="stream"}(o||(o={})),function(e){e.Backward="backward",e.Forward="forward"}(r||(r={}))},60974:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MetricsPanelCtrl:()=>c,PanelCtrl:()=>l,QueryCtrl:()=>h,loadPluginCss:()=>o.loadPluginCss});var i=n(43215),o=n(90923),r=n(15866),s=n(91082),a=n(88643);const l=(0,i.makeClassES5Compatible)(s.q),c=(0,i.makeClassES5Compatible)(r.k),h=(0,i.makeClassES5Compatible)(a.G)},526:()=>{!function(e){"use strict";e((function(){var t;e.support.transition=(t=function(){var e,t=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(e in n)if(void 0!==t.style[e])return n[e]}())&&{end:t}}))}(window.jQuery),function(e){"use strict";var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",(function(){n.parent().removeClass("open")}))};function i(){e(".dropdown-backdrop").remove(),e(t).each((function(){o(e(this)).removeClass("open")}))}function o(t){var n,i=t.attr("data-target");return i||(i=(i=t.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),(n=i&&e.find(i))&&n.length||(n=t.parent()),n}n.prototype={constructor:n,toggle:function(t){var n,r,s=e(this);if(!s.is(".disabled, :disabled"))return r=(n=o(s)).hasClass("open"),i(),r||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",i),n.toggleClass("open")),s.focus(),!1},keydown:function(n){var i,r,s,a,l;if(/(38|40|27)/.test(n.keyCode)&&(i=e(this),n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled"))){if(!(a=(s=o(i)).hasClass("open"))||a&&27==n.keyCode)return 27==n.which&&s.find(t).focus(),i.click();(r=e("[role=menu] li:not(.divider):visible a",s)).length&&(l=r.index(r.filter(":focus")),38==n.keyCode&&l>0&&l--,40==n.keyCode&&l<r.length-1&&l++,~l||(l=0),r.eq(l).focus())}}};var r=e.fn.dropdown;e.fn.dropdown=function(t){return this.each((function(){var i=e(this),o=i.data("dropdown");o||i.data("dropdown",o=new n(this)),"string"==typeof t&&o[t].call(i)}))},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=r,this},e(document).on("click.dropdown.data-api",i).on("click.dropdown.data-api",".dropdown form",(function(e){e.stopPropagation()})).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop((function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,(function(){t.$element.focus().trigger("shown")})):t.$element.focus().trigger("shown")})))},hide:function(t){t&&t.preventDefault();t=e.Event("hide"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var t=this;e(document).on("focusin.modal",(function(e){t.$element[0]===e.target||t.$element.has(e.target).length||t.$element.focus()}))},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",(function(t){27==t.which&&e.hide()})):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout((function(){t.$element.off(e.support.transition.end),t.hideModal()}),500);this.$element.one(e.support.transition.end,(function(){clearTimeout(n),t.hideModal()}))},hideModal:function(){var e=this;this.$element.hide(),this.backdrop((function(){e.removeBackdrop(),e.$element.trigger("hidden")}))},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&n;if(this.$backdrop=e('<div class="modal-backdrop '+n+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each((function(){var i=e(this),o=i.data("modal"),r=e.extend({},e.fn.modal.defaults,i.data(),"object"==typeof n&&n);o||i.data("modal",o=new t(this,r)),"string"==typeof n?o[n]():r.show&&o.show()}))},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',(function(t){var n=e(this),i=n.attr("href"),o=e.find(n.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),r=o.data("modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},o.data(),n.data());t.preventDefault(),o.modal(r).one("hide",(function(){n.focus()}))}))}(window.jQuery),function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,i){var o,r,s,a,l;for(this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.enabled=!0,l=(s=this.options.trigger.split(" ")).length;l--;)"click"==(a=s[l])?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):"manual"!=a&&(o="hover"==a?"mouseenter":"focus",r="hover"==a?"mouseleave":"blur",this.$element.on(o+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return(t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n,i=e.fn[this.type].defaults,o={};if(this._options&&e.each(this._options,(function(e,t){i[e]!=t&&(o[e]=t)}),this),!(n=e(t.currentTarget)[this.type](o).data(this.type)).options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(this.timeout&&clearTimeout(this.timeout),!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)},show:function(){var t,n,i,o,r,s,a=e.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(a),a.isDefaultPrevented())return;switch(t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),r="function"==typeof this.options.placement?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(e.find(this.options.container)):t.insertAfter(this.$element),n=this.getPosition(),i=t[0].offsetWidth,o=t[0].offsetHeight,r){case"bottom":s={top:n.top+n.height,left:n.left+n.width/2-i/2};break;case"top":s={top:n.top-o,left:n.left+n.width/2-i/2};break;case"left":s={top:n.top+n.height/2-o/2,left:n.left-i};break;case"right":s={top:n.top+n.height/2-o/2,left:n.left+n.width};break;case"topLeft":s={top:n.top-o,left:n.left+n.width/2-.1*i};break;case"topRight":s={top:n.top-o,left:n.left+n.width/2-.9*i};break;case"rightTop":s={top:n.top+n.height/2-.1*o,left:n.left+n.width};break;case"rightBottom":s={top:n.top+n.height/2-.9*o,left:n.left+n.width};break;case"bottomLeft":s={top:n.top+n.height,left:n.left+n.width/2-.1*i};break;case"bottomRight":s={top:n.top+n.height,left:n.left+n.width/2-.9*i};break;case"leftTop":s={top:n.top+n.height/2-.1*o,left:n.left-i};break;case"leftBottom":s={top:n.top+n.height/2-.9*o,left:n.left-i}}this.applyPlacement(s,r),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n,i,o,r,s=this.tip(),a=s[0].offsetWidth,l=s[0].offsetHeight;s.offset(e).addClass(t).addClass("in"),n=s[0].offsetWidth,i=s[0].offsetHeight,"top"==t&&i!=l&&(e.top=e.top+l-i,r=!0),"bottom"==t||"top"==t?(o=0,e.left<0&&(o=-2*e.left,e.left=0,s.offset(e),n=s[0].offsetWidth,i=s[0].offsetHeight),this.replaceArrow(o-a+n,n,"left")):this.replaceArrow(i-l,i,"top"),r&&s.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner").text(t),e.removeClass("fade in top bottom left right")},hide:function(){var t,n=this.tip(),i=e.Event("hide");if(this.$element.trigger(i),!i.isDefaultPrevented())return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?(t=setTimeout((function(){n.off(e.support.transition.end).detach()}),500),n.one(e.support.transition.end,(function(){clearTimeout(t),n.detach()}))):n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},tip:function(){return this.$tip=this.$tip||e(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(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each((function(){var i=e(this),o=i.data("tooltip"),r="object"==typeof n&&n;o||i.data("tooltip",o=new t(this,r)),"string"==typeof n&&o[n]()}))},e.fn.tooltip.Constructor=t,e.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},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t,n,i,o=this.element,r=o.closest("ul:not(.dropdown-menu)"),s=o.attr("data-target");s||(s=(s=o.attr("href"))&&s.replace(/.*(?=#[^\s]*$)/,"")),o.parent("li").hasClass("active")||(t=r.find(".active:last a")[0],i=e.Event("show",{relatedTarget:t}),o.trigger(i),i.isDefaultPrevented()||(n=e.find(s),this.activate(o.parent("li"),r),this.activate(n,n.parent(),(function(){o.trigger({type:"shown",relatedTarget:t})}))))},activate:function(t,n,i){var o=n.find("> .active"),r=i&&e.support.transition&&o.hasClass("fade");function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),r?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}r?o.one(e.support.transition.end,s):s(),o.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each((function(){var i=e(this),o=i.data("tab");o||i.data("tab",o=new t(this)),"string"==typeof n&&o[n]()}))},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',(function(t){t.preventDefault(),e(this).tab("show")}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),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=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value")||this.$element.val();return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source)?this.process(n):this},process:function(t){var n=this;return t=e.grep(t,(function(e){return n.matcher(e)})),(t=this.sorter(t)).length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){for(var t,n=[],i=[],o=[];t=e.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?i.push(t):o.push(t):n.push(t);return n.concat(i,o)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t?e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"})):e},render:function(t){var n=this;return t=e(t).map((function(t,i){return(t=e(n.options.item).attr("data-value",i)).find("a").html(n.highlighter(i)),t[0]})),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active").next();n.length||(n=e(this.$menu.find("li")[0])),n.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active").prev();t.length||(t=this.$menu.find("li").last()),t.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},destroy:function(){this.$element.off().removeData("typeahead"),this.$menu.off()},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t="function"==typeof this.$element[e]),t},move:function(e){if(this.shown&&(!e.shiftKey||40!==e.keyCode)){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27,57]),this.move(t)},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.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()}13===e.keyCode&&void 0===this.$menu.find(".active").attr("data-value")?this.$element.submit():(e.stopPropagation(),e.preventDefault())},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each((function(){var i=e(this),o=i.data("typeahead"),r="object"==typeof n&&n;o||i.data("typeahead",o=new t(this,r)),"string"==typeof n&&o[n]()}))},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',(function(t){var n=e(this);n.data("typeahead")||n.typeahead(n.data())}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy((function(){setTimeout(e.proxy(this.checkPosition,this),1)}),this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t,n=e(document).height(),i=this.$window.scrollTop(),o=this.$element.offset(),r=this.options.offset,s=r.bottom,a=r.top;"object"!=typeof r&&(s=a=r),"function"==typeof a&&(a=r.top()),"function"==typeof s&&(s=r.bottom()),t=!(null!=this.unpin&&i+this.unpin<=o.top)&&(null!=s&&o.top+this.$element.height()>=n-s?"bottom":null!=a&&i<=a&&"top"),this.affixed!==t&&(this.affixed=t,this.unpin="bottom"==t?o.top-i:null,this.$element.removeClass("affix affix-top affix-bottom").addClass("affix"+(t?"-"+t:"")))}};var n=e.fn.affix;e.fn.affix=function(n){return this.each((function(){var i=e(this),o=i.data("affix"),r="object"==typeof n&&n;o||i.data("affix",o=new t(this,r)),"string"==typeof n&&o[n]()}))},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",(function(){e('[data-spy="affix"]').each((function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)}))}))}(window.jQuery)},90402:()=>{!function(e){"use strict";var t={tagClass:function(e){return"label label-info"},itemValue:function(e){return e?e.toString():e},itemText:function(e){return this.itemValue(e)},freeInput:!0,maxTags:void 0,confirmKeys:[13],onTagExists:function(e,t){t.hide().fadeIn()}};function n(t,n){this.itemsArray=[],this.$element=e(t),this.$element.hide(),this.widthClass=n.widthClass||"width-9",this.isSelect="SELECT"===t.tagName,this.multiple=this.isSelect&&t.hasAttribute("multiple"),this.objectItems=n&&n.itemValue,this.placeholderText=t.hasAttribute("placeholder")?this.$element.attr("placeholder"):"",this.$container=e('<div class="bootstrap-tagsinput"></div>'),this.$input=e('<input class="gf-form-input '+this.widthClass+'" type="text" placeholder="'+this.placeholderText+'"/>').appendTo(this.$container),this.$element.after(this.$container),this.build(n)}function i(e,t){if("function"!=typeof e[t]){var n=e[t];e[t]=function(e){return e[n]}}}n.prototype={constructor:n,add:function(t,n){var i=this;if(!(i.options.maxTags&&i.itemsArray.length>=i.options.maxTags)&&(!1===t||t)){if("object"==typeof t&&!i.objectItems)throw"Can't add objects when itemValue option is not set";if(!t.toString().match(/^\s*$/)){if(i.isSelect&&!i.multiple&&i.itemsArray.length>0&&i.remove(i.itemsArray[0]),"string"==typeof t&&"INPUT"===this.$element[0].tagName){var o=t.split(",");if(o.length>1){for(var s=0;s<o.length;s++)this.add(o[s],!0);return void(n||i.pushVal())}}var a=i.options.itemValue(t),l=i.options.itemText(t),c=i.options.tagClass(t),h=e.grep(i.itemsArray,(function(e){return i.options.itemValue(e)===a}))[0];if(h){if(i.options.onTagExists){var u=e(".tag",i.$container).filter((function(){return e(this).data("item")===h}));i.options.onTagExists(t,u)}}else{i.itemsArray.push(t);var p=e('<span class="tag '+r(c)+'">'+r(l)+'<span data-role="remove"></span></span>');if(p.data("item",t),i.findInputWrapper().before(p),p.after(" "),i.isSelect&&!e('option[value="'+escape(a)+'"]',i.$element)[0]){var d=e("<option selected>"+r(l)+"</option>");d.data("item",t),d.attr("value",a),i.$element.append(d)}n||i.pushVal(),i.options.maxTags===i.itemsArray.length&&i.$container.addClass("bootstrap-tagsinput-max"),i.$element.trigger(e.Event("itemAdded",{item:t}))}}}},remove:function(t,n){var i=this;i.objectItems&&(t="object"==typeof t?e.grep(i.itemsArray,(function(e){return i.options.itemValue(e)==i.options.itemValue(t)}))[0]:e.grep(i.itemsArray,(function(e){return i.options.itemValue(e)==t}))[0]),t&&(e(".tag",i.$container).filter((function(){return e(this).data("item")===t})).remove(),e("option",i.$element).filter((function(){return e(this).data("item")===t})).remove(),i.itemsArray.splice(e.inArray(t,i.itemsArray),1)),n||i.pushVal(),i.options.maxTags>i.itemsArray.length&&i.$container.removeClass("bootstrap-tagsinput-max"),i.$element.trigger(e.Event("itemRemoved",{item:t}))},removeAll:function(){var t=this;for(e(".tag",t.$container).remove(),e("option",t.$element).remove();t.itemsArray.length>0;)t.itemsArray.pop();t.pushVal(),t.options.maxTags&&!this.isEnabled()&&this.enable()},refresh:function(){var t=this;e(".tag",t.$container).each((function(){var n=e(this),i=n.data("item"),o=t.options.itemValue(i),s=t.options.itemText(i),a=t.options.tagClass(i);(n.attr("class",null),n.addClass("tag "+r(a)),n.contents().filter((function(){return 3==this.nodeType}))[0].nodeValue=r(s),t.isSelect)&&e("option",t.$element).filter((function(){return e(this).data("item")===i})).attr("value",o)}))},items:function(){return this.itemsArray},pushVal:function(){var t=this,n=e.map(t.items(),(function(e){return t.options.itemValue(e).toString()}));t.$element.val(n,!0).trigger("change")},build:function(n){var o=this;o.options=e.extend({},t,n);var r=o.options.typeahead||{};o.objectItems&&(o.options.freeInput=!1),i(o.options,"itemValue"),i(o.options,"itemText"),i(o.options,"tagClass"),o.options.source&&(r.source=o.options.source),r.source&&e.fn.typeahead&&(!function(e,t){if("function"!=typeof e[t]){var n=e[t];e[t]=function(){return n}}}(r,"source"),o.$input.typeahead({source:function(t,n){function i(e){for(var t=[],i=0;i<e.length;i++){var r=o.options.itemText(e[i]);s[r]=e[i],t.push(r)}n(t)}this.map={};var s=this.map,a=r.source(t);e.isFunction(a.success)?a.success(i):e.when(a).then(i)},updater:function(e){o.add(this.map[e])},matcher:function(e){return-1!==e.toLowerCase().indexOf(this.query.trim().toLowerCase())},sorter:function(e){return e.sort()},highlighter:function(e){var t=new RegExp("("+this.query+")","gi");return e.replace(t,"<strong>$1</strong>")}})),o.$container.on("click",e.proxy((function(e){o.$input.focus()}),o)),o.$container.on("blur","input",e.proxy((function(t){var n=e(t.target);o.add(n.val()),n.val(""),t.preventDefault()}),o)),o.$container.on("keydown","input",e.proxy((function(t){var n=e(t.target),i=o.findInputWrapper();switch(t.which){case 8:if(0===s(n[0])){var r=i.prev();r&&o.remove(r.data("item"))}break;case 46:if(0===s(n[0])){var a=i.next();a&&o.remove(a.data("item"))}break;case 37:var l=i.prev();0===n.val().length&&l[0]&&(l.before(i),n.focus());break;case 39:var c=i.next();0===n.val().length&&c[0]&&(c.after(i),n.focus());break;default:o.options.freeInput&&e.inArray(t.which,o.options.confirmKeys)>=0&&(o.add(n.val()),n.val(""),t.preventDefault())}n.attr("size",Math.max(this.inputSize,n.val().length))}),o)),o.$container.on("click","[data-role=remove]",e.proxy((function(t){o.remove(e(t.target).closest(".tag").data("item")),t.stopPropagation()}),o)),o.options.itemValue===t.itemValue&&("INPUT"===o.$element[0].tagName?o.add(o.$element.val()):e("option",o.$element).each((function(){o.add(e(this).attr("value"),!0)})))},destroy:function(){var e=this;e.$container.off("keypress","input"),e.$container.off("click","[role=remove]"),e.$container.remove(),e.$element.removeData("tagsinput"),e.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){for(var t=this.$input[0],n=this.$container[0];t&&t.parentNode!==n;)t=t.parentNode;return e(t)}},e.fn.tagsinput=function(t,i){var o=[];return this.each((function(){var r=e(this).data("tagsinput");if(r){var s=r[t](i);void 0!==s&&o.push(s)}else r=new n(this,t),e(this).data("tagsinput",r),o.push(r),"SELECT"===this.tagName&&e("option",e(this)).attr("selected","selected"),e(this).val(e(this).val())})),"string"==typeof t?o.length>1?o:o[0]:o},e.fn.tagsinput.Constructor=n;var o=e("<div />");function r(e){return e?o.text(e).html():""}function s(e){var t=0;if(document.selection){e.focus();var n=document.selection.createRange();n.moveStart("character",-e.value.length),t=n.text.length}else(e.selectionStart||"0"==e.selectionStart)&&(t=e.selectionStart);return t}e((function(){e("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput()}))}(window.jQuery)},6002:()=>{!function(){"use strict";var e=angular.module("pasvaz.bindonce",[]);e.directive("bindonce",(function(){var e=function(e){if(e&&0!==e.length){var t=angular.lowercase(""+e);e=!("f"===t||"0"===t||"false"===t||"no"===t||"n"===t||"[]"===t)}else e=!1;return e},t=parseInt((/msie (\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10);return isNaN(t)&&(t=parseInt((/trident\/.*; rv:(\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10)),{restrict:"AM",controller:["$scope","$element","$attrs","$interpolate",function(n,i,o,r){var s=function(t,n,i){var o="show"===n?"":"none",r="hide"===n?"":"none";t.css("display",e(i)?o:r)},a=function(e,t){if(angular.isObject(t)&&!angular.isArray(t)){var n=[];angular.forEach(t,(function(e,t){e&&n.push(t)})),t=n}t&&e.addClass(angular.isArray(t)?t.join(" "):t)};return{watcherRemover:void 0,binders:[],group:o.boName,element:i,ran:!1,addBinder:function(e){this.binders.push(e),this.ran&&this.runBinders()},setupWatcher:function(e){var t=this;this.watcherRemover=n.$watch(e,(function(e){void 0!==e&&(t.removeWatcher(),t.runBinders())}),!0)},removeWatcher:function(){void 0!==this.watcherRemover&&(this.watcherRemover(),this.watcherRemover=void 0)},runBinders:function(){for(;this.binders.length>0;){var n=this.binders.shift();if(!this.group||this.group==n.group){var i=n.scope.$eval(n.interpolate?r(n.value):n.value);switch(n.attr){case"boIf":e(i)&&n.transclude(n.scope.$new(),(function(e){var t=n.element.parent(),i=n.element&&n.element[n.element.length-1],o=t&&t[0]||i&&i.parentNode,r=i&&i.nextSibling||null;angular.forEach(e,(function(e){o.insertBefore(e,r)}))}));break;case"boSwitch":var o,l=n.controller[0];(o=l.cases["!"+i]||l.cases["?"])&&(n.scope.$eval(n.attrs.change),angular.forEach(o,(function(e){e.transclude(n.scope.$new(),(function(t){var n=e.element.parent(),i=e.element&&e.element[e.element.length-1],o=n&&n[0]||i&&i.parentNode,r=i&&i.nextSibling||null;angular.forEach(t,(function(e){o.insertBefore(e,r)}))}))})));break;case"boSwitchWhen":(c=n.controller[0]).cases["!"+n.attrs.boSwitchWhen]=c.cases["!"+n.attrs.boSwitchWhen]||[],c.cases["!"+n.attrs.boSwitchWhen].push({transclude:n.transclude,element:n.element});break;case"boSwitchDefault":var c;(c=n.controller[0]).cases["?"]=c.cases["?"]||[],c.cases["?"].push({transclude:n.transclude,element:n.element});break;case"hide":case"show":s(n.element,n.attr,i);break;case"class":a(n.element,i);break;case"text":n.element.text(i);break;case"html":n.element.html(i);break;case"style":n.element.css(i);break;case"src":n.element.attr(n.attr,i),t&&n.element.prop("src",i);break;case"attr":angular.forEach(n.attrs,(function(e,t){var i,o;t.match(/^boAttr./)&&n.attrs[t]&&(i=t.replace(/^boAttr/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=n.scope.$eval(n.attrs[t]),n.element.attr(i,o))}));break;case"href":case"alt":case"title":case"id":case"value":n.element.attr(n.attr,i)}}}this.ran=!0}}}],link:function(e,t,n,i){void 0!==(!n.bindonce||e.$eval(n.bindonce))?i.runBinders():(i.setupWatcher(n.bindonce),t.bind("$destroy",i.removeWatcher))}}})),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(t){return e.directive(t.directiveName,(function(){return{priority:t.priority||200,transclude:t.transclude||!1,terminal:t.terminal||!1,require:["^bindonce"].concat(t.require||[]),controller:t.controller,compile:function(e,n,i){return function(e,n,o,r){var s=r[0],a=o.boParent;if(a&&s.group!==a){var l,c=s.element.parent();for(s=void 0;9!==c[0].nodeType&&c.length;){if((l=c.data("$bindonceController"))&&l.group===a){s=l;break}c=c.parent()}if(!s)throw new Error("No bindonce controller: "+a)}s.addBinder({element:n,attr:t.attribute||t.directiveName,attrs:o,value:o[t.directiveName],interpolate:t.interpolate,group:a,transclude:i,controller:r.slice(1),scope:e})}}}}))}))}()},45992:()=>{!function(e,t){"use strict";function n(e,t){var n=[],i=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,(function(e,t,i,o){var r="?"===o||"*?"===o,s="*"===o||"*?"===o;return n.push({name:i,optional:r}),t=t||"",(r?"(?:"+t:t+"(?:")+(s?"(.+?)":"([^/]+)")+(r?"?)?":")")})).replace(/([/$*])/g,"\\$1");return t.ignoreTrailingSlashes&&(i=i.replace(/\/+$/,"")+"/*"),{keys:n,regexp:new RegExp("^"+i+"(?:[?#]|$)",t.caseInsensitiveMatch?"i":"")}}var i,o,r,s,a,l=t.module("ngRoute",[]).info({angularVersion:"1.8.3"}).provider("$route",(function(){function e(e,n){return t.extend(Object.create(e),n)}i=t.isArray,o=t.isObject,r=t.isDefined,s=t.noop;var l={};this.when=function(e,r){var s=function(e,t){if(i(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(o(e))for(var s in t=t||{},e)"$"===s.charAt(0)&&"$"===s.charAt(1)||(t[s]=e[s]);return t||e}(r);if(t.isUndefined(s.reloadOnUrl)&&(s.reloadOnUrl=!0),t.isUndefined(s.reloadOnSearch)&&(s.reloadOnSearch=!0),t.isUndefined(s.caseInsensitiveMatch)&&(s.caseInsensitiveMatch=this.caseInsensitiveMatch),l[e]=t.extend(s,{originalPath:e},e&&n(e,s)),e){var a="/"===e[e.length-1]?e.substr(0,e.length-1):e+"/";l[a]=t.extend({originalPath:e,redirectTo:e},n(a,s))}return this},this.caseInsensitiveMatch=!1,this.otherwise=function(e){return"string"==typeof e&&(e={redirectTo:e}),this.when(null,e),this},a=!0,this.eagerInstantiationEnabled=function(e){return r(e)?(a=e,this):a},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(n,i,o,r,a,h,u,p){var d,f,m=!1,g={routes:l,reload:function(){m=!0;var e={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0,m=!1}};n.$evalAsync((function(){v(e),e.defaultPrevented||b()}))},updateParams:function(e){if(!this.current||!this.current.$$route)throw c("norout","Tried updating route with no current route");e=t.extend({},this.current.params,e),i.path(C(this.current.$$route.originalPath,e)),i.search(e)}};return n.$on("$locationChangeStart",v),n.$on("$locationChangeSuccess",b),g;function v(o){var r,s,a,c,h=g.current;t.forEach(l,(function(n,o){!s&&(r=function(e,t){var n=t.keys,i={};if(!t.regexp)return null;var o=t.regexp.exec(e);if(!o)return null;for(var r=1,s=o.length;r<s;++r){var a=n[r-1],l=o[r];a&&l&&(i[a.name]=l)}return i}(i.path(),n))&&((s=e(n,{params:t.extend({},i.search(),r),pathParams:r})).$$route=n)})),d=s||l.null&&e(l.null,{params:{},pathParams:{}}),a=d,c=h,(f=!m&&a&&c&&a.$$route===c.$$route&&(!a.reloadOnUrl||!a.reloadOnSearch&&t.equals(a.pathParams,c.pathParams)))||!h&&!d||n.$broadcast("$routeChangeStart",d,h).defaultPrevented&&o&&o.preventDefault()}function b(){var e=g.current,i=d;if(f)e.params=i.params,t.copy(e.params,o),n.$broadcast("$routeUpdate",e);else if(i||e){m=!1,g.current=i;var a=r.resolve(i);p.$$incOutstandingRequestCount("$route"),a.then(y).then(w).then((function(r){return r&&a.then($).then((function(r){i===g.current&&(i&&(i.locals=r,t.copy(i.params,o)),n.$broadcast("$routeChangeSuccess",i,e))}))})).catch((function(t){i===g.current&&n.$broadcast("$routeChangeError",i,e,t)})).finally((function(){p.$$completeOutstandingRequest(s,"$route")}))}}function y(e){var n={route:e,hasRedirection:!1};if(e)if(e.redirectTo)if(t.isString(e.redirectTo))n.path=C(e.redirectTo,e.params),n.search=e.params,n.hasRedirection=!0;else{var o=i.path(),s=i.search(),l=e.redirectTo(e.pathParams,o,s);t.isDefined(l)&&(n.url=l,n.hasRedirection=!0)}else if(e.resolveRedirectTo)return r.resolve(a.invoke(e.resolveRedirectTo)).then((function(e){return t.isDefined(e)&&(n.url=e,n.hasRedirection=!0),n}));return n}function w(e){var t=!0;if(e.route!==g.current)t=!1;else if(e.hasRedirection){var n=i.url(),o=e.url;o?i.url(o).replace():o=i.path(e.path).search(e.search).replace().url(),o!==n&&(t=!1)}return t}function $(e){if(e){var n=t.extend({},e.resolve);t.forEach(n,(function(e,i){n[i]=t.isString(e)?a.get(e):a.invoke(e,null,null,i)}));var i=function(e){var n,i;t.isDefined(n=e.template)?t.isFunction(n)&&(n=n(e.params)):t.isDefined(i=e.templateUrl)&&(t.isFunction(i)&&(i=i(e.params)),t.isDefined(i)&&(e.loadedTemplateUrl=u.valueOf(i),n=h(i)));return n}(e);return t.isDefined(i)&&(n.$template=i),r.all(n)}}function C(e,n){var i=[];return t.forEach((e||"").split(":"),(function(e,t){if(0===t)i.push(e);else{var o=e.match(/(\w+)(?:[?*])?(.*)/),r=o[1];i.push(n[r]),i.push(o[2]||""),delete n[r]}})),i.join("")}}]})).run(h),c=t.$$minErr("ngRoute");function h(e){a&&e.get("$route")}function u(e,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(o,r,s,a,l){var c,h,u,p=s.autoscroll,d=s.onload||"";function f(){u&&(i.cancel(u),u=null),c&&(c.$destroy(),c=null),h&&((u=i.leave(h)).done((function(e){!1!==e&&(u=null)})),h=null)}function m(){var s=e.current&&e.current.locals,a=s&&s.$template;if(t.isDefined(a)){var u=o.$new(),m=e.current,g=l(u,(function(e){i.enter(e,null,h||r).done((function(e){!1===e||!t.isDefined(p)||p&&!o.$eval(p)||n()})),f()}));h=g,(c=m.scope=u).$emit("$viewContentLoaded"),c.$eval(d)}else f()}o.$on("$routeChangeSuccess",m),m()}}}function p(e,t,n){return{restrict:"ECA",priority:-400,link:function(i,o){var r=n.current,s=r.locals;o.html(s.$template);var a=e(o.contents());if(r.controller){s.$scope=i;var l=t(r.controller,s);r.controllerAs&&(i[r.controllerAs]=l),o.data("$ngControllerController",l),o.children().data("$ngControllerController",l)}i[r.resolveAs||"$resolve"]=s,a(i)}}}h.$inject=["$injector"],l.provider("$routeParams",(function(){this.$get=function(){return{}}})),l.directive("ngView",u),l.directive("ngView",p),u.$inject=["$route","$anchorScroll","$animate"],p.$inject=["$compile","$controller","$route"]}(window,window.angular)},62405:(e,t,n)=>{n(45992),e.exports="ngRoute"},98829:()=>{!function(e,t){"use strict";var n,i,o,r,s,a,l,c,h,u,p=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",(function(){var d=!1,f=!1;this.$get=["$$sanitizeUri",function(e){return d=!0,f&&i(S,k),function(t){var n=[];return h(t,u(n,(function(t,n){return!/^unsafe:/.test(e(t,n))}))),n.join("")}}],this.enableSvg=function(e){return s(e)?(f=e,this):f},this.addValidElements=function(e){return d||(r(e)&&(e={htmlElements:e}),L(k,e.svgElements),L(v,e.htmlVoidElements),L(S,e.htmlVoidElements),L(S,e.htmlElements)),this},this.addValidAttrs=function(e){return d||i(P,M(e,!0)),this},n=t.bind,i=t.extend,o=t.forEach,r=t.isArray,s=t.isDefined,a=t.$$lowercase,l=t.noop,h=function(e,t){null==e?e="":"string"!=typeof e&&(e=""+e);var n=O(e);if(!n)return"";var i=5;do{if(0===i)throw p("uinput","Failed to sanitize html because the input is unstable");i--,e=n.innerHTML,n=O(e)}while(e!==n.innerHTML);var o=n.firstChild;for(;o;){switch(o.nodeType){case 1:t.start(o.nodeName.toLowerCase(),I(o.attributes));break;case 3:t.chars(o.textContent)}var r;if(!((r=o.firstChild)||(1===o.nodeType&&t.end(o.nodeName.toLowerCase()),r=F("nextSibling",o))))for(;null==r&&(o=F("parentNode",o))!==n;)r=F("nextSibling",o),1===o.nodeType&&t.end(o.nodeName.toLowerCase());o=r}for(;o=n.firstChild;)n.removeChild(o)},u=function(e,t){var i=!1,r=n(e,e.push);return{start:function(e,n){e=a(e),!i&&x[e]&&(i=e),i||!0!==S[e]||(r("<"),r(e),o(n,(function(n,i){var o=a(i),s="img"===e&&"src"===o||"background"===o;!0!==P[o]||!0===T[o]&&!t(n,s)||(r(" "),r(i),r('="'),r(j(n)),r('"'))})),r(">"))},end:function(e){e=a(e),i||!0!==S[e]||!0===v[e]||(r("</"),r(e),r(">")),e==i&&(i=!1)},chars:function(e){i||r(j(e))}}},c=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))};var m=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=/([^#-~ |!])/g,v=D("area,br,col,hr,img,wbr"),b=D("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=D("rp,rt"),w=i({},y,b),$=i({},b,D("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")),C=i({},y,D("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")),k=D("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"),x=D("script,style"),S=i({},v,$,C,w),T=D("background,cite,href,longdesc,src,xlink:href,xml:base"),E=D("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=D("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),P=i({},T,A,E);function D(e,t){return M(e.split(","),t)}function M(e,t){var n,i={};for(n=0;n<e.length;n++)i[t?a(e[n]):e[n]]=!0;return i}function L(e,t){t&&t.length&&i(e,M(t))}var O=function(e,t){if(function(){try{return!!o("")}catch(e){return!1}}())return o;if(!t||!t.implementation)throw p("noinert","Can't create an inert html document");var n=t.implementation.createHTMLDocument("inert"),i=(n.documentElement||n.getDocumentElement()).querySelector("body");return function(e){i.innerHTML=e,t.documentMode&&q(i);return i};function o(t){t="<remove></remove>"+t;try{var n=(new e.DOMParser).parseFromString(t,"text/html").body;return n.firstChild.remove(),n}catch(e){return}}}(e,e.document);function I(e){for(var t={},n=0,i=e.length;n<i;n++){var o=e[n];t[o.name]=o.value}return t}function j(e){return e.replace(/&/g,"&").replace(m,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(g,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}function q(t){for(;t;){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,i=0,o=n.length;i<o;i++){var r=n[i],s=r.name.toLowerCase();"xmlns:ns1"!==s&&0!==s.lastIndexOf("ns1:",0)||(t.removeAttributeNode(r),i--,o--)}var a=t.firstChild;a&&q(a),t=F("nextSibling",t)}}function F(e,t){var n=t[e];if(n&&c.call(t,n))throw p("elclob","Failed to sanitize html because the element is clobbered: {0}",t.outerHTML||t.outerText);return n}})).info({angularVersion:"1.8.3"}),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((s?ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,o=t.$$minErr("linky"),r=t.isDefined,s=t.isFunction,a=t.isObject,c=t.isString;return function(t,h,p){if(null==t||""===t)return t;if(!c(t))throw o("notstring","Expected string but received: {0}",t);for(var d,f,m,g=s(p)?p:a(p)?function(){return p}:function(){return{}},v=t,b=[];d=v.match(n);)f=d[0],d[2]||d[4]||(f=(d[3]?"http://":"mailto:")+f),m=d.index,y(v.substr(0,m)),w(f,d[0].replace(i,"")),v=v.substring(m+d[0].length);return y(v),e(b.join(""));function y(e){var t,n;e&&b.push((t=e,u(n=[],l).chars(t),n.join("")))}function w(e,t){var n,i=g(e);for(n in b.push("<a "),i)b.push(n+'="'+i[n]+'" ');r(h)&&!("target"in i)&&b.push('target="',h,'" '),b.push('href="',e.replace(/"/g,"""),'">'),y(t),b.push("</a>")}}}])}(window,window.angular)},91118:(e,t,n)=>{n(98829),e.exports="ngSanitize"},97099:e=>{"use strict";function t(e){var t,n=this;if(!this._au){var i=n._debounce((function(){n.update()}),300);this._observer=new e((function(){o(),n.update(),i()})),this.on("init",(function(){n._observer.observe(n.root,{childList:!0,subtree:!0,characterData:!0}),o()})),this.on("dispose",(function(){n._observer.disconnect(),r(),delete n._observer})),this._au=!0}function o(){n.root[n.origin.offset]?r():function(){if(t)return;t=setInterval((function(){n.root[n.origin.offset]&&(r(),n.update())}),300)}()}function r(){clearInterval(t),t=null}}e.exports=function(e){var n=e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver||null;return function(){return n?(t.call(this,n),this):this}}},13734:(e,t,n)=>{"use strict";var i=n(32224).qs;e.exports=function(e){var t,n,o,r=this;n=e.screen||.9,e.forward&&(o={element:i(e.forward,this.clipper),handler:function(){var t=r.pos()+(e.delta||30);r.pos(t)},type:"click"},this._eventHandlers.push(o),this.event(o.element,o.type,o.handler,"on")),e.backward&&(o={element:i(e.backward,this.clipper),handler:function(){var t=r.pos()-(e.delta||30);r.pos(t)},type:"click"},this._eventHandlers.push(o),this.event(o.element,o.type,o.handler,"on")),e.track&&(t=!0===e.track?this.track:i(e.track,this.clipper))&&(o={element:t,handler:function(e){if(e.target==t){var i=e["offset"+r.origin.x],o=r.bar[r.origin.offsetPos],s=0;i<o?s=-1:i>o+r.bar[r.origin.offset]&&(s=1);var a=r.pos()+s*n*r.scroller[r.origin.client];r.pos(a)}},type:"mousedown"},this._eventHandlers.push(o),this.event(o.element,o.type,o.handler,"on"))}},93120:(e,t,n)=>{"use strict";var i=function(){return this||(0,eval)("this")}(),o=i&&i.window||i,r=n(32224).B,s=n(32224).iv,a=n(32224).IH,l=n(32224).e$,c=n(32224).rm,h=n(32224).d9,u=n(32224).qs,p=v,d=["left","top","right","bottom","width","height"],f=[],m={v:{x:"Y",pos:d[1],oppos:d[3],crossPos:d[0],crossOpPos:d[2],size:d[5],crossSize:d[4],crossMinSize:"min-"+d[4],crossMaxSize:"max-"+d[4],client:"clientHeight",crossClient:"clientWidth",scrollEdge:"scrollLeft",offset:"offsetHeight",crossOffset:"offsetWidth",offsetPos:"offsetTop",scroll:"scrollTop",scrollSize:"scrollHeight"},h:{x:"X",pos:d[0],oppos:d[2],crossPos:d[1],crossOpPos:d[3],size:d[4],crossSize:d[5],crossMinSize:"min-"+d[5],crossMaxSize:"max-"+d[5],client:"clientWidth",crossClient:"clientHeight",scrollEdge:"scrollTop",offset:"offsetWidth",crossOffset:"offsetHeight",offsetPos:"offsetLeft",scroll:"scrollLeft",scrollSize:"scrollWidth"}},g=/[\s\S]*Macintosh[\s\S]*\) Gecko[\s\S]*/.test(o.navigator&&o.navigator.userAgent);function v(e){var t,n,i=e&&e[0]||e,s="string"==typeof e||i instanceof HTMLElement?{root:e}:h(e),a={direction:"v",barOnCls:"_scrollbar",resizeDebounce:0,event:r,cssGuru:!1,impact:"scroller",position:"static"};for(var l in s=s||{},a)null==s[l]&&(s[l]=a[l]);t=this&&this instanceof o.jQuery,s._chain?n=s.root:t?s.root=n=this[0]:n=u(s.root||s.scroller);var c=w(n,s.direction),p=+c;if(s.index=p,p==p&&null!==c&&f[p])return f[p];s.root&&s.scroller?s.scroller=u(s.scroller,n):s.scroller=n,s.root=n;var d=function(e){var t=new v.prototype.constructor(e);y(t,e.event,"on"),w(t.root,e.direction,"on",f.length),f.push(t),!1;return t.update(),t}(s);return d.autoUpdate&&d.autoUpdate(),d}function b(){return(new Date).getTime()}function y(e,t,n){e._eventHandlers=e._eventHandlers||[{element:e.scroller,handler:function(t){e.scroll(t)},type:"scroll"},{element:e.root,handler:function(){e.update()},type:"transitionend animationend"},{element:e.scroller,handler:function(){e.update()},type:"keyup"},{element:e.bar,handler:function(t){t.preventDefault(),e.selection(),e.drag.now=1,e.draggingCls&&a(e.root,e.draggingCls)},type:"touchstart mousedown"},{element:document,handler:function(){e.selection(1),e.drag.now=0,e.draggingCls&&c(e.root,e.draggingCls)},type:"mouseup blur touchend"},{element:document,handler:function(t){2!=t.button&&e._pos0(t)},type:"touchstart mousedown"},{element:document,handler:function(t){e.drag.now&&e.drag(t)},type:"mousemove touchmove"},{element:o,handler:function(){e.update()},type:"resize"},{element:e.root,handler:function(){e.update()},type:"sizeChange"},{element:e.clipper,handler:function(){e.clipperOnScroll()},type:"scroll"}],function(e,t){var n=0,i=e;for(void 0!==i.length&&i!==o||(i=[i]);i[n];)t.call(this,i[n],n),n++}(e._eventHandlers,(function(e){if(e.element)if(e.element.length&&e.element!==o)for(var i=0;i<e.element.length;i++)t(e.element[i],e.type,e.handler,n);else t(e.element,e.type,e.handler,n)}))}function w(e,t,n,i){var o="data-baron-"+t+"-id";return"on"==n?e.setAttribute(o,i):"off"==n&&e.removeAttribute(o),e.getAttribute(o)}function $(e){if(this.events&&this.events[e])for(var t=0;t<this.events[e].length;t++){var n=Array.prototype.slice.call(arguments,1);this.events[e][t].apply(this,n)}}v.prototype={_debounce:function(e,t){var n,i,o=this,r=function(){if(o._disposed)return clearTimeout(n),void(n=o=null);var s=b()-i;s<t&&s>=0?n=setTimeout(r,t-s):(n=null,e())};return function(){i=b(),n||(n=setTimeout(r,t))}},constructor:function(e){var t,n,i,r,h,p,d;function f(e){var t=this.barMinSize||20,n=e;n>0&&n<t&&(n=t),this.bar&&s(this.bar,this.origin.size,parseInt(n,10)+"px")}function v(e){if(this.bar){var t=s(this.bar,this.origin.pos),n=+e+"px";n&&n!=t&&s(this.bar,this.origin.pos,n)}}function y(){return i[this.origin.client]-this.barTopLimit-this.bar[this.origin.offset]}function w(e){return e*y.call(this)+this.barTopLimit}function C(e){return(e-this.barTopLimit)/y.call(this)}function k(){return!1}if(p=b(),this.params=e,this.event=e.event,this.events={},this.root=e.root,this.scroller=u(e.scroller),this.bar=u(e.bar,this.root),i=this.track=u(e.track,this.root),!this.track&&this.bar&&(i=this.bar.parentNode),this.clipper=this.scroller.parentNode,this.direction=e.direction,this.rtl=e.rtl,this.origin=m[this.direction],this.barOnCls=e.barOnCls,this.scrollingCls=e.scrollingCls,this.draggingCls=e.draggingCls,this.impact=e.impact,this.position=e.position,this.rtl=e.rtl,this.barTopLimit=0,this.resizeDebounce=e.resizeDebounce,this.cursor=function(e){return e["client"+this.origin.x]||(((e.originalEvent||e).touches||{})[0]||{})["page"+this.origin.x]},this.pos=function(e){var t="page"+this.origin.x+"Offset",n=this.scroller[t]?t:this.origin.scroll;return void 0!==e&&(this.scroller[n]=e),this.scroller[n]},this.rpos=function(e){var t=this.scroller[this.origin.scrollSize]-this.scroller[this.origin.client];return(e?this.pos(e*t):this.pos())/(t||1)},this.barOn=function(e){if(this.barOnCls){var t=this.scroller[this.origin.client]>=this.scroller[this.origin.scrollSize];e||t?l(this.root,this.barOnCls)&&c(this.root,this.barOnCls):l(this.root,this.barOnCls)||a(this.root,this.barOnCls)}},this._pos0=function(e){n=this.cursor(e)-t},this.drag=function(e){var t=C.call(this,this.cursor(e)-n),i=this.scroller[this.origin.scrollSize]-this.scroller[this.origin.client];this.scroller[this.origin.scroll]=t*i},this.selection=function(e){this.event(document,"selectpos selectstart",k,e?"off":"on")},this.resize=function(){var e=this,t=void 0===e.resizeDebounce?300:e.resizeDebounce,n=0;function i(){var t,n=e.scroller[e.origin.crossOffset],i=e.scroller[e.origin.crossClient],o=0;if(g?o=15:i>0&&0===n&&(n=i+17),n)if(e.barOn(),"scroller"==e.impact){var r=n-i+o;if("static"==e.position)s(e.scroller,e.origin.crossSize)!=(t=e.clipper[e.origin.crossClient]+r+"px")&&e._setCrossSizes(e.scroller,t);else{var a={},l=e.rtl?"Left":"Right";"h"==e.direction&&(l="Bottom"),a["padding"+l]=r+"px",s(e.scroller,a)}}else s(e.clipper,e.origin.crossSize)!=(t=i+"px")&&e._setCrossSizes(e.clipper,t);Array.prototype.unshift.call(arguments,"resize"),$.apply(e,arguments),p=b()}b()-p<t&&(clearTimeout(r),n=t),n?r=setTimeout(i,n):i()},this.updatePositions=function(e){var n,o=this;o.bar&&(n=(i[o.origin.client]-o.barTopLimit)*o.scroller[o.origin.client]/o.scroller[o.origin.scrollSize],(e||parseInt(d,10)!=parseInt(n,10))&&(f.call(o,n),d=n),t=w.call(o,o.rpos()),v.call(o,t)),Array.prototype.unshift.call(arguments,"scroll"),$.apply(o,arguments)},this.scroll=function(){var e=this;e.updatePositions(),e.scrollingCls&&(h||a(e.root,e.scrollingCls),clearTimeout(h),h=setTimeout((function(){c(e.root,e.scrollingCls),h=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(e,t){var n={};n[this.origin.crossSize]=t,n[this.origin.crossMinSize]=t,n[this.origin.crossMaxSize]=t,s(e,n)},this._dumbCss=function(t){if(!e.cssGuru){var n=t?"hidden":null,i=t?"none":null;s(this.clipper,{overflow:n,msOverflowStyle:i,position:"static"==this.position?"":"relative"});var o=t?"scroll":null,r={};r["overflow-"+("v"==this.direction?"y":"x")]=o,r["box-sizing"]="border-box",r.margin="0",r.border="0","absolute"==this.position&&(r.position="absolute",r.top="0","h"==this.direction?r.left=r.right="0":(r.bottom="0",r.right=this.rtl?"0":"",r.left=this.rtl?"":"0")),s(this.scroller,r)}},this._dumbCss(!0),g){var x="paddingRight",S={},T=o.getComputedStyle(this.scroller)[[x]];"h"==e.direction?x="paddingBottom":e.rtl&&(x="paddingLeft");var E=parseInt(T,10);E!=E&&(E=0),S[x]=15+E+"px",s(this.scroller,S)}return this},update:function(e){return $.call(this,"upd",e),this.resize(1),this.updatePositions(1),this},dispose:function(){y(this,this.event,"off"),w(this.root,this.params.direction,"off"),"v"==this.params.direction?this._setCrossSizes(this.scroller,""):this._setCrossSizes(this.clipper,""),this._dumbCss(!1),this.barOn(!0),$.call(this,"dispose"),f[this.params.index]=null,this.params=null,this._disposed=!0},on:function(e,t,n){for(var i=e.split(" "),o=0;o<i.length;o++)"init"==i[o]?t.call(this,n):(this.events[i[o]]=this.events[i[o]]||[],this.events[i[o]].push((function(e){t.call(this,e||n)})))},baron:function(e){return e.root=this.params.root,e.scroller=this.params.scroller,e.direction="v"==this.params.direction?"h":"v",e._chain=!0,v(e)}},v.prototype.constructor.prototype=v.prototype,v.noConflict=function(){return o.baron=p,v},v.version="3.0.1",v.prototype.autoUpdate=n(97099)(o),v.prototype.fix=n(86829),v.prototype.controls=n(13734),e.exports=v},86829:(e,t,n)=>{"use strict";n(18761);var i=n(32224).iv,o=n(32224).IH,r=n(32224).rm;e.exports=function(e){var t,n,s={outside:"",inside:"",before:"",after:"",past:"",future:"",radius:0,minView:0},a=[],l=[],c=[],h=this.scroller,u=this.event,p=this;function d(e,a,l){var c=a,h=1==l?"pos":"oppos";n<(s.minView||0)&&(c=void 0),i(t[e],this.origin.pos,""),i(t[e],this.origin.oppos,""),r(t[e],s.outside),void 0!==c&&(c+="px",i(t[e],this.origin[h],c),o(t[e],s.outside))}function f(e){try{var t=document.createEvent("WheelEvent");t.initWebKitWheelEvent(e.originalEvent.wheelDeltaX,e.originalEvent.wheelDeltaY),h.dispatchEvent(t),e.preventDefault()}catch(e){}}function m(e){var o;for(var r in e)s[r]=e[r];if(s.elements instanceof HTMLElement?t=[s.elements]:"string"==typeof s.elements?t=this.scroller.querySelectorAll(s.elements):s.elements&&s.elements[0]instanceof HTMLElement&&(t=s.elements),t){n=this.scroller[this.origin.client];for(var h=0;h<t.length;h++)(o={})[this.origin.size]=t[h][this.origin.offset]+"px",t[h].parentNode!==this.scroller&&i(t[h].parentNode,o),(o={})[this.origin.crossSize]=t[h].parentNode[this.origin.crossClient]+"px",i(t[h],o),n-=t[h][this.origin.offset],c[h]=t[h].parentNode[this.origin.offsetPos],a[h]=a[h-1]||0,l[h]=l[h-1]||Math.min(c[h],0),t[h-1]&&(a[h]+=t[h-1][this.origin.offset],l[h]+=t[h-1][this.origin.offset]),0==h&&0==c[h]||(this.event(t[h],"mousewheel",f,"off"),this.event(t[h],"mousewheel",f));s.limiter&&t[0]&&(this.track&&this.track!=this.scroller?((o={})[this.origin.pos]=t[0].parentNode[this.origin.offset]+"px",i(this.track,o)):this.barTopLimit=t[0].parentNode[this.origin.offset],this.scroll()),!1===s.limiter&&(this.barTopLimit=0)}var d={element:t,handler:function(){for(var e,n=this.parentNode.offsetTop,i=0;i<t.length;i++)t[i]===this&&(e=i);var o=n-a[e];s.scroll?s.scroll({x1:p.scroller.scrollTop,x2:o}):p.scroller.scrollTop=o},type:"click"};if(s.clickable){this._eventHandlers.push(d);for(var m=0;m<d.element.length;m++)u(d.element[m],d.type,d.handler,"on")}}this.on("init",m,e);var g=[],v=[];return this.on("init scroll",(function(){var e,i,h,u;if(t){var p;for(u=0;u<t.length;u++)e=0,c[u]-this.pos()<l[u]+s.radius?(e=1,i=a[u]):c[u]-this.pos()>l[u]+n-s.radius?(e=2,i=this.scroller[this.origin.client]-t[u][this.origin.offset]-a[u]-n):(e=3,i=void 0),h=!1,(c[u]-this.pos()<l[u]||c[u]-this.pos()>l[u]+n)&&(h=!0),e==g[u]&&h==v[u]||(d.call(this,u,i,e),g[u]=e,v[u]=h,p=!0);if(p)for(u=0;u<t.length;u++)1==g[u]&&s.past&&(o(t[u],s.past),r(t[u],s.future)),2==g[u]&&s.future&&(o(t[u],s.future),r(t[u],s.past)),3==g[u]&&(r(t[u],s.past),r(t[u],s.future),o(t[u],s.inside)),g[u]!=g[u+1]&&1==g[u]?(o(t[u],s.before),r(t[u],s.after)):g[u]!=g[u-1]&&2==g[u]?(o(t[u],s.after),r(t[u],s.before)):(r(t[u],s.before),r(t[u],s.after)),s.grad&&(v[u]?o(t[u],s.grad):r(t[u],s.grad))}})),this.on("resize upd",(function(e){m.call(this,e&&e.fix)})),this}},18761:e=>{e.exports=function(e,t,n){var i=console[e]||console.log,o=["Baron: "+t,n];Function.prototype.apply.call(i,console,o)}},32224:e=>{"use strict";var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,n)}catch(e){}function i(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}e.exports.B=function(e,n,i,o){var r=n.split(" "),s="on"==o?"add":"remove";r.forEach((function(n){var o=!1;-1!=["scroll","touchstart","touchmove"].indexOf(n)&&t&&(o={passive:!0}),e[s+"EventListener"](n,i,o)}))},e.exports.iv=function(e,t,n){var o;if(void 0===n){if("string"==typeof t)return e.style[t];o=t}else(o={})[t]=n;i(o,(function(t,n){e.style[t]=n}))},e.exports.IH=function(e,t){t&&e.classList.add(t)},e.exports.rm=function(e,t){t&&e.classList.remove(t)},e.exports.e$=function(e,t){return!!t&&e.classList.contains(t)},e.exports.d9=function(e){var t={};return i(e||{},(function(e,n){t[e]=n})),t},e.exports.qs=function(e,t){return e instanceof HTMLElement?e:(t||document).querySelector(e)}}}]);
- //# sourceMappingURL=8981.8c75d193e1386fe82cfd.js.map
|