You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

3 lines
67 KiB

/*! For license information please see module.js.LICENSE.txt */
define(["@emotion/css","@grafana/data","@grafana/runtime","@grafana/ui","app/core/app_events","app/core/core","lodash","react"],((t,e,r,n,o,i,a,s)=>(()=>{var c=[t=>{"use strict";t.exports=s},t=>{"use strict";t.exports=n},,,,,,,,,t=>{"use strict";t.exports=e},t=>{t.exports="object"==typeof self?self.FormData:window.FormData},,t=>{"use strict";t.exports=a},t=>{"use strict";t.exports=r},t=>{"use strict";t.exports=o},,,,,,,,,,,,,t=>{"use strict";t.exports=i},e=>{"use strict";e.exports=t}],u={};function l(t){var e=u[t];if(void 0!==e)return e.exports;var r=u[t]={exports:{}};return c[t](r,r.exports,l),r.exports}l.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return l.d(e,{a:e}),e},l.d=(t,e)=>{for(var r in e)l.o(e,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var f={};return(()=>{"use strict";var t,e,r;l.r(f),l.d(f,{plugin:()=>De}),function(t){t.INFLUXDB="influxdb",t.GRAPHITE="graphite",t.PROMETHEUS="prometheus",t.POSTGRES="postgres",t.ELASTICSEARCH="elasticsearch",t.MYSQL="mysql"}(t||(t={})),function(t){t.LOADING="Loading",t.DATASOURCE_ERROR="Datasource Error",t.PERMISSION_ERROR="Permission Error",t.OK="Ok"}(e||(e={})),function(t){t.EXPORTING="exporting",t.FINISHED="finished",t.ERROR="error"}(r||(r={}));var n=l(10);l(15);function o(){var t=window.location.toString(),e=new URL(t).pathname.match(/\/d\/([^/]+)/);if(e)return e[1];throw new Error("Can't get current dashboard uid. If it's a new dashboard, please save it first.")}function i(t){return t?new Date(t).toLocaleString("en-GB",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}):"-"}var a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACJSURBVHgB7ZPRCcAgDESv0lWc0zhC53OIjmAVUpCSamL76YEoyfFIiAGWfldK6SwnKHyhep9xJ3iPcqgH5RyxV1VlBWYJypXVHMEiCaqBbRhAy3W3B76j954wq6ZSVZsOY+WXt6i9l2ymGTlUq0VpOcIqaQC96Zth01DN1zBBefVI4SNp9Za+6wLcH6DKFrfpxgAAAABJRU5ErkJggg==",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAwklEQVR4nO2Syw3CMBBEc+AIlRAK4NMGn05QoAgIZwoiog2UEmBnN9KixY5wTLjk7JFWsnbsJ43GWZaUNExAsyOSKxEfVHXS9TADpHSDPPTsLhEf7S3QbD9LgwCi7RBJpaqjFkbEr69nZwe1O0Ry777lIgO4Dpc2zLxwQLnEHiBn85h59etx/Q8498CyB3jywGUP8GGRiyjyLYicR5GfAKZB5CqKvG9L2fhSClUdR6XkFtONgwWljK0DX8p64J9ISnoD5XdaQ/60uKsAAAAASUVORK5CYII=",c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMC41IiB5PSIwLjUiIHdpZHRoPSIxNSIgaGVpZ2h0PSIxNSIgcng9IjEuNSIgZmlsbD0iIzExMTIxNiIgc3Ryb2tlPSIjMkQyRTM0Ii8+Cjwvc3ZnPgo=",u="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiByeD0iMiIgZmlsbD0iIzRBNzFEMiIvPgo8cGF0aCBkPSJNNS45ODI2NCAxMi41MjE3QzUuNzczOTUgMTIuNTIxNyA1LjU4MjY0IDEyLjQ1MjIgNS40MjYxMiAxMi4yOTU2TDEuOTY1MjUgOC44MzQ3NkMxLjY1MjIxIDguNTIxNzIgMS42NTIyMSA4LjAzNDc2IDEuOTY1MjUgNy43MjE3MkMyLjI3ODI5IDcuNDA4NjcgMi43NjUyNSA3LjQwODY3IDMuMDc4MjkgNy43MjE3Mkw2LjAwMDAzIDEwLjYyNjFMMTIuOTM5MiAzLjcwNDMzQzEzLjI1MjIgMy4zOTEyOCAxMy43MzkyIDMuMzkxMjggMTQuMDUyMiAzLjcwNDMzQzE0LjM2NTMgNC4wMTczNyAxNC4zNjUzIDQuNTA0MzMgMTQuMDUyMiA0LjgxNzM3TDYuNTU2NTYgMTIuMjk1NkM2LjM4MjY0IDEyLjQ1MjIgNi4xOTEzNCAxMi41MjE3IDUuOTgyNjQgMTIuNTIxN1YxMi41MjE3WiIgZmlsbD0iI0ZFRkZGRiIvPgo8L3N2Zz4K",p="data:image/gif;base64,R0lGODlhFAAUAJEAAPz6/Pz+/Pn5+wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQACACwAAAAAFAAUAAACMpSPqcuNEdyCUAoqAASGM5x5l5hs1ikB5AkyWqJFzQuv6A3LePvYXeABiHwTHe6IvBUAACH5BAkJAAIALAAAAAAUABQAAAIxlI+py40R3IJQCioABDnwWWUfBn6JZ6WGqXZRo50hEydsiyt3uk37+hIdfqCc8dgqAAAh+QQJCQACACwAAAAAFAAUAAACMpSPqcuNEdyC0IBGBYA3z6pdAiUmnOJJqrUmW9RsJsjIbourJX6iO2ILHX4YWO6IzBUAACH5BAkJAAIALAAAAAAUABQAAAIxlI+py40R3ILQgAYvyIIyLwBXxynb+FTSyjZb5MLH62ztjc85iT59IhPpWKqd8egoAAAh+QQJCQACACwAAAAAFAAUAAACMJSPqcuNEdwCEBjLqqDBwrh8F/ZhCWUeosS2DedoB9zI7o2nLhrqiAkAujq4otFYAAAh+QQJCQACACwAAAAAFAAUAAACMpSPqcuNAdwCAZrIaKS2BuYpHpZoYiWl6mGyaBa6H/yuAkTaTb62iZVhkXgNoO6I1BUAACH5BAkJAAIALAAAAAAUABQAAAIvlI+py40B3AIBSkEjtTWwroCTlYjXeVGhx2zsUTUueqh0ehvZQk51pEP1csTipQAAIfkECQkAAgAsAAAAABQAFAAAAi2Uj6nLjQHcAgFKQSO1NbCugJOnbNeJUiE5VonLbGw6ozb9RfEB6BhquQmHwgIAIfkECQkAAgAsAAAAABQAFAAAAjKUj6nLjQDcAiFESW81NbCugJOnUKSEpgIVXuOGWI15qrKKL3dZH+J0gBgyqV3uiMQVAAAh+QQJCQACACwAAAAAFAAUAAACNJSPqcuNANwCIURJTzU1sHohXROKm4SmRpZY5CiWCXWqgmvnpjfxLcgIQTg1B04g0ymXigIAIfkECQkAAgAsAAAAABQAFAAAAjOUj6nLjQAcC0EaUA29e9GYUNkChkFppRKmnA3WHS4Dj+qs5qb98NpHO0B+Pk8JpUsqHQUAIfkECQkAAgAsAAAAABQAFAAAAjOUj6nLjQAcC0GeaqgBetGYUNgCJlxppRKkBKgphu8Tq9to51mncN7HKHVqEt4seNQpFwUAIfkECQkAAgAsAAAAABQAFAAAAjWUj6nLjQAcC0GeaKgBASvuHVTFhFdnpSqkoM2YsK+mbmaNwwt3YeO92VAiOseIBPwMccxaAQAh+QQJCQACACwAAAAAFAAUAAACMpSPqcvtf0KABkQrQMBK8yg13+FRJgSMwuZIE5K24ZmptOkyGonleiWx+GSzU/GGfBQAACH5BAkJAAIALAAAAAAUABQAAAIzlI+py+1/QoAGRCtAwErzKDUfslEmBIxC2UgTkjruWam0qb2dHq8hg8lZZg+XzvS7KSEFACH5BAkJAAIALAAAAAAUABQAAAIylI+py+1/QoAGHGAFCFntJU0Uwo3m00WpIq2Y056V7HyexIRVpi+btSn1YMMRjoZ8FAAAIfkECQkAAgAsAAAAABQAFAAAAjOUj6nL7X9CgAYcYE3ICswuUQknlg2poYmEYg5rVvEbjrVdu4L0Kbzg2exuHc3PRJwpGQUAIfkECQkAAgAsAAAAABQAFAAAAjGUj6nL7X9CgAYcYE3ICswuUQknlubmSKSApagJQ9KHeGs1V1m+5B7KW+yColDs+CgAACH5BAkJAAIALAAAAAAUABQAAAIylI+py+1/QoAGHGDNZGCn7lGVSJaV5EjZGSqqCT9SK3QrAm6Yhi5z/QI1MqAbpRdLMgoAIfkECQkAAgAsAAAAABQAFAAAAjKUj6nL7X8CgGZWK7ACYXFNZSH1jUaAgki6soxbSeasoF1SbnaNvj0ny3liMlOPhnwUAAAh+QQJCQACACwAAAAAFAAUAAACMpSPqcvtfwKAZlYrsAJhcU1lYSiNRoCCCJqgJcMpr0mvbPIxrnzzHVfKPYCqR6+GbBQAACH5BAkJAAIALAAAAAAUABQAAAIylI+py+1/AoBmViuwAmFxTWVhKI1GgIIImqAlwymvSa/zqp5su8ssV/pAgDlHr4ZsFAAAIfkECQkAAgAsAAAAABQAFAAAAjKUj6nL7X8CgAJIAyZuoa+7WNTogGRnKiKCamGgpOTMyoZ9ewnK8IJucTUsOMeKhoQUAAAh+QQJCQACACwAAAAAFAAUAAACM5SPqcvtDk6IT4RrABU7gRssEwNW5jOeBth5IcI2n5KqNl0jLYy5L/7qWXaKT840uylNBQAh+QQJCQACACwAAAAAFAAUAAACMpSPqcvtDk6IT4RrABU7gRssEwNW5jOeBth5IcI2n5KqtvK1WVMmPZ3CZHSil01zS54KACH5BAkJAAIALAAAAAAUABQAAAIzlI+py40A3DshSFOtqCcukC2Bp4TX6UAoVZEKmGRuAtPzinfj15gPJ9ptNBsUEKfKKU8FACH5BAkJAAIALAAAAAAUABQAAAI0lI+py30QAnDPxEjFFVCauXTBB2plsmWqA5xqykBJx46zu+azp+AH/OD1eJjPqqhr6Za6AgAh+QQJCQACACwAAAAAFAAUAAACM5SPqcuNEdyCUAoqAASGM5x5l5iA1tkA5GkuWqJFqYyo6O1oa9e0XbD7eYAHmqSCSyqTBQA7";function h(t,e){return function(){return t.apply(e,arguments)}}const{toString:d}=Object.prototype,{getPrototypeOf:A}=Object,y=(m=Object.create(null),t=>{const e=d.call(t);return m[e]||(m[e]=e.slice(8,-1).toLowerCase())});var m;const g=t=>(t=t.toLowerCase(),e=>y(e)===t),v=t=>e=>typeof e===t,{isArray:w}=Array,b=v("undefined");const E=g("ArrayBuffer");const O=v("string"),S=v("function"),x=v("number"),j=t=>null!==t&&"object"==typeof t,C=t=>{if("object"!==y(t))return!1;const e=A(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},I=g("Date"),R=g("File"),L=g("Blob"),N=g("FileList"),T=g("URLSearchParams");function k(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),w(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function B(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}const U="undefined"==typeof self?"undefined"==typeof global?void 0:global:self,P=t=>!b(t)&&t!==U;const F=(M="undefined"!=typeof Uint8Array&&A(Uint8Array),t=>M&&t instanceof M);var M;const D=g("HTMLFormElement"),Q=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),_=g("RegExp"),G=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};k(r,((r,o)=>{!1!==e(r,o,t)&&(n[o]=r)})),Object.defineProperties(t,n)},q={isArray:w,isArrayBuffer:E,isBuffer:function(t){return null!==t&&!b(t)&&null!==t.constructor&&!b(t.constructor)&&S(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{const e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||d.call(t)===e||S(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&E(t.buffer),e},isString:O,isNumber:x,isBoolean:t=>!0===t||!1===t,isObject:j,isPlainObject:C,isUndefined:b,isDate:I,isFile:R,isBlob:L,isRegExp:_,isFunction:S,isStream:t=>j(t)&&S(t.pipe),isURLSearchParams:T,isTypedArray:F,isFileList:N,forEach:k,merge:function t(){const{caseless:e}=P(this)&&this||{},r={},n=(n,o)=>{const i=e&&B(r,o)||o;C(r[i])&&C(n)?r[i]=t(r[i],n):C(n)?r[i]=t({},n):w(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&k(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(k(e,((e,n)=>{r&&S(e)?t[n]=h(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,a;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],n&&!n(a,t,e)||s[a]||(e[a]=t[a],s[a]=!0);t=!1!==r&&A(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:y,kindOfTest:g,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(w(t))return t;let e=t.length;if(!x(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:D,hasOwnProperty:Q,hasOwnProp:Q,reduceDescriptors:G,freezeMethods:t=>{G(t,((e,r)=>{if(S(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];S(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return w(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:B,global:U,isContextDefined:P,toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(j(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=w(t)?[]:{};return k(t,((t,e)=>{const i=r(t,n+1);!b(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)}};function z(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}q.inherits(z,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const J=z.prototype,H={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{H[t]={value:t}})),Object.defineProperties(z,H),Object.defineProperty(J,"isAxiosError",{value:!0}),z.from=(t,e,r,n,o,i)=>{const a=Object.create(J);return q.toFlatObject(t,a,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),z.call(a,t.message,e,r,n,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const K=z;const Y=l(11);function Z(t){return q.isPlainObject(t)||q.isArray(t)}function W(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function V(t,e,r){return t?t.concat(e).map((function(t,e){return t=W(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const X=q.toFlatObject(q,{},null,(function(t){return/^is[A-Z]/.test(t)}));const $=function(t,e,r){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new(Y||FormData);const n=(r=q.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!q.isUndefined(e[t])}))).metaTokens,o=r.visitor||l,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&((c=e)&&q.isFunction(c.append)&&"FormData"===c[Symbol.toStringTag]&&c[Symbol.iterator]);var c;if(!q.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(q.isDate(t))return t.toISOString();if(!s&&q.isBlob(t))throw new K("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(t)||q.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,r,o){let s=t;if(t&&!o&&"object"==typeof t)if(q.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(q.isArray(t)&&function(t){return q.isArray(t)&&!t.some(Z)}(t)||q.isFileList(t)||q.endsWith(r,"[]")&&(s=q.toArray(t)))return r=W(r),s.forEach((function(t,n){!q.isUndefined(t)&&null!==t&&e.append(!0===a?V([r],n,i):null===a?r:r+"[]",u(t))})),!1;return!!Z(t)||(e.append(V(o,r,i),u(t)),!1)}const f=[],p=Object.assign(X,{defaultVisitor:l,convertValue:u,isVisitable:Z});if(!q.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!q.isUndefined(r)){if(-1!==f.indexOf(r))throw Error("Circular reference detected in "+n.join("."));f.push(r),q.forEach(r,(function(r,i){!0===(!(q.isUndefined(r)||null===r)&&o.call(e,r,q.isString(i)?i.trim():i,n,p))&&t(r,n?n.concat(i):[i])})),f.pop()}}(t),e};function tt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function et(t,e){this._pairs=[],t&&$(t,this,e)}const rt=et.prototype;rt.append=function(t,e){this._pairs.push([t,e])},rt.toString=function(t){const e=t?function(e){return t.call(this,e,tt)}:tt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const nt=et;function ot(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function it(t,e,r){if(!e)return t;const n=r&&r.encode||ot,o=r&&r.serialize;let i;if(i=o?o(e,r):q.isURLSearchParams(e)?e.toString():new nt(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}const at=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){q.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ct="undefined"!=typeof URLSearchParams?URLSearchParams:nt,ut=FormData,lt=(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),ft="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pt={isBrowser:!0,classes:{URLSearchParams:ct,FormData:ut,Blob},isStandardBrowserEnv:lt,isStandardBrowserWebWorkerEnv:ft,protocols:["http","https","file","blob","url","data"]};const ht=function(t){function e(t,r,n,o){let i=t[o++];const a=Number.isFinite(+i),s=o>=t.length;if(i=!i&&q.isArray(n)?n.length:i,s)return q.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&q.isObject(n[i])||(n[i]=[]);return e(t,r,n[i],o)&&q.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}(n[i])),!a}if(q.isFormData(t)&&q.isFunction(t.entries)){const r={};return q.forEachEntry(t,((t,n)=>{e(function(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},dt={"Content-Type":void 0};const At={transitional:st,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=q.isObject(t);o&&q.isHTMLForm(t)&&(t=new FormData(t));if(q.isFormData(t))return n&&n?JSON.stringify(ht(t)):t;if(q.isArrayBuffer(t)||q.isBuffer(t)||q.isStream(t)||q.isFile(t)||q.isBlob(t))return t;if(q.isArrayBufferView(t))return t.buffer;if(q.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return $(t,new pt.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return pt.isNode&&q.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return $(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(q.isString(t))try{return(e||JSON.parse)(t),q.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||At.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&q.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw K.from(t,K.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};q.forEach(["delete","get","head"],(function(t){At.headers[t]={}})),q.forEach(["post","put","patch"],(function(t){At.headers[t]=q.merge(dt)}));const yt=At,mt=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),gt=Symbol("internals");function vt(t){return t&&String(t).trim().toLowerCase()}function wt(t){return!1===t||null==t?t:q.isArray(t)?t.map(wt):String(t)}function bt(t,e,r,n){return q.isFunction(n)?n.call(this,e,r):q.isString(e)?q.isString(n)?-1!==e.indexOf(n):q.isRegExp(n)?n.test(e):void 0:void 0}class Et{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=vt(e);if(!o)throw new Error("header name must be a non-empty string");const i=q.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=wt(t))}const i=(t,e)=>q.forEach(t,((t,r)=>o(t,r,e)));return q.isPlainObject(t)||t instanceof this.constructor?i(t,e):q.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z]+$/.test(t.trim())?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&mt[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=vt(t)){const r=q.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(q.isFunction(e))return e.call(this,t,r);if(q.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=vt(t)){const r=q.findKey(this,t);return!(!r||e&&!bt(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=vt(t)){const o=q.findKey(r,t);!o||e&&!bt(0,r[o],o,e)||(delete r[o],n=!0)}}return q.isArray(t)?t.forEach(o):o(t),n}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const e=this,r={};return q.forEach(this,((n,o)=>{const i=q.findKey(r,o);if(i)return e[i]=wt(n),void delete e[o];const a=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete e[o],e[a]=wt(n),r[a]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return q.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&q.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[gt]=this[gt]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=vt(t);e[n]||(!function(t,e){const r=q.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return q.isArray(t)?t.forEach(n):n(t),this}}Et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),q.freezeMethods(Et.prototype),q.freezeMethods(Et);const Ot=Et;function St(t,e){const r=this||yt,n=e||r,o=Ot.from(n.headers);let i=n.data;return q.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function xt(t){return!(!t||!t.__CANCEL__)}function jt(t,e,r){K.call(this,null==t?"canceled":t,K.ERR_CANCELED,e,r),this.name="CanceledError"}q.inherits(jt,K,{__CANCEL__:!0});const Ct=jt;const It=pt.isStandardBrowserEnv?{write:function(t,e,r,n,o,i){const a=[];a.push(t+"="+encodeURIComponent(e)),q.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),q.isString(n)&&a.push("path="+n),q.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function Rt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Lt=pt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=q.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};const Nt=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,a=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=t;if(i=(i+1)%t,i===a&&(a=(a+1)%t),c-o<e)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}};function Tt(t,e){let r=0;const n=Nt(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s);r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[e?"download":"upload"]=!0,t(u)}}const kt={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=Ot.from(t.headers).normalize(),i=t.responseType;let a;function s(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}q.isFormData(n)&&(pt.isStandardBrowserEnv||pt.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const u=Rt(t.baseURL,t.url);function l(){if(!c)return;const n=Ot.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new K("Request failed with status code "+r.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),s()}),(function(t){r(t),s()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),it(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(r(new K("Request aborted",K.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new K("Network Error",K.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||st;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new K(e,n.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,t,c)),c=null},pt.isStandardBrowserEnv){const e=(t.withCredentials||Lt(u))&&t.xsrfCookieName&&It.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&q.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),q.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&"json"!==i&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",Tt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Tt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=e=>{c&&(r(!e||e.type?new Ct(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const f=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);f&&-1===pt.protocols.indexOf(f)?r(new K("Unsupported protocol "+f+":",K.ERR_BAD_REQUEST,t)):c.send(n||null)}))}};q.forEach(kt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Bt=t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let r,n;for(let o=0;o<e&&(r=t[o],!(n=q.isString(r)?kt[r.toLowerCase()]:r));o++);if(!n){if(!1===n)throw new K(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(q.hasOwnProp(kt,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`)}if(!q.isFunction(n))throw new TypeError("adapter is not a function");return n};function Ut(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ct(null,t)}function Pt(t){Ut(t),t.headers=Ot.from(t.headers),t.data=St.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Bt(t.adapter||yt.adapter)(t).then((function(e){return Ut(t),e.data=St.call(t,t.transformResponse,e),e.headers=Ot.from(e.headers),e}),(function(e){return xt(e)||(Ut(t),e&&e.response&&(e.response.data=St.call(t,t.transformResponse,e.response),e.response.headers=Ot.from(e.response.headers))),Promise.reject(e)}))}const Ft=t=>t instanceof Ot?t.toJSON():t;function Mt(t,e){e=e||{};const r={};function n(t,e,r){return q.isPlainObject(t)&&q.isPlainObject(e)?q.merge.call({caseless:r},t,e):q.isPlainObject(e)?q.merge({},e):q.isArray(e)?e.slice():e}function o(t,e,r){return q.isUndefined(e)?q.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!q.isUndefined(e))return n(void 0,e)}function a(t,e){return q.isUndefined(e)?q.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function s(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(t,e)=>o(Ft(t),Ft(e),!0)};return q.forEach(Object.keys(t).concat(Object.keys(e)),(function(n){const i=c[n]||o,a=i(t[n],e[n],n);q.isUndefined(a)&&i!==s||(r[n]=a)})),r}const Dt="1.2.1",Qt={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Qt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const _t={};Qt.transitional=function(t,e,r){return(n,o,i)=>{if(!1===t)throw new K(function(t,e){return"[Axios v1.2.1] Transitional option '"+t+"'"+e+(r?". "+r:"")}(o," has been removed"+(e?" in "+e:"")),K.ERR_DEPRECATED);return e&&!_t[o]&&(_t[o]=!0),!t||t(n,o,i)}};const Gt={assertOptions:function(t,e,r){if("object"!=typeof t)throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],a=e[i];if(a){const e=t[i],r=void 0===e||a(e,i,t);if(!0!==r)throw new K("option "+i+" must be "+r,K.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new K("Unknown option "+i,K.ERR_BAD_OPTION)}},validators:Qt},qt=Gt.validators;class zt{constructor(t){this.defaults=t,this.interceptors={request:new at,response:new at}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Mt(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;let i;void 0!==r&&Gt.assertOptions(r,{silentJSONParsing:qt.transitional(qt.boolean),forcedJSONParsing:qt.transitional(qt.boolean),clarifyTimeoutError:qt.transitional(qt.boolean)},!1),void 0!==n&&Gt.assertOptions(n,{encode:qt.function,serialize:qt.function},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase(),i=o&&q.merge(o.common,o[e.method]),i&&q.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ot.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,a.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let l,f=0;if(!s){const t=[Pt.bind(this),void 0];for(t.unshift.apply(t,a),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);f<l;)u=u.then(t[f++],t[f++]);return u}l=a.length;let p=e;for(f=0;f<l;){const t=a[f++],e=a[f++];try{p=t(p)}catch(t){e.call(this,t);break}}try{u=Pt.call(this,p)}catch(t){return Promise.reject(t)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(t){return it(Rt((t=Mt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}q.forEach(["delete","get","head","options"],(function(t){zt.prototype[t]=function(e,r){return this.request(Mt(r||{},{method:t,url:e,data:(r||{}).data}))}})),q.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(Mt(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}zt.prototype[t]=e(),zt.prototype[t+"Form"]=e(!0)}));const Jt=zt;class Ht{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then((t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new Ct(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Ht((function(e){t=e})),cancel:t}}}const Kt=Ht;const Yt=function t(e){const r=new Jt(e),n=h(Jt.prototype.request,r);return q.extend(n,Jt.prototype,r,{allOwnKeys:!0}),q.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Mt(e,r))},n}(yt);Yt.Axios=Jt,Yt.CanceledError=Ct,Yt.CancelToken=Kt,Yt.isCancel=xt,Yt.VERSION=Dt,Yt.toFormData=$,Yt.AxiosError=K,Yt.Cancel=Yt.CanceledError,Yt.all=function(t){return Promise.all(t)},Yt.spread=function(t){return function(e){return t.apply(null,e)}},Yt.isAxiosError=function(t){return q.isObject(t)&&!0===t.isAxiosError},Yt.mergeConfig=Mt,Yt.AxiosHeaders=Ot,Yt.formToJSON=t=>ht(q.isHTMLForm(t)?new FormData(t):t),Yt.default=Yt;const Zt=Yt;var Wt=l(13);function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function Xt(){Xt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new x(o||[]);return n(a,"_invoke",{value:b(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function h(){}function d(){}var A={};c(A,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(j([])));m&&m!==e&&r.call(m,i)&&(A=m);var g=d.prototype=p.prototype=Object.create(A);function v(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var c=l(t[n],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==Vt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=d,n(g,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=c(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},v(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(g),c(g,s,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=j,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function $t(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function te(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){$t(i,n,o,a,s,"next",t)}function s(t){$t(i,n,o,a,s,"throw",t)}a(void 0)}))}}function ee(){return ee=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ee.apply(this,arguments)}"".concat(window.location.protocol,"//").concat(window.location.host,"/");var re=Zt.create();re.interceptors.request.use((function(t){return t.validateStatus=function(t){return t>=200&&t<300},ee({},t)}));var ne=function(){var t=te(Xt().mark((function t(e,r){var n,o,i,a,s,c,u;return Xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.method,o=void 0===n?"GET":n,i=r.params,a=r.data,s=r.validateStatus,c="".concat("api/plugin-proxy/corpglory-dataexporter-app").concat("/api").concat(e),t.next=4,re({method:o,url:c,params:i,data:a,validateStatus:s});case 4:return u=t.sent,t.abrupt("return",u.data);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}();function oe(){return(oe=te(Xt().mark((function t(e){return Xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",ne("/task",{params:{dashboardUid:e}}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ie(t){return ae.apply(this,arguments)}function ae(){return(ae=te(Xt().mark((function t(e){return Xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Wt.isEmpty(e)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,ne("/task",{method:"DELETE",data:{taskId:e}});case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function se(t){return ce.apply(this,arguments)}function ce(){return(ce=te(Xt().mark((function t(e){var r,n,o;return Xt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Wt.isEmpty(e)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,ne("/static/".concat(e,".csv"),{});case 5:r=t.sent,n=URL.createObjectURL(new Blob([r],{type:"text/csv"})),(o=document.createElement("a")).href=n,o.setAttribute("download","".concat(e,".csv")),document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ue=l(14);function le(t){return le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},le(t)}function fe(){fe=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new x(o||[]);return n(a,"_invoke",{value:b(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function h(){}function d(){}var A={};c(A,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(j([])));m&&m!==e&&r.call(m,i)&&(A=m);var g=d.prototype=p.prototype=Object.create(A);function v(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var c=l(t[n],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==le(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=d,n(g,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=c(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},v(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(g),c(g,s,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=j,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function pe(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function he(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){pe(i,n,o,a,s,"next",t)}function s(t){pe(i,n,o,a,s,"throw",t)}a(void 0)}))}}function de(){return(de=he(fe().mark((function t(){var e;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,ue.getBackendSrv)(),t.abrupt("return",e.get("/api/datasources"));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ae(t){return ye.apply(this,arguments)}function ye(){return(ye=he(fe().mark((function t(e){var r;return fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,ue.getBackendSrv)(),t.abrupt("return",r.get("/api/dashboards/uid/".concat(e)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var me,ge,ve,we,be,Ee,Oe=l(28),Se=l(29),xe=l(1),je=l(0),Ce=l.n(je);function Ie(t){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ie(t)}function Re(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Le(){return Le=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Le.apply(this,arguments)}function Ne(){Ne=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,a=Object.create(i.prototype),s=new x(o||[]);return n(a,"_invoke",{value:b(t,r,s)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function p(){}function h(){}function d(){}var A={};c(A,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(j([])));m&&m!==e&&r.call(m,i)&&(A=m);var g=d.prototype=p.prototype=Object.create(A);function v(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,i,a,s){var c=l(t[n],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==Ie(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,s)}))}s(c.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=E(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=d,n(g,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=c(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,s,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},v(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(g),c(g,s,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=j,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Te(t,e,r,n,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,o)}function ke(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Te(i,n,o,a,s,"next",t)}function s(t){Te(i,n,o,a,s,"throw",t)}a(void 0)}))}}function Be(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(t){u=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(t,e)||Ue(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(t,e){if(t){if("string"==typeof t)return Pe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pe(t,e):void 0}}function Pe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Fe="corpglory-dataexporter-panel";var Me=function(){return{calendarModal:(0,Se.css)(be||(be=Re(["\n section {\n position: fixed;\n top: 20%;\n z-index: 1061;\n }\n "]))),customLink:(0,Se.css)(Ee||(Ee=Re(["\n color: #6e9fff;\n margin: 0 4px;\n &:hover {\n text-decoration: underline;\n }\n "])))}},De=new n.PanelPlugin((function(l){var f,h=l.width,d=l.height,A=l.timeRange,y=l.eventBus,m=l.timeZone,g=Be((0,je.useState)(null),2),v=g[0],w=g[1],b=Be((0,je.useState)(null),2),E=b[0],O=b[1],S=Be((0,je.useState)(null),2),x=S[0],j=S[1],C=Be((0,je.useState)(null),2),I=C[0],R=C[1],L=Be((0,je.useState)(null),2),N=L[0],T=L[1],k=Be((0,je.useState)(null),2),B=k[0],U=k[1],P=Be((0,je.useState)(null),2),F=P[0],M=P[1],D=Be((0,je.useState)(!1),2),Q=D[0],_=D[1],G=Be((0,je.useState)(A),2),q=G[0],z=G[1],J=Be((0,je.useState)(e.LOADING),2),H=J[0],K=J[1];function Y(t){if(H!==e.PERMISSION_ERROR)return K(t)}var Z=Be((0,je.useState)(null),2),W=Z[0],V=Z[1],X=function(t){switch(t){case"utc":return"Etc/UTC";case"browser":return Intl.DateTimeFormat().resolvedOptions().timeZone;default:return t}}(m);function $(){return $=ke(Ne().mark((function e(){var r,n;return Ne().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v&&E){e.next=3;break}return e.abrupt("return");case 3:n=[],null===(r=v.panels)||void 0===r||r.forEach((function(e){var r,o;e.type!==Fe&&Wt.includes(Wt.values(t),null===(r=e.datasource)||void 0===r?void 0:r.type)&&(null===(o=e.targets)||void 0===o||o.forEach((function(t){var r,o=et(null===(r=t.datasource)||void 0===r?void 0:r.uid);o&&n.push({selected:!1,target:t,panel:e,datasource:o})})))})),R(n);case 6:case"end":return e.stop()}}),e)}))),$.apply(this,arguments)}function tt(){(function(t){return oe.apply(this,arguments)})(o()).then((function(t){j(t),Y(e.OK);var n,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ue(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(t);try{for(o.s();!(n=o.n()).done;){var i;if((null===(i=n.value.progress)||void 0===i?void 0:i.status)===r.EXPORTING)return void setTimeout(tt,1e3)}}catch(t){o.e(t)}finally{o.f()}})).catch((function(t){Y(e.DATASOURCE_ERROR),V("".concat(t.name,": ").concat(t.message))}))}function et(t){if(!Wt.isNil(t)&&null!==E){var e=Wt.find(E,(function(e){return e.uid===t}));return e}}function rt(){return rt=ke(Ne().mark((function t(e){var r,n,i,a;return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Wt.filter(I,(function(t){return t.selected})),n=[q.from.unix(),q.to.unix()],i=o(),a={dashboardUid:i,username:Oe.contextSrv.user.name,timeRange:{from:1e3*n[0],to:1e3*n[1]},queries:r},t.next=6,ne("/task",{method:"POST",data:{task:a,url:window.location.toString(),timeZoneName:e}});case 6:tt(),ot(),nt();case 9:case"end":return t.stop()}}),t)}))),rt.apply(this,arguments)}function nt(){null!==I&&R(I.map((function(t){return Le({},t,{selected:!1})})))}function ot(){_(!1),nt()}function it(t){return at.apply(this,arguments)}function at(){return(at=ke(Ne().mark((function t(e){var r;return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ie(null==e?void 0:e.id);case 2:r=Wt.filter(x,(function(t){return t.id!==e.id})),j(r);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function st(){return(st=ke(Ne().mark((function t(e){return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return T(e.id),t.next=3,se(null==e?void 0:e.id);case 3:T(null);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ct(t){if(null!==I){var e=t.origin.rowIndex,r=Wt.clone(I);r[e].selected=!r[e].selected,R(r)}}Oe.contextSrv.user.orgRole!==n.OrgRole.Admin&&Y(e.PERMISSION_ERROR),(0,je.useEffect)((function(){function t(){return(t=ke(Ne().mark((function t(){var e;return Ne().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=o(),t.abrupt("return",Ae(e));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}(function(){return t.apply(this,arguments)})().then((function(t){return w(t.dashboard)})).catch((function(t){}))}),[]),(0,je.useEffect)((function(){(function(){return de.apply(this,arguments)})().then((function(t){return O(t)})).catch((function(t){}))}),[]),(0,je.useEffect)((function(){if(null!==x){var t=function(t){var e=Wt.orderBy(t,(function(t){var e;return null===(e=t.progress)||void 0===e?void 0:e.time}),"desc"),o=(0,n.toDataFrame)({name:"A",fields:[{name:"Status Updated At",type:n.FieldType.number,values:Wt.map(e,(function(t){var e;return i(null===(e=t.progress)||void 0===e?void 0:e.time)}))},{name:"From",type:n.FieldType.number,values:Wt.map(e,(function(t){return i(t.timeRange.from)}))},{name:"To",type:n.FieldType.number,values:Wt.map(e,(function(t){return i(t.timeRange.to)}))},{name:"User",type:n.FieldType.string,values:Wt.map(e,(function(t){return t.username}))},{name:"Datasource",type:n.FieldType.string,values:Wt.map(e,(function(t){return t.queries.map((function(t){var e;return null===(e=t.datasource)||void 0===e?void 0:e.name})).join(",")}))},{name:"Exported Rows",type:n.FieldType.number,values:Wt.map(e,(function(t){var e;return null===(e=t.progress)||void 0===e?void 0:e.exportedRowsCount}))},{name:"Progress",type:n.FieldType.string,values:Wt.map(e,(function(t){var e;return"".concat((100*((null===(e=t.progress)||void 0===e?void 0:e.progress)||0)).toFixed(0),"%")}))},{name:"Status",type:n.FieldType.string,values:Wt.map(e,(function(t){var e;return null===(e=t.progress)||void 0===e?void 0:e.status}))},{name:"Error",type:n.FieldType.string,values:Wt.map(e,(function(t){var e;return(null===(e=t.progress)||void 0===e?void 0:e.errorMessage)||"-"}))},{name:"Actions",type:n.FieldType.string,values:Wt.map(e,(function(t){var e,n;switch(null===(e=t.progress)||void 0===e?void 0:e.status){case r.FINISHED:return t.id===N?p:s;case r.ERROR:return a;case r.EXPORTING:return"";default:throw new Error("Unknown exporting status: ".concat(null===(n=t.progress)||void 0===n?void 0:n.status))}})),config:{custom:{filterable:!1,displayMode:"image"}}}]}),c=(0,n.applyFieldOverrides)({data:[o],fieldConfig:{overrides:[],defaults:{}},theme:(0,n.createTheme)(),replaceVariables:function(t){return t}});return c[0].fields[9].getLinks=function(t){var n,o,i=t.valueRowIndex,a=Wt.find(e,(function(t,e){return e===i}));if(a)switch(null===(n=a.progress)||void 0===n?void 0:n.status){case r.FINISHED:return[{targetBlank:!1,title:"Download",url:"#",onClick:function(){return function(t){return st.apply(this,arguments)}(a)}},{targetBlank:!1,title:"Delete",url:"#",onClick:function(){return it(a)}}];case r.ERROR:return[{targetBlank:!1,title:"Delete",url:"#",onClick:function(){return it(a)}}];case r.EXPORTING:return[];default:throw new Error("Unknown exporting status: ".concat(null===(o=a.progress)||void 0===o?void 0:o.status))}},c[0]}(x);U(t)}}),[x,N]),(0,je.useEffect)(tt,[]),(0,je.useEffect)((function(){null!==I&&M(function(t){var e=(0,n.toDataFrame)({name:"A",fields:[{name:"Select",type:n.FieldType.string,values:Wt.map(t,(function(t){return t.selected?u:c})),config:{custom:{filterable:!1,displayMode:"image"},links:[{targetBlank:!1,title:"Select",url:"#",onClick:function(t){return ct(t)}}]}},{name:"Panel",type:n.FieldType.string,values:Wt.map(t,(function(t){return t.panel.title}))},{name:"RefId",type:n.FieldType.string,values:Wt.map(t,(function(t){return t.target.refId}))},{name:"Datasource",type:n.FieldType.string,values:Wt.map(t,(function(t){return t.datasource.name}))}]});return(0,n.applyFieldOverrides)({data:[e],fieldConfig:{overrides:[],defaults:{}},theme:(0,n.createTheme)(),replaceVariables:function(t){return t}})[0]}(I))}),[I]),y.subscribe(ue.RefreshEvent,tt);var ut=(0,xe.useStyles2)(Me),lt=me||(me=Ce().createElement(xe.LoadingPlaceholder,{text:"Loading..."})),ft=Ce().createElement("div",null,ge||(ge=Ce().createElement("p",null,"Datasource is unavailable.")),Ce().createElement("div",null,"If you have not setup the plugin click",Ce().createElement("a",{className:ut.customLink,href:"/plugins/".concat("corpglory-dataexporter-app")},"here"),"to configure DataExporter."),Ce().createElement("p",{style:{marginTop:"16px"}},W)),pt=ve||(ve=Ce().createElement("div",null,Ce().createElement("p",null," Permission Error. "),Ce().createElement("div",null," DataExporter panel available only for Admins. "))),ht=Ce().createElement("div",null,Ce().createElement(xe.Table,{width:h,height:d-40,data:B}),Ce().createElement(xe.HorizontalGroup,{justify:"flex-end"},Ce().createElement(xe.Button,{variant:"primary",icon:"plus",style:{marginTop:"8px"},onClick:function(){!function(){$.apply(this,arguments)}(),z(A),_(!0)}},"Add Task"),Ce().createElement(xe.Modal,{title:"Select Queries",isOpen:Q,onDismiss:ot,className:ut.calendarModal},null===F?we||(we=Ce().createElement("div",null,Ce().createElement("p",null,"There are no queries to export."))):Ce().createElement("div",null,Ce().createElement(xe.VerticalGroup,{spacing:"xs"},Ce().createElement(xe.HorizontalGroup,{justify:"flex-start",spacing:"md"},Ce().createElement(xe.TimeRangeInput,{value:q,onChange:function(t){z(t)}})),Ce().createElement(xe.Table,{width:h/2-20,height:d-40,data:F}),Ce().createElement(xe.HorizontalGroup,{justify:"flex-end",spacing:"md"},Ce().createElement(xe.Button,{variant:"primary","aria-label":"Add task button",onClick:function(){return function(t){return rt.apply(this,arguments)}(X)},disabled:!(null!=I&&null!==(f=I.filter((function(t){return t.selected})))&&void 0!==f&&f.length)},"Add Task")))))));return Ce().createElement("div",null,function(t){switch(t){case e.LOADING:return lt;case e.DATASOURCE_ERROR:return ft;case e.PERMISSION_ERROR:return pt;case e.OK:return ht;default:return ft}}(H))}))})(),f})()));
//# sourceMappingURL=module.js.map