@perses-dev/loki-plugin 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mf/js/{Loki.2f631825.js → Loki.c48c56a7.js} +3 -3
- package/__mf/js/async/1398.ca579c40.js +2 -0
- package/__mf/js/async/{4310.b96a5c66.js → 4310.6d2d2ce3.js} +2 -2
- package/__mf/js/async/{4421.5adcbc2d.js → 4421.28cc8e2d.js} +1 -1
- package/__mf/js/async/4557.fd670526.js +2 -0
- package/__mf/js/async/4676.d4c41b7a.js +22 -0
- package/__mf/js/async/7797.822237c9.js +1 -0
- package/__mf/js/async/9554.728cf7b9.js +2 -0
- package/__mf/js/async/{__federation_expose_LokiDatasource.a9871645.js → __federation_expose_LokiDatasource.3ce6abca.js} +2 -2
- package/__mf/js/async/__federation_expose_LokiLogQuery.c446c7ff.js +1 -0
- package/__mf/js/async/__federation_expose_LokiTimeSeriesQuery.eda99bf8.js +1 -0
- package/__mf/js/{main.174be1bc.js → main.ccf461ea.js} +3 -3
- package/lib/cjs/queries/loki-log-query/LokiLogQueryEditor.js +5 -16
- package/lib/cjs/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js +5 -16
- package/lib/queries/loki-log-query/LokiLogQueryEditor.d.ts.map +1 -1
- package/lib/queries/loki-log-query/LokiLogQueryEditor.js +4 -15
- package/lib/queries/loki-log-query/LokiLogQueryEditor.js.map +1 -1
- package/lib/queries/loki-log-query/log-query-plugin-interface.d.ts +0 -1
- package/lib/queries/loki-log-query/log-query-plugin-interface.d.ts.map +1 -1
- package/lib/queries/loki-log-query/log-query-plugin-interface.js.map +1 -1
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.d.ts.map +1 -1
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js +4 -15
- package/lib/queries/loki-time-series-query/LokiTimeSeriesQueryEditor.js.map +1 -1
- package/mf-manifest.json +27 -27
- package/mf-stats.json +27 -27
- package/package.json +6 -6
- package/__mf/js/async/2178.c22bac1c.js +0 -2
- package/__mf/js/async/2472.75bb97e0.js +0 -22
- package/__mf/js/async/2708.9651e2da.js +0 -1
- package/__mf/js/async/529.f12e49de.js +0 -2
- package/__mf/js/async/9563.0375701c.js +0 -2
- package/__mf/js/async/__federation_expose_LokiLogQuery.9b430d01.js +0 -1
- package/__mf/js/async/__federation_expose_LokiTimeSeriesQuery.61feff51.js +0 -1
- /package/__mf/js/async/{9563.0375701c.js.LICENSE.txt → 1398.ca579c40.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{4310.b96a5c66.js.LICENSE.txt → 4310.6d2d2ce3.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2178.c22bac1c.js.LICENSE.txt → 4557.fd670526.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2472.75bb97e0.js.LICENSE.txt → 4676.d4c41b7a.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{529.f12e49de.js.LICENSE.txt → 9554.728cf7b9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{__federation_expose_LokiDatasource.a9871645.js.LICENSE.txt → __federation_expose_LokiDatasource.3ce6abca.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Loki=self.chunk_Loki||[]).push([["7797"],{85843:function(r,e,o){o.d(e,{Z:()=>m});var t=o(54538),n=o(90496),u=o(82267),a=o(12709),i=o(51751),s=o(44124),l=o(6749);function f(r){return(0,l.ZP)("MuiFormGroup",r)}(0,s.Z)("MuiFormGroup",["root","row","error"]);var c=o(36683),d=o(33567),p=o(24246);let v=(0,a.ZP)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(r,e)=>{let{ownerState:o}=r;return[e.root,o.row&&e.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),m=t.forwardRef(function(r,e){let o=(0,i.i)({props:r,name:"MuiFormGroup"}),{className:t,row:a=!1,...s}=o,l=(0,c.Z)(),m=(0,d.Z)({props:o,muiFormControl:l,states:["error"]}),h={...o,row:a,error:m.error},w=(r=>{let{classes:e,row:o,error:t}=r;return(0,u.Z)({root:["root",o&&"row",t&&"error"]},f,e)})(h);return(0,p.jsx)(v,{className:(0,n.Z)(w.root,t),ownerState:h,ref:e,...s})})},17086:function(r,e,o){o.d(e,{r:()=>t});function t(r,e){return r?.panelGroupId===e?.panelGroupId&&r?.panelGroupItemLayoutId===e?.panelGroupItemLayoutId}},22410:function(r,e,o){function t(r){return"project"in r.metadata?r.metadata.project:void 0}o.d(e,{Z:()=>t,x:()=>n});let n="$__all"},85247:function(r,e,o){function t(r,e){let o=n(e),t=r.panels[o];if(void 0===t)throw Error(`Could not resolve panels reference ${e.$ref}`);return t}function n(r){return r.$ref.substring(14)}function u(r){return{$ref:`#/spec/panels/${r}`}}o.d(e,{$j:()=>u,Aw:()=>t,I4:()=>n})},47512:function(r,e,o){var t;e.default=void 0,e.default=(0,((t=o(30265))&&t.__esModule?t:{default:t}).default)("M13 14H11V9H13M13 18H11V16H13M1 21H23L12 2L1 21Z","Alert")},14371:function(r,e,o){var t;e.default=void 0,e.default=(0,((t=o(30265))&&t.__esModule?t:{default:t}).default)("M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z","OpenInNew")},494:function(r,e,o){o.d(e,{F:()=>a});var t=o(84275),n=o(57576),u=function(r,e){for(var o={};r.length;){var t=r[0],u=t.code,a=t.message,i=t.path.join(".");if(!o[i])if("unionErrors"in t){var s=t.unionErrors[0].errors[0];o[i]={message:s.message,type:s.code}}else o[i]={message:a,type:u};if("unionErrors"in t&&t.unionErrors.forEach(function(e){return e.errors.forEach(function(e){return r.push(e)})}),e){var l=o[i].types,f=l&&l[t.code];o[i]=(0,n.appendErrors)(i,e,o,u,f?[].concat(f,t.message):t.message)}r.shift()}return o},a=function(r,e,o){return void 0===o&&(o={}),function(n,a,i){try{return Promise.resolve(function(u,a){try{var s=Promise.resolve(r["sync"===o.mode?"parse":"parseAsync"](n,e)).then(function(r){return i.shouldUseNativeValidation&&(0,t.validateFieldsNatively)({},i),{errors:{},values:o.raw?n:r}})}catch(r){return a(r)}return s&&s.then?s.then(void 0,a):s}(0,function(r){if(Array.isArray(null==r?void 0:r.errors))return{values:{},errors:(0,t.toNestErrors)(u(r.errors,!i.shouldUseNativeValidation&&"all"===i.criteriaMode),i)};throw r}))}catch(r){return Promise.reject(r)}}}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9554.728cf7b9.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.chunk_Loki=self.chunk_Loki||[]).push([["9554"],{12577:function(e,t,r){r.d(t,{Z:()=>d});var n=r(54538),i=r(90496),a=r(82267),o=r(67488),s=r(52054),l=r(78849),u=r(12709),c=r(51751),f=r(14662),m=r(16351),g=r(24246);let p=(0,u.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[{[`& .${f.Z.primary}`]:t.primary},{[`& .${f.Z.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${o.Z.root}:where(& .${f.Z.primary})`]:{display:"block"},[`.${o.Z.root}:where(& .${f.Z.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),d=n.forwardRef(function(e,t){let r=(0,c.i)({props:e,name:"MuiListItemText"}),{children:o,className:u,disableTypography:d=!1,inset:h=!1,primary:y,primaryTypographyProps:b,secondary:v,secondaryTypographyProps:w,slots:x={},slotProps:S={},...D}=r,{dense:O}=n.useContext(l.Z),N=null!=y?y:o,$=v,B={...r,disableTypography:d,inset:h,primary:!!N,secondary:!!$,dense:O},F=(e=>{let{classes:t,inset:r,primary:n,secondary:i,dense:o}=e;return(0,a.Z)({root:["root",r&&"inset",o&&"dense",n&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},f.L,t)})(B),k={slots:x,slotProps:{primary:b,secondary:w,...S}},[T,M]=(0,m.Z)("root",{className:(0,i.Z)(F.root,u),elementType:p,externalForwardedProps:{...k,...D},ownerState:B,ref:t}),[E,_]=(0,m.Z)("primary",{className:F.primary,elementType:s.Z,externalForwardedProps:k,ownerState:B}),[A,L]=(0,m.Z)("secondary",{className:F.secondary,elementType:s.Z,externalForwardedProps:k,ownerState:B});return null==N||N.type===s.Z||d||(N=(0,g.jsx)(E,{variant:O?"body2":"body1",component:_?.variant?void 0:"span",..._,children:N})),null==$||$.type===s.Z||d||($=(0,g.jsx)(A,{variant:"body2",color:"textSecondary",...L,children:$})),(0,g.jsxs)(T,{...M,children:[N,$]})})},8193:function(e,t,r){r.d(t,{BL:()=>l,Jj:()=>c,Kd:()=>n,Ys:()=>i,bk:()=>f,dT:()=>m,kx:()=>s,qF:()=>a,vo:()=>o,zx:()=>u});let n=["bottom","right"],i=["list","table"],a=["small","medium"];function o(e){return n.includes(e)}function s(e){return i.includes(e)}function l(e){return a.includes(e)}let u={position:"bottom",mode:"list",size:"medium"};function c(e){return void 0===e?u.position:o(e)?e:u.position}function f(e){return e&&s(e)?e:u.mode}function m(e){return e&&l(e)?e:u.size}},78737:function(e,t,r){r.d(t,{R:()=>n});let n={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series"}},20147:function(e,t,r){r.d(t,{$:()=>n});let n=3},75821:function(e,t,r){r.d(t,{Bw:()=>ei,JZ:()=>ed,PX:()=>eu,Yi:()=>es,Fc:()=>ec,Bl:()=>en,Ay:()=>ep,TR:()=>eh,lO:()=>ef,Fp:()=>eg,hv:()=>ea,M$:()=>er,N9:()=>eo,__:()=>em,pu:()=>ey,mb:()=>el});var n,i,a,o,s,l,u,c,f,m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function g(){if(s)return o;s=1;let e=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return o={unformat:function(r,n){let i,a=h(),o=a.currentDelimiters(),s=a.currentCurrency().symbol,l=a.currentOrdinal(),u=a.getZeroFormat(),c=a.currentAbbreviations();if("string"==typeof r)if(function(e,t){if(!(e.indexOf(":")&&":"!==t.thousands))return!1;let r=e.split(":");if(3!==r.length)return!1;let n=+r[0],i=+r[1],a=+r[2];return!isNaN(n)&&!isNaN(i)&&!isNaN(a)}(r,o)){let e,t,n;t=+(e=r.split(":"))[0],n=+e[1],i=+e[2]+60*n+3600*t}else i=function(r,n,i="",a,o,s,l){if(""!==r)return r===o?0:function r(n,i,a,o,s,l,u){if(!isNaN(+n))return+n;let c="",f=n.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(f!==n)return -1*r(f,i,a,o,s,l);for(let t=0;t<e.length;t++){let u=e[t];if((c=n.replace(RegExp(`([0-9 ])(${u.key})$`),"$1"))!==n)return r(c,i,a,o,s,l)*u.factor}if((c=n.replace("%",""))!==n)return r(c,i,a,o,s,l)/100;let m=parseFloat(n);if(isNaN(m))return;let g=o(m);if(g&&"."!==g&&(c=n.replace(RegExp(`${t(g)}$`),""))!==n)return r(c,i,a,o,s,l);let p={};Object.keys(l).forEach(e=>{p[l[e]]=e});let d=Object.keys(p).sort().reverse(),h=d.length;for(let e=0;e<h;e++){let t=d[e],u=p[t];if((c=n.replace(t,""))!==n){let e;switch(u){case"thousand":e=1e3;break;case"million":e=1e6;break;case"billion":e=1e9;break;case"trillion":e=1e12}return r(c,i,a,o,s,l)*e}}}(r.replace(i,"").replace(RegExp(`([0-9])${t(n.thousands)}([0-9])`,"g"),"$1$2").replace(n.decimal,"."),n,i,a,o,s)}(r,o,s,l,u,c);else{if("number"!=typeof r)return;i=r}if(void 0!==i)return i}}}function p(){if(u)return l;u=1;let e=g(),t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,r={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},n={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(t){return void 0!==e.unformat(t)}function a(e,t,n,i=!1){let o=Object.keys(e).map(i=>{if(!t[i])return console.error(`${n} Invalid key: ${i}`),!1;let o=e[i],s=t[i];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!a(o,r,`[Validate ${i}]`,!0))return!1}else if(typeof o!==s.type)return console.error(`${n} ${i} type mismatched: "${s.type}" expected, "${typeof o}" provided`),!1;if(s.restrictions&&s.restrictions.length){let t=s.restrictions.length;for(let r=0;r<t;r++){let{restriction:t,message:a}=s.restrictions[r];if(!t(o,e))return console.error(`${n} ${i} invalid value: ${a}`),!1}}return s.restriction&&!s.restriction(o,e)?(console.error(`${n} ${i} invalid value: ${s.message}`),!1):s.validValues&&-1===s.validValues.indexOf(o)?(console.error(`${n} ${i} invalid value: must be among ${JSON.stringify(s.validValues)}, "${o}" provided`),!1):(!s.children||!!a(o,s.children,`[Validate ${i}]`))&&!0});return i||o.push(...Object.keys(t).map(r=>{let i=t[r];if("string"==typeof i&&(i={type:i}),i.mandatory){let t=i.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[r])return console.error(`${n} Missing mandatory key "${r}"`),!1}return!0})),o.reduce((e,t)=>e&&t,!0)}function o(e){return a(e,r,"[Validate format]")}return l={validate:function(e,t){let r=i(e),n=o(t);return r&&n},validateFormat:o,validateInput:i,validateLanguage:function(e){return a(e,n,"[Validate language]")}}}var d=function(e,t={}){var r,n,i,a,o,s;let l,u,c,f;if("string"!=typeof e)return e;n=e=(l=(r=e).match(/^{([^}]*)}/))?(t.prefix=l[1],r.slice(l[0].length)):r,function(e,t){if(-1!==e.indexOf("$")){t.output="currency";return}if(-1!==e.indexOf("%")){t.output="percent";return}if(-1!==e.indexOf("bd")){t.output="byte",t.base="general";return}if(-1!==e.indexOf("b")){t.output="byte",t.base="binary";return}if(-1!==e.indexOf("d")){t.output="byte",t.base="decimal";return}if(-1!==e.indexOf(":")){t.output="time";return}-1!==e.indexOf("o")&&(t.output="ordinal")}(e=(u=n.match(/{([^}]*)}$/))?(t.postfix=u[1],n.slice(0,-u[0].length)):n,t),(c=e.match(/[1-9]+[0-9]*/))&&(t.totalLength=+c[0]),(f=e.split(".")[0].match(/0+/))&&(t.characteristic=f[0].length),-1!==(i=e).indexOf(".")&&(t.optionalCharacteristic=-1===i.split(".")[0].indexOf("0")),-1!==e.indexOf("a")&&(t.average=!0),-1!==(a=e).indexOf("K")?t.forceAverage="thousand":-1!==a.indexOf("M")?t.forceAverage="million":-1!==a.indexOf("B")?t.forceAverage="billion":-1!==a.indexOf("T")&&(t.forceAverage="trillion");let m=e.split(".")[1];if(m){let e=m.match(/0+/);e&&(t.mantissa=e[0].length)}(o=e).match(/\[\.]/)?t.optionalMantissa=!0:o.match(/\./)&&(t.optionalMantissa=!1);let g=e.split(".")[1];return g&&(t.trimMantissa=-1!==g.indexOf("[")),-1!==e.indexOf(",")&&(t.thousandSeparated=!0),-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0)),(s=e).match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),s.match(/^\+?-/)&&(t.negative="sign"),e.match(/^\+/)&&(t.forceSign=!0),t};function h(){let e;if(f)return c;f=1;let t=a?i:(a=1,i={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),r=p(),n={},o={},s=null,l={};function u(){return o[e]}return n.languages=()=>Object.assign({},o),n.currentLanguage=()=>e,n.currentBytes=()=>u().bytes||{},n.currentCurrency=()=>u().currency,n.currentAbbreviations=()=>u().abbreviations,n.currentDelimiters=()=>u().delimiters,n.currentOrdinal=()=>u().ordinal,n.currentDefaults=()=>Object.assign({},u().defaults,l),n.currentOrdinalDefaultFormat=()=>Object.assign({},n.currentDefaults(),u().ordinalFormat),n.currentByteDefaultFormat=()=>Object.assign({},n.currentDefaults(),u().byteFormat),n.currentPercentageDefaultFormat=()=>Object.assign({},n.currentDefaults(),u().percentageFormat),n.currentCurrencyDefaultFormat=()=>Object.assign({},n.currentDefaults(),u().currencyFormat),n.currentTimeDefaultFormat=()=>Object.assign({},n.currentDefaults(),u().timeFormat),n.setDefaults=e=>{e=d(e),r.validateFormat(e)&&(l=e)},n.getZeroFormat=()=>s,n.setZeroFormat=e=>s="string"==typeof e?e:null,n.hasZeroFormat=()=>null!==s,n.languageData=e=>{if(e){if(o[e])return o[e];throw Error(`Unknown tag "${e}"`)}return u()},n.registerLanguage=(t,n=!1)=>{if(!r.validateLanguage(t))throw Error("Invalid language data");o[t.languageTag]=t,n&&(e=t.languageTag)},n.setLanguage=(r,n=t.languageTag)=>{if(!o[r]){let t=r.split("-")[0],i=Object.keys(o).find(e=>e.split("-")[0]===t);return o[i]?void(e=i):void(e=n)}e=r},n.registerLanguage(t),e=t.languageTag,c=n}var y={exports:{}};(function(e){var t,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,a="[BigNumber Error] ",o=a+"Number primitive has more than 15 significant digits: ",s=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function l(e){var t=0|e;return e>0||e===t?t:t-1}function u(e){for(var t,r,n=1,i=e.length,a=e[0]+"";n<i;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function c(e,t){var r,n,i=e.c,a=t.c,o=e.s,s=t.s,l=e.e,u=t.e;if(!o||!s)return null;if(r=i&&!i[0],n=a&&!a[0],r||n)return r?n?0:-s:o;if(o!=s)return o;if(r=o<0,n=l==u,!i||!a)return n?0:!i^r?1:-1;if(!n)return l>u^r?1:-1;for(o=0,s=(l=i.length)<(u=a.length)?l:u;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^r?1:-1;return l==u?0:l>u^r?1:-1}function f(e,t,r,n){if(e<t||e>r||e!==i(e))throw Error(a+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function m(e){var t=e.c.length-1;return l(e.e/14)==t&&e.c[t]%2!=0}function g(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function p(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(n=e.length,++t>n){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(t=function e(t){var d,h,y,b,v,w,x,S,D,O=U.prototype={constructor:U,toString:null,valueOf:null},N=new U(1),$=20,B=4,F=-7,k=21,T=-1e7,M=1e7,E=!1,_=1,A=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},P="0123456789abcdefghijklmnopqrstuvwxyz",C=!0;function U(e,t){var n,a,s,l,u,c,m,g,p=this;if(!(p instanceof U))return new U(e,t);if(null==t){if(e&&!0===e._isBigNumber){p.s=e.s,!e.c||e.e>M?p.c=p.e=null:e.e<T?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice());return}if((c="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,u=e;u>=10;u/=10,l++);l>M?p.c=p.e=null:(p.e=l,p.c=[e]);return}g=String(e)}else{if(!r.test(g=String(e)))return D(p,g,c);p.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(l=g.indexOf("."))>-1&&(g=g.replace(".","")),(u=g.search(/e/i))>0?(l<0&&(l=u),l+=+g.slice(u+1),g=g.substring(0,u)):l<0&&(l=g.length)}else{if(f(t,2,P.length,"Base"),10==t&&C)return G(p=new U(e),$+p.e+1,B);if(g=String(e),c="number"==typeof e){if(0*e!=0)return D(p,g,c,t);if(p.s=1/e<0?(g=g.slice(1),-1):1,U.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(o+e)}else p.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=P.slice(0,t),l=u=0,m=g.length;u<m;u++)if(0>n.indexOf(a=g.charAt(u))){if("."==a){if(u>l){l=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,u=-1,l=0;continue}return D(p,String(e),c,t)}c=!1,(l=(g=S(g,t,10,p.s)).indexOf("."))>-1?g=g.replace(".",""):l=g.length}for(u=0;48===g.charCodeAt(u);u++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(u,++m)){if(m-=u,c&&U.DEBUG&&m>15&&(e>0x1fffffffffffff||e!==i(e)))throw Error(o+p.s*e);if((l=l-u-1)>M)p.c=p.e=null;else if(l<T)p.c=[p.e=0];else{if(p.e=l,p.c=[],u=(l+1)%14,l<0&&(u+=14),u<m){for(u&&p.c.push(+g.slice(0,u)),m-=14;u<m;)p.c.push(+g.slice(u,u+=14));u=14-(g=g.slice(u)).length}else u-=m;for(;u--;g+="0");p.c.push(+g)}}else p.c=[p.e=0]}function j(e,t,r,n){var i,a,o,s,l;if(null==r?r=B:f(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)l=u(e.c),l=1==n||2==n&&(o<=F||o>=k)?g(l,o):p(l,o,"0");else if(a=(e=G(new U(e),t,r)).e,s=(l=u(e.c)).length,1==n||2==n&&(t<=a||a<=F)){for(;s<t;l+="0",s++);l=g(l,a)}else if(t-=o,l=p(l,a,"0"),a+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=a-s)>0)for(a+1==s&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function I(e,t){for(var r,n,i=1,a=new U(e[0]);i<e.length;i++)(n=new U(e[i])).s&&(r=c(a,n))!==t&&(0!==r||a.s!==t)||(a=n);return a}function R(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+14*r-1)>M?e.c=e.e=null:r<T?e.c=[e.e=0]:(e.e=r,e.c=t),e}function G(e,t,r,a){var o,l,u,c,f,m,g,p=e.c;if(p){e:{for(o=1,c=p[0];c>=10;c/=10,o++);if((l=t-o)<0)l+=14,u=t,g=i((f=p[m=0])/s[o-u-1]%10);else if((m=n((l+1)/14))>=p.length)if(a){for(;p.length<=m;p.push(0));f=g=0,o=1,l%=14,u=l-14+1}else break e;else{for(o=1,f=c=p[m];c>=10;c/=10,o++);l%=14,g=(u=l-14+o)<0?0:i(f/s[o-u-1]%10)}if(a=a||t<0||null!=p[m+1]||(u<0?f:f%s[o-u-1]),a=r<4?(g||a)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||a||6==r&&(l>0?u>0?f/s[o-u]:0:p[m-1])%10&1||r==(e.s<0?8:7)),t<1||!p[0])return p.length=0,a?(t-=e.e+1,p[0]=s[(14-t%14)%14],e.e=-t||0):p[0]=e.e=0,e;if(0==l?(p.length=m,c=1,m--):(p.length=m+1,c=s[14-l],p[m]=u>0?i(f/s[o-u]%s[u])*c:0),a)for(;;)if(0==m){for(l=1,u=p[0];u>=10;u/=10,l++);for(u=p[0]+=c,c=1;u>=10;u/=10,c++);l!=c&&(e.e++,1e14==p[0]&&(p[0]=1));break}else{if(p[m]+=c,1e14!=p[m])break;p[m--]=0,c=1}for(l=p.length;0===p[--l];p.pop());}e.e>M?e.c=e.e=null:e.e<T&&(e.c=[e.e=0])}return e}function Z(e){var t,r=e.e;return null===r?e.toString():(t=u(e.c),t=r<=F||r>=k?g(t,r):p(t,r,"0"),e.s<0?"-"+t:t)}return U.clone=e,U.ROUND_UP=0,U.ROUND_DOWN=1,U.ROUND_CEIL=2,U.ROUND_FLOOR=3,U.ROUND_HALF_UP=4,U.ROUND_HALF_DOWN=5,U.ROUND_HALF_EVEN=6,U.ROUND_HALF_CEIL=7,U.ROUND_HALF_FLOOR=8,U.EUCLID=9,U.config=U.set=function(e){var t,r;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(f(r=e[t],0,1e9,t),$=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(f(r=e[t],0,8,t),B=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(f(r[0],-1e9,0,t),f(r[1],0,1e9,t),F=r[0],k=r[1]):(f(r,-1e9,1e9,t),F=-(k=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)f(r[0],-1e9,-1,t),f(r[1],1,1e9,t),T=r[0],M=r[1];else if(f(r,-1e9,1e9,t),r)T=-(M=r<0?-r:r);else throw Error(a+t+" cannot be zero: "+r);if(e.hasOwnProperty(t="CRYPTO"))if(!!(r=e[t])===r)if(r)if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))E=r;else throw E=!r,Error(a+"crypto unavailable");else E=r;else throw Error(a+t+" not true or false: "+r);if(e.hasOwnProperty(t="MODULO_MODE")&&(f(r=e[t],0,9,t),_=r),e.hasOwnProperty(t="POW_PRECISION")&&(f(r=e[t],0,1e9,t),A=r),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(r=e[t]))L=r;else throw Error(a+t+" not an object: "+r);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(a+t+" invalid: "+r);C="0123456789"==r.slice(0,10),P=r}}else throw Error(a+"Object expected: "+e);return{DECIMAL_PLACES:$,ROUNDING_MODE:B,EXPONENTIAL_AT:[F,k],RANGE:[T,M],CRYPTO:E,MODULO_MODE:_,POW_PRECISION:A,FORMAT:L,ALPHABET:P}},U.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!U.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if("[object Array]"==({}).toString.call(n)){if((1===s||-1===s)&&o>=-1e9&&o<=1e9&&o===i(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=1e14||r!==i(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},U.maximum=U.max=function(){return I(arguments,-1)},U.minimum=U.min=function(){return I(arguments,1)},d=0x20000000000000*Math.random()&2097151?function(){return i(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},U.random=function(e){var t,r,o,l,u,c=0,m=[],g=new U(N);if(null==e?e=$:f(e,0,1e9),l=n(e/14),E)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(l*=2));c<l;)(u=131072*t[c]+(t[c+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(m.push(u%1e14),c+=2);c=l/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(l*=7);c<l;)(u=(31&t[c])*0x1000000000000+0x10000000000*t[c+1]+0x100000000*t[c+2]+0x1000000*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(m.push(u%1e14),c+=7);c=l/7}else throw E=!1,Error(a+"crypto unavailable");if(!E)for(;c<l;)(u=d())<9e15&&(m[c++]=u%1e14);for(l=m[--c],e%=14,l&&e&&(u=s[14-e],m[c]=i(l/u)*u);0===m[c];m.pop(),c--);if(c<0)m=[o=0];else{for(o=-1;0===m[0];m.splice(0,1),o-=14);for(c=1,u=m[0];u>=10;u/=10,c++);c<14&&(o-=14-c)}return g.e=o,g.c=m,g},U.sum=function(){for(var e=1,t=arguments,r=new U(t[0]);e<t.length;)r=r.plus(t[e++]);return r},S=function(){var e="0123456789";function t(e,t,r,n){for(var i,a,o=[0],s=0,l=e.length;s<l;){for(a=o.length;a--;o[a]*=t);for(o[0]+=n.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(r,n,i,a,o){var s,l,c,f,m,g,d,h,y=r.indexOf("."),b=$,v=B;for(y>=0&&(f=A,A=0,r=r.replace(".",""),g=(h=new U(n)).pow(r.length-y),A=f,h.c=t(p(u(g.c),g.e,"0"),10,i,e),h.e=h.c.length),c=f=(d=t(r,n,i,o?(s=P,e):(s=e,P))).length;0==d[--f];d.pop());if(!d[0])return s.charAt(0);if(y<0?--c:(g.c=d,g.e=c,g.s=a,d=(g=x(g,h,b,v,i)).c,m=g.r,c=g.e),y=d[l=c+b+1],f=i/2,m=m||l<0||null!=d[l+1],m=v<4?(null!=y||m)&&(0==v||v==(g.s<0?3:2)):y>f||y==f&&(4==v||m||6==v&&1&d[l-1]||v==(g.s<0?8:7)),l<1||!d[0])r=m?p(s.charAt(1),-b,s.charAt(0)):s.charAt(0);else{if(d.length=l,m)for(--i;++d[--l]>i;)d[l]=0,l||(++c,d=[1].concat(d));for(f=d.length;!d[--f];);for(y=0,r="";y<=f;r+=s.charAt(d[y++]));r=p(r,c,s.charAt(0))}return r}}(),x=function(){function e(e,t,r){var n,i,a,o,s=0,l=e.length,u=t%1e7,c=t/1e7|0;for(e=e.slice();l--;)n=c*(a=e[l]%1e7)+(o=e[l]/1e7|0)*u,s=((i=u*a+n%1e7*1e7+s)/r|0)+(n/1e7|0)+c*o,e[l]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=+(e[r]<t[r]),e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,a,o,s,u){var c,f,m,g,p,d,h,y,b,v,w,x,S,D,O,N,$,B=n.s==a.s?1:-1,F=n.c,k=a.c;if(!F||!F[0]||!k||!k[0])return new U(!n.s||!a.s||(F?k&&F[0]==k[0]:!k)?NaN:F&&0==F[0]||!k?0*B:B/0);for(b=(y=new U(B)).c=[],B=o+(f=n.e-a.e)+1,u||(u=1e14,f=l(n.e/14)-l(a.e/14),B=B/14|0),m=0;k[m]==(F[m]||0);m++);if(k[m]>(F[m]||0)&&f--,B<0)b.push(1),g=!0;else{for(D=F.length,N=k.length,m=0,B+=2,(p=i(u/(k[0]+1)))>1&&(k=e(k,p,u),F=e(F,p,u),N=k.length,D=F.length),S=N,w=(v=F.slice(0,N)).length;w<N;v[w++]=0);$=[0].concat($=k.slice()),O=k[0],k[1]>=u/2&&O++;do{if(p=0,(c=t(k,v,N,w))<0){if(x=v[0],N!=w&&(x=x*u+(v[1]||0)),(p=i(x/O))>1)for(p>=u&&(p=u-1),h=(d=e(k,p,u)).length,w=v.length;1==t(d,v,h,w);)p--,r(d,N<h?$:k,h,u),h=d.length,c=1;else 0==p&&(c=p=1),h=(d=k.slice()).length;if(h<w&&(d=[0].concat(d)),r(v,d,w,u),w=v.length,-1==c)for(;1>t(k,v,N,w);)p++,r(v,N<w?$:k,w,u),w=v.length}else 0===c&&(p++,v=[0]);b[m++]=p,v[0]?v[w++]=F[S]||0:(v=[F[S]],w=1)}while((S++<D||null!=v[0])&&B--);g=null!=v[0],b[0]||b.splice(0,1)}if(1e14==u){for(m=1,B=b[0];B>=10;B/=10,m++);G(y,o+(y.e=m+14*f-1)+1,s,g)}else y.e=f,y.r=+g;return y}}(),h=/^(-?)0([xbo])(?=\w[\w.]*$)/i,y=/^([^.]+)\.$/,b=/^\.([^.]+)$/,v=/^-?(Infinity|NaN)$/,w=/^\s*\+(?=[\w.])|^\s+|\s+$/g,D=function(e,t,r,n){var i,o=r?t:t.replace(w,"");if(v.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(h,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(y,"$1").replace(b,"0.$1")),t!=o))return new U(o,i);if(U.DEBUG)throw Error(a+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},O.absoluteValue=O.abs=function(){var e=new U(this);return e.s<0&&(e.s=1),e},O.comparedTo=function(e,t){return c(this,new U(e,t))},O.decimalPlaces=O.dp=function(e,t){var r,n,i;if(null!=e)return f(e,0,1e9),null==t?t=B:f(t,0,8),G(new U(this),e+this.e+1,t);if(!(r=this.c))return null;if(n=((i=r.length-1)-l(this.e/14))*14,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},O.dividedBy=O.div=function(e,t){return x(this,new U(e,t),$,B)},O.dividedToIntegerBy=O.idiv=function(e,t){return x(this,new U(e,t),0,1)},O.exponentiatedBy=O.pow=function(e,t){var r,o,s,l,u,c,f,g,p,d=this;if((e=new U(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+Z(e));if(null!=t&&(t=new U(t)),c=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return p=new U(Math.pow(+Z(d),c?e.s*(2-m(e)):+Z(e))),t?p.mod(t):p;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new U(NaN);(o=!f&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||c&&d.c[1]>=24e7:d.c[0]<8e13||c&&d.c[0]<=9999975e7)))return l=d.s<0&&m(e)?-0:0,d.e>-1&&(l=1/l),new U(f?1/l:l);A&&(l=n(A/14+2))}for(c?(r=new U(.5),f&&(e.s=1),g=m(e)):g=(s=Math.abs(+Z(e)))%2,p=new U(N);;){if(g){if(!(p=p.times(d)).c)break;l?p.c.length>l&&(p.c.length=l):o&&(p=p.mod(t))}if(s){if(0===(s=i(s/2)))break;g=s%2}else if(G(e=e.times(r),e.e+1,1),e.e>14)g=m(e);else{if(0==(s=+Z(e)))break;g=s%2}d=d.times(d),l?d.c&&d.c.length>l&&(d.c.length=l):o&&(d=d.mod(t))}return o?p:(f&&(p=N.div(p)),t?p.mod(t):l?G(p,A,B,u):p)},O.integerValue=function(e){var t=new U(this);return null==e?e=B:f(e,0,8),G(t,t.e+1,e)},O.isEqualTo=O.eq=function(e,t){return 0===c(this,new U(e,t))},O.isFinite=function(){return!!this.c},O.isGreaterThan=O.gt=function(e,t){return c(this,new U(e,t))>0},O.isGreaterThanOrEqualTo=O.gte=function(e,t){return 1===(t=c(this,new U(e,t)))||0===t},O.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},O.isLessThan=O.lt=function(e,t){return 0>c(this,new U(e,t))},O.isLessThanOrEqualTo=O.lte=function(e,t){return -1===(t=c(this,new U(e,t)))||0===t},O.isNaN=function(){return!this.s},O.isNegative=function(){return this.s<0},O.isPositive=function(){return this.s>0},O.isZero=function(){return!!this.c&&0==this.c[0]},O.minus=function(e,t){var r,n,i,a,o=this.s;if(t=(e=new U(e,t)).s,!o||!t)return new U(NaN);if(o!=t)return e.s=-t,this.plus(e);var s=this.e/14,u=e.e/14,c=this.c,f=e.c;if(!s||!u){if(!c||!f)return c?(e.s=-t,e):new U(f?this:NaN);if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new U(c[0]?this:3==B?-0:0)}if(s=l(s),u=l(u),c=c.slice(),o=s-u){for((a=o<0)?(o=-o,i=c):(u=s,i=f),i.reverse(),t=o;t--;i.push(0));i.reverse()}else for(n=(a=(o=c.length)<(t=f.length))?o:t,o=t=0;t<n;t++)if(c[t]!=f[t]){a=c[t]<f[t];break}if(a&&(i=c,c=f,f=i,e.s=-e.s),(t=(n=f.length)-(r=c.length))>0)for(;t--;c[r++]=0);for(t=1e14-1;n>o;){if(c[--n]<f[n]){for(r=n;r&&!c[--r];c[r]=t);--c[r],c[n]+=1e14}c[n]-=f[n]}for(;0==c[0];c.splice(0,1),--u);return c[0]?R(e,c,u):(e.s=3==B?-1:1,e.c=[e.e=0],e)},O.modulo=O.mod=function(e,t){var r,n;return(e=new U(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==_?(n=e.s,e.s=1,r=x(this,e,0,3),e.s=n,r.s*=n):r=x(this,e,0,_),(e=this.minus(r.times(e))).c[0]||1!=_||(e.s=this.s),e):new U(this):new U(NaN)},O.multipliedBy=O.times=function(e,t){var r,n,i,a,o,s,u,c,f,m,g,p,d,h=this.c,y=(e=new U(e,t)).c;if(!h||!y||!h[0]||!y[0])return this.s&&e.s&&(!h||h[0]||y)&&(!y||y[0]||h)?(e.s*=this.s,h&&y?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(n=l(this.e/14)+l(e.e/14),e.s*=this.s,(u=h.length)<(m=y.length)&&(d=h,h=y,y=d,i=u,u=m,m=i),i=u+m,d=[];i--;d.push(0));for(i=m;--i>=0;){for(r=0,g=y[i]%1e7,p=y[i]/1e7|0,a=i+(o=u);a>i;)s=p*(c=h[--o]%1e7)+(f=h[o]/1e7|0)*g,r=((c=g*c+s%1e7*1e7+d[a]+r)/1e14|0)+(s/1e7|0)+p*f,d[a--]=c%1e14;d[a]=r}return r?++n:d.splice(0,1),R(e,d,n)},O.negated=function(){var e=new U(this);return e.s=-e.s||null,e},O.plus=function(e,t){var r,n=this.s;if(t=(e=new U(e,t)).s,!n||!t)return new U(NaN);if(n!=t)return e.s=-t,this.minus(e);var i=this.e/14,a=e.e/14,o=this.c,s=e.c;if(!i||!a){if(!o||!s)return new U(n/0);if(!o[0]||!s[0])return s[0]?e:new U(o[0]?this:0*n)}if(i=l(i),a=l(a),o=o.slice(),n=i-a){for(n>0?(a=i,r=s):(n=-n,r=o),r.reverse();n--;r.push(0));r.reverse()}for((n=o.length)-(t=s.length)<0&&(r=s,s=o,o=r,t=n),n=0;t;)n=(o[--t]=o[t]+s[t]+n)/1e14|0,o[t]=1e14===o[t]?0:o[t]%1e14;return n&&(o=[n].concat(o),++a),R(e,o,a)},O.precision=O.sd=function(e,t){var r,n,i;if(null!=e&&!!e!==e)return f(e,1,1e9),null==t?t=B:f(t,0,8),G(new U(this),e,t);if(!(r=this.c))return null;if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&this.e+1>n&&(n=this.e+1),n},O.shiftedBy=function(e){return f(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},O.squareRoot=O.sqrt=function(){var e,t,r,n,i,a=this.c,o=this.s,s=this.e,c=$+4,f=new U("0.5");if(1!==o||!a||!a[0])return new U(!o||o<0&&(!a||a[0])?NaN:a?this:1/0);if(0==(o=Math.sqrt(+Z(this)))||o==1/0?(((t=u(a)).length+s)%2==0&&(t+="0"),o=Math.sqrt(+t),s=l((s+1)/2)-(s<0||s%2),r=new U(t=o==1/0?"5e"+s:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+s)):r=new U(o+""),r.c[0]){for((o=(s=r.e)+c)<3&&(o=0);;)if(i=r,r=f.times(i.plus(x(this,i,c,1))),u(i.c).slice(0,o)===(t=u(r.c)).slice(0,o)){if(r.e<s&&--o,"9999"!=(t=t.slice(o-3,o+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(G(r,r.e+$+2,1),e=!r.times(r).eq(this));break}if(!n&&(G(i,i.e+$+2,0),i.times(i).eq(this))){r=i;break}c+=4,o+=4,n=1}}return G(r,r.e+$+1,B,e)},O.toExponential=function(e,t){return null!=e&&(f(e,0,1e9),e++),j(this,e,t,1)},O.toFixed=function(e,t){return null!=e&&(f(e,0,1e9),e=e+this.e+1),j(this,e,t)},O.toFormat=function(e,t,r){var n;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=L;else if("object"!=typeof r)throw Error(a+"Argument not an object: "+r);if(n=this.toFixed(e,t),this.c){var i,o=n.split("."),s=+r.groupSize,l=+r.secondaryGroupSize,u=r.groupSeparator||"",c=o[0],f=o[1],m=this.s<0,g=m?c.slice(1):c,p=g.length;if(l&&(i=s,s=l,l=i,p-=i),s>0&&p>0){for(i=p%s||s,c=g.substr(0,i);i<p;i+=s)c+=u+g.substr(i,s);l>0&&(c+=u+g.slice(i)),m&&(c="-"+c)}n=f?c+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?f.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):c}return(r.prefix||"")+n+(r.suffix||"")},O.toFraction=function(e){var t,r,n,i,o,l,c,f,m,g,p,d,h=this.c;if(null!=e&&(!(c=new U(e)).isInteger()&&(c.c||1!==c.s)||c.lt(N)))throw Error(a+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+Z(c));if(!h)return new U(this);for(t=new U(N),m=r=new U(N),n=f=new U(N),d=u(h),o=t.e=d.length-this.e-1,t.c[0]=s[(l=o%14)<0?14+l:l],e=!e||c.comparedTo(t)>0?o>0?t:m:c,l=M,M=1/0,c=new U(d),f.c[0]=0;g=x(c,t,0,1),1!=(i=r.plus(g.times(n))).comparedTo(e);)r=n,n=i,m=f.plus(g.times(i=m)),f=i,t=c.minus(g.times(i=t)),c=i;return i=x(e.minus(r),n,0,1),f=f.plus(i.times(m)),r=r.plus(i.times(n)),f.s=m.s=this.s,o*=2,p=1>x(m,n,o,B).minus(this).abs().comparedTo(x(f,r,o,B).minus(this).abs())?[m,n]:[f,r],M=l,p},O.toNumber=function(){return+Z(this)},O.toPrecision=function(e,t){return null!=e&&f(e,1,1e9),j(this,e,t,2)},O.toString=function(e){var t,r=this,n=r.s,i=r.e;return null===i?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(null==e?t=i<=F||i>=k?g(u(r.c),i):p(u(r.c),i,"0"):10===e&&C?t=p(u((r=G(new U(r),$+i+1,B)).c),r.e,"0"):(f(e,2,P.length,"Base"),t=S(p(u(r.c),i,"0"),10,e,n,!0)),n<0&&r.c[0]&&(t="-"+t)),t},O.valueOf=O.toJSON=function(){return Z(this)},O._isBigNumber=!0,null!=t&&U.set(t),U}()).default=t.BigNumber=t,y.exports?y.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)})(m);var b=y.exports;let v=h(),w=p(),x={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},S={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:D,decimalSuffixes:O}=v.currentBytes(),N={scale:1024,suffixes:O,marker:"bd"},$={scale:1024,suffixes:D,marker:"b"},B={scale:1e3,suffixes:O,marker:"d"};function F(e,t,r){let n=t[0],i=Math.abs(e);if(i>=r){for(let a=1;a<t.length;++a){let o=Math.pow(r,a),s=Math.pow(r,a+1);if(i>=o&&i<s){n=t[a],e/=o;break}}n===t[0]&&(e/=Math.pow(r,t.length-1),n=t[t.length-1])}return{value:e,suffix:n}}function k(e){let t="";for(let r=0;r<e;r++)t+="0";return t}function T({instance:e,providedFormat:t,state:r=v,decimalSeparator:n,defaults:i=r.currentDefaults()}){var a,o;let s=e._value;if(0===s&&r.hasZeroFormat())return r.getZeroFormat();if(!isFinite(s))return s.toString();let l=Object.assign({},S,i,t),u=l.totalLength,c=u?0:l.characteristic,f=l.optionalCharacteristic,m=l.forceAverage,g=l.lowPrecision,p=!!u||!!m||l.average,d=u?-1:p&&void 0===t.mantissa?0:l.mantissa,h=!u&&(void 0===t.optionalMantissa?-1===d:l.optionalMantissa),y=l.trimMantissa,w=l.thousandSeparated,D=l.spaceSeparated,O=l.negative,N=l.forceSign,$=l.exponential,B=l.roundingFunction,F="";if(p){let e=function({value:e,forceAverage:t,lowPrecision:r=!0,abbreviations:n,spaceSeparated:i=!1,totalLength:a=0,roundingFunction:o=Math.round}){let s="",l=Math.abs(e),u=-1;if(t&&n[t]&&x[t]?(s=n[t],e/=x[t]):l>=x.trillion||r&&1===o(l/x.trillion)?(s=n.trillion,e/=x.trillion):l<x.trillion&&l>=x.billion||r&&1===o(l/x.billion)?(s=n.billion,e/=x.billion):l<x.billion&&l>=x.million||r&&1===o(l/x.million)?(s=n.million,e/=x.million):(l<x.million&&l>=x.thousand||r&&1===o(l/x.thousand))&&(s=n.thousand,e/=x.thousand),s&&(s=(i?" ":"")+s),a){let t=e<0,r=e.toString().split(".")[0];u=Math.max(a-(t?r.length-1:r.length),0)}return{value:e,abbreviation:s,mantissaPrecision:u}}({value:s,forceAverage:m,lowPrecision:g,abbreviations:r.currentAbbreviations(),spaceSeparated:D,roundingFunction:B,totalLength:u});s=e.value,F+=e.abbreviation,u&&(d=e.mantissaPrecision)}if($){let e=function({value:e,characteristicPrecision:t}){let[r,n]=e.toExponential().split("e"),i=+r;return t&&1<t&&(i*=Math.pow(10,t-1),n-=t-1,n=n>=0?`+${n}`:n),{value:i,abbreviation:`e${n}`}}({value:s,characteristicPrecision:c});s=e.value,F=e.abbreviation+F}let T=function(e,t,r,n,i,a){if(-1===n)return e;let o=function(e,t,r=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let r=e.toString(),[n,i]=r.split("e"),[a,o=""]=n.split(".");if(+i>0)r=a+o+k(i-o.length);else{let e=".";e=0>+a?`-0${e}`:`0${e}`;let n=(k(-i-1)+Math.abs(a)+o).substr(0,t);n.length<t&&(n+=k(t-n.length)),r=e+n}return+i>0&&t>0&&(r+=`.${k(t)}`),r}(e,t):new b(r(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,n,a),[s,l=""]=o.toString().split(".");if(l.match(/^0+$/)&&(r||i))return s;let u=l.match(/0+$/);return i&&u?`${s}.${l.toString().slice(0,u.index)}`:o.toString()}(s.toString(),s,h,d,y,B);return T=function(e,t,r,n,i){let a=n.currentDelimiters(),o=a.thousands;i=i||a.decimal;let s=a.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1],f=t<0&&0===u.indexOf("-");return r&&(f&&(u=u.slice(1)),(function(e,t){let r=[],n=0;for(let i=e;i>0;i--)n===t&&(r.unshift(i),n=0),n++;return r})(u.length,s).forEach((e,t)=>{u=u.slice(0,e+t)+o+u.slice(e+t)}),f&&(u=`-${u}`)),l=c?u+i+c:u}(T=function(e,t,r,n){let i=e,[a,o]=i.toString().split(".");if(a.match(/^-?0$/)&&r)return o?`${a.replace("0","")}.${o}`:a.replace("0","");let s=t<0&&0===a.indexOf("-");if(s&&(a=a.slice(1),i=i.slice(1)),a.length<n){let e=n-a.length;for(let t=0;t<e;t++)i=`0${i}`}return s&&(i=`-${i}`),i.toString()}(T,s,f,c),s,w,r,n),(p||$)&&(T+=F),(N||s<0)&&(a=T,T=0===(o=s)?a:0==+a?a.replace("-",""):o>0?`+${a}`:"sign"===O?a:`(${a.replace("-","")})`),T}function M(e,t){if(!e)return t;let r=Object.keys(e);return 1===r.length&&"output"===r[0]?t:e}function E(e,t,r){let n=new b(e._value),i=t;return r.isNumbro(t)&&(i=t._value),i=new b(i),e._value=n.minus(i).toNumber(),e}let _=h(),A=p(),L={loadLanguagesInNode:e=>{e.forEach(e=>{let t;try{t=function(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}t&&R.registerLanguage(t)})}},P=g(),C={format:(...e)=>(function(e,t={},r){if("string"==typeof t&&(t=d(t)),!w.validateFormat(t))return"ERROR: invalid format";let n=t.prefix||"",i=t.postfix||"",a=function(e,t,r){var n,i;switch(t.output){case"currency":return function(e,t,r){let n,i=r.currentCurrency(),a=Object.assign({},t),o=Object.assign({},S,a),s="",l=!!o.totalLength||!!o.forceAverage||o.average,u=a.currencyPosition||i.position,c=a.currencySymbol||i.symbol,f=void 0!==o.spaceSeparatedCurrency?o.spaceSeparatedCurrency:o.spaceSeparated;void 0===a.lowPrecision&&(a.lowPrecision=!1),f&&(s=" "),"infix"===u&&(n=s+c+s);let m=T({instance:e,providedFormat:a,state:r,decimalSeparator:n});return"prefix"===u&&(m=e._value<0&&"sign"===o.negative?`-${s}${c}${m.slice(1)}`:e._value>0&&o.forceSign?`+${s}${c}${m.slice(1)}`:c+s+m),u&&"postfix"!==u||(m=m+(s=!o.spaceSeparatedAbbreviation&&l?"":s)+c),m}(e,t=M(t,v.currentCurrencyDefaultFormat()),v);case"percent":let a,o,s;return n=t=M(t,v.currentPercentageDefaultFormat()),a=n.prefixSymbol,o=T({instance:r(100*e._value),providedFormat:n,state:v}),s=Object.assign({},S,n),a?`%${s.spaceSeparated?" ":""}${o}`:`${o}${s.spaceSeparated?" ":""}%`;case"byte":return function(e,t,r,n){let i=t.base||"binary",a=Object.assign({},S,t),{binarySuffixes:o,decimalSuffixes:s}=r.currentBytes(),l={general:{scale:1024,suffixes:s||O,marker:"bd"},binary:{scale:1024,suffixes:o||D,marker:"b"},decimal:{scale:1e3,suffixes:s||O,marker:"d"}}[i],{value:u,suffix:c}=F(e._value,l.suffixes,l.scale),f=T({instance:n(u),providedFormat:t,state:r,defaults:r.currentByteDefaultFormat()});return`${f}${a.spaceSeparated?" ":""}${c}`}(e,t=M(t,v.currentByteDefaultFormat()),v,r);case"time":let l,u,c;return t=M(t,v.currentTimeDefaultFormat()),l=Math.floor(e._value/60/60),u=Math.floor((e._value-60*l*60)/60),c=Math.round(e._value-60*l*60-60*u),`${l}:${u<10?"0":""}${u}:${c<10?"0":""}${c}`;case"ordinal":let f,m,g,p;return i=t=M(t,v.currentOrdinalDefaultFormat()),f=v.currentOrdinal(),m=Object.assign({},S,i),g=T({instance:e,providedFormat:i,state:v}),p=f(e._value),`${g}${m.spaceSeparated?" ":""}${p}`;default:return T({instance:e,providedFormat:t,numbro:r})}}(e,t,r);return(a=n+a)+i})(...e,R),getByteUnit:(...e)=>(function(e){return F(e._value,N.suffixes,N.scale).suffix})(...e,R),getBinaryByteUnit:(...e)=>(function(e){return F(e._value,$.suffixes,$.scale).suffix})(...e,R),getDecimalByteUnit:(...e)=>(function(e){return F(e._value,B.suffixes,B.scale).suffix})(...e,R),formatOrDefault:M},U={add:(e,t)=>{let r,n;return r=new b(e._value),n=t,R.isNumbro(t)&&(n=t._value),n=new b(n),e._value=r.plus(n).toNumber(),e},subtract:(e,t)=>E(e,t,R),multiply:(e,t)=>{let r,n;return r=new b(e._value),n=t,R.isNumbro(t)&&(n=t._value),n=new b(n),e._value=r.times(n).toNumber(),e},divide:(e,t)=>{let r,n;return r=new b(e._value),n=t,R.isNumbro(t)&&(n=t._value),n=new b(n),e._value=r.dividedBy(n).toNumber(),e},set:(e,t)=>{let r;return r=t,R.isNumbro(t)&&(r=t._value),e._value=r,e},difference:(e,t)=>{let r;return E(r=R(e._value),t,R),Math.abs(r._value)},BigNumber:b};class j{constructor(e){this._value=e}clone(){return R(this._value)}format(e={}){return C.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=d(e)),(e=C.formatOrDefault(e,_.currentCurrencyDefaultFormat())).output="currency",C.format(this,e)}formatTime(e={}){return e.output="time",C.format(this,e)}binaryByteUnits(){return C.getBinaryByteUnit(this)}decimalByteUnits(){return C.getDecimalByteUnit(this)}byteUnits(){return C.getByteUnit(this)}difference(e){return U.difference(this,e)}add(e){return U.add(this,e)}subtract(e){return U.subtract(this,e)}multiply(e){return U.multiply(this,e)}divide(e){return U.divide(this,e)}set(e){return U.set(this,I(e))}value(){return this._value}valueOf(){return this._value}}function I(e){let t=e;return R.isNumbro(e)?t=e._value:"string"==typeof e?t=R.unformat(e):isNaN(e)&&(t=NaN),t}function R(e){return new j(I(e))}R.version="2.5.0",R.isNumbro=function(e){return e instanceof j},R.language=_.currentLanguage,R.registerLanguage=_.registerLanguage,R.setLanguage=_.setLanguage,R.languages=_.languages,R.languageData=_.languageData,R.zeroFormat=_.setZeroFormat,R.defaultFormat=_.currentDefaults,R.setDefaults=_.setDefaults,R.defaultCurrencyFormat=_.currentCurrencyDefaultFormat,R.validate=A.validate,R.loadLanguagesInNode=L.loadLanguagesInNode,R.unformat=P.unformat,R.BigNumber=U.BigNumber;var G=R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R,Z=r(20147),V=r(15418);function q(e,{unit:t="bytes",shortValues:r,decimalPlaces:n}){let i="decbytes"===t;if(!(0,V.lk)(r)||Math.abs(e)<(i?1e3:1024)){let t={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return(0,V.ej)(n)?(t.minimumFractionDigits=(0,V.Gs)(n),t.maximumFractionDigits=(0,V.Gs)(n)):(0,V.lk)(r)&&(t.maximumSignificantDigits=Z.$),Intl.NumberFormat("en-US",t).format(e)}return G(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:(0,V.ej)(n)?n:2,trimMantissa:!(0,V.ej)(n),optionalMantissa:!(0,V.ej)(n)})}let z="Percent",W="Temperature",Y="Time";var H=((n={}).nanoseconds="nanosecond",n.microseconds="microsecond",n.milliseconds="millisecond",n.seconds="second",n.minutes="minute",n.hours="hour",n.days="day",n.weeks="week",n.months="month",n.years="year",n);let K={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001,microseconds:1e-6,nanoseconds:1e-9},J=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"],X="Throughput";var Q=r(93098);let ee="Currency",et="Date",er={Time:{label:"Time",decimalPlaces:!0},Percent:{label:"percent",decimalPlaces:!0},Decimal:{label:"Decimal",decimalPlaces:!0,shortValues:!0},Bytes:{label:"Bytes",decimalPlaces:!0,shortValues:!0},Throughput:{label:"Throughput",decimalPlaces:!0},Currency:{label:"Currency",decimalPlaces:!0},Temperature:{label:W,decimalPlaces:!0},Date:{label:"Date & Time"}},en={nanoseconds:{group:Y,label:"Nanoseconds"},microseconds:{group:Y,label:"Microseconds"},milliseconds:{group:Y,label:"Milliseconds"},seconds:{group:Y,label:"Seconds"},minutes:{group:Y,label:"Minutes"},hours:{group:Y,label:"Hours"},days:{group:Y,label:"Days"},weeks:{group:Y,label:"Weeks"},months:{group:Y,label:"Months"},years:{group:Y,label:"Years"},percent:{group:z,label:"Percent (0-100)"},"percent-decimal":{group:z,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:z,label:"%"},decimal:{group:"Decimal",label:"Decimal"},bytes:{group:"Bytes",label:"Bytes (IEC)"},decbytes:{group:"Bytes",label:"Bytes (SI)"},"bits/sec":{group:X,label:"Bits/sec"},"bytes/sec":{group:X,label:"Bytes/sec (IEC)"},"decbytes/sec":{group:X,label:"Bytes/sec (SI)"},"counts/sec":{group:X,label:"Counts/sec"},"events/sec":{group:X,label:"Events/sec"},"messages/sec":{group:X,label:"Messages/sec"},"ops/sec":{group:X,label:"Ops/sec"},"packets/sec":{group:X,label:"Packets/sec"},"reads/sec":{group:X,label:"Reads/sec"},"requests/sec":{group:X,label:"Requests/sec"},"records/sec":{group:X,label:"Records/sec"},"rows/sec":{group:X,label:"Rows/sec"},"writes/sec":{group:X,label:"Writes/sec"},aud:{group:ee,label:"Australian Dollar (A$)"},cad:{group:ee,label:"Canadian Dollar (CA$)"},chf:{group:ee,label:"Swiss Franc (CHF)"},cny:{group:ee,label:"Renminbi (CN\xa5)"},eur:{group:ee,label:"Euro (€)"},gbp:{group:ee,label:"Pound (\xa3)"},hkd:{group:ee,label:"Hong Kong Dollar (HK$)"},inr:{group:ee,label:"Indian Rupee (₹)"},jpy:{group:ee,label:"Yen (\xa5)"},krw:{group:ee,label:"South Korean Won (₩)"},nok:{group:ee,label:"Norwegian Krone (NOK)"},nzd:{group:ee,label:"New Zealand Dollar (NZ$)"},sek:{group:ee,label:"Swedish Krona (SEK)"},sgd:{group:ee,label:"Singapore Dollar (S$)"},usd:{group:ee,label:"US Dollar ($)"},celsius:{group:W,label:"Celsius (\xb0C)"},fahrenheit:{group:W,label:"Fahrenheit (\xb0F)"},"datetime-iso":{group:et,label:"DateTime (GMT)"},"datetime-us":{group:et,label:"DateTime (US-East)"},"datetime-local":{group:et,label:"DateTime (Browser Local)"},"date-iso":{group:et,label:"Date (GMT)"},"date-us":{group:et,label:"Date (US-East)"},"date-local":{group:et,label:"Date (Browser Local)"},"time-local":{group:et,label:"Time (Browser Local)"},"time-iso":{group:et,label:"Time (GMT)"},"time-us":{group:et,label:"Time (US-East)"},"relative-time":{group:et,label:"Relative Time"},"unix-timestamp":{group:et,label:"Unix Timestamp (s)"},"unix-timestamp-ms":{group:et,label:"Unix Timestamp (ms)"}};function ei(e,t){if(!t)return e.toString();if(ef(t))return q(e,t);if(ec(t))return function(e,{shortValues:t,decimalPlaces:r}){let n={style:"decimal",useGrouping:!0};return(0,V.lk)(t)&&(n.notation="compact"),(0,V.ej)(r)?(n.minimumFractionDigits=(0,V.Gs)(r),n.maximumFractionDigits=(0,V.Gs)(r)):(0,V.lk)(t)&&(n.maximumSignificantDigits=Z.$),Intl.NumberFormat("en-US",n).format(e)}(e,t);if(eu(t))return function(e,{unit:t,decimalPlaces:r}){let n={style:"percent",useGrouping:!0};return(0,V.ej)(r)?(n.minimumFractionDigits=(0,V.Gs)(r),n.maximumFractionDigits=(0,V.Gs)(r)):n.maximumSignificantDigits=Z.$,"percent"===t&&(e/=100),Intl.NumberFormat("en-US",n).format(e)}(e,t);if(el(t))return function(e,{unit:t,decimalPlaces:r}){var n;if(0===e)return"0s";let i=function(e,t){let r=e*K[t],n=J[0]||"years",i=n,a=r/K[n];for(i of J)if((a=r/K[i])>=1)break;return{value:a,unit:i}}(e,t??"seconds"),a={style:"unit",unit:H[i.unit],unitDisplay:"months"===(n=i.unit)||"years"===n?"long":"narrow"};return(0,V.ej)(r)?(a.minimumFractionDigits=(0,V.Gs)(r),a.maximumFractionDigits=(0,V.Gs)(r)):a.maximumSignificantDigits=Z.$,Intl.NumberFormat("en-US",a).format(i.value)}(e,t);if(ep(t))return function(e,{unit:t,shortValues:r,decimalPlaces:n}){if("decbytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return q(e,{unit:"decbytes",shortValues:r,decimalPlaces:n})+"/"+t}if("bytes/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return q(e,{unit:"bytes",shortValues:r,decimalPlaces:n})+"/"+t}let i={style:"decimal",useGrouping:!0};return(0,V.lk)(r)&&(i.notation="compact"),(0,V.ej)(n)?(i.minimumFractionDigits=(0,V.Gs)(n),i.maximumFractionDigits=(0,V.Gs)(n)):(0,V.lk)(r)&&(i.maximumSignificantDigits=Z.$),Intl.NumberFormat("en-US",i).format(e)+" "+t}(e,t);if(ed(t))return function(e,{unit:t,decimalPlaces:r}){let n={style:"currency",currency:(0,Q.toUpper)(t),currencyDisplay:"symbol"};return(0,V.ej)(r)?(n.minimumFractionDigits=(0,V.Gs)(r),n.maximumFractionDigits=(0,V.Gs)(r)):n.maximumSignificantDigits=Z.$,Intl.NumberFormat("en-US",n).format(e)}(e,t);if(eh(t))return function(e,t={}){let r=Intl.DateTimeFormat().resolvedOptions().timeZone,{unit:n="datetime-local",locale:i=(()=>{if("undefined"!=typeof navigator){if(navigator.language)return navigator.language;if(navigator.languages&&navigator.languages.length>0){let e=navigator.languages[0];if(e)return e}let e=navigator;if(e.userLanguage)return e.userLanguage;if(e.browserLanguage)return e.browserLanguage;if(e.systemLanguage)return e.systemLanguage}return Intl.DateTimeFormat().resolvedOptions().locale||"en-US"})(),timeZone:a=r,referenceTime:o=Date.now()}=t;if("unix-timestamp"===n)return(e>1e12?Math.floor(e/1e3):e).toString();if("unix-timestamp-ms"===n)return Math.floor(e<1e11?1e3*e:e).toString();let s=function(e){if(e<0)if(Math.abs(e)>1e10)return new Date(e);else return new Date(1e3*e);if(e>=25e10&&e<=26e10){let t=new Date(1e3*e);if(t.getUTCFullYear()>=9999)return t}return new Date(e<1e10?1e3*e:e)}(e);if("relative-time"===n){let e=new Date(o),t=s.getTime()-e.getTime();for(let{unit:e,ms:r}of[{unit:"year",ms:31536e6},{unit:"month",ms:2592e6},{unit:"week",ms:6048e5},{unit:"day",ms:864e5},{unit:"hour",ms:36e5},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}]){let n=Math.round(t/r);if(Math.abs(n)>=1)return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(n,e)}return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(0,"second")}let l={timeZone:a};switch(n){case"datetime-iso":return s.toISOString();case"datetime-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);case"datetime-local":l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"date-iso":return s.toISOString().split("T")[0];case"date-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",new Intl.DateTimeFormat("en-US",l).format(s);case"date-local":l.year="numeric",l.month="2-digit",l.day="2-digit";break;case"time-local":l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"time-iso":return s.toISOString().split("T")[1].replace("Z","");case"time-us":return l.timeZone="America/New_York",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(s);default:throw Error(`Unknown date unit: ${n}`)}return new Intl.DateTimeFormat(i,l).format(s)}(e,t);if(ey(t))return((e,{unit:t,decimalPlaces:r})=>{let n={unit:t,style:"unit"};(0,V.ej)(r)?(n.minimumFractionDigits=(0,V.Gs)(r),n.maximumFractionDigits=(0,V.Gs)(r)):n.maximumSignificantDigits=Z.$;let i="celsius"===t?"en-GB":"en-US";return Intl.NumberFormat(i,n).format(e)})(e,t);throw Error(`Unknown unit options ${t}`)}function ea(e){return en[e.unit??"decimal"]}function eo(e){return ea(e).group??"Decimal"}function es(e){return er[ea(e).group??"Decimal"]}function el(e){return"Time"===eo(e)}function eu(e){return"Percent"===eo(e)}function ec(e){return"Decimal"===eo(e)}function ef(e){return"Bytes"===eo(e)}function em(e){return!!es(e).decimalPlaces}function eg(e){return!!es(e).shortValues}function ep(e){return"Throughput"===eo(e)}function ed(e){return"Currency"===eo(e)}function eh(e){return"Date"===eo(e)}function ey(e){return"Temperature"===eo(e)}},15418:function(e,t,r){function n(e){return!1!==e}function i(e){return"number"==typeof e}function a(e){return e&&(e<0?e=0:e>20&&(e=20)),e}r.d(t,{Gs:()=>a,ej:()=>i,lk:()=>n})},86396:function(e,t,r){var n;t.default=void 0,t.default=(0,((n=r(30265))&&n.__esModule?n:{default:n}).default)("M19,13H5V11H19V13Z","Minus")}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see __federation_expose_LokiDatasource.
|
|
2
|
-
"use strict";(self.chunk_Loki=self.chunk_Loki||[]).push([["2863"],{71426:function(e,t,a){var r=a(54538),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function d(e,t,a){var r,i={},d=null,l=null;for(r in void 0!==a&&(d=""+a),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!p.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:n,type:e,key:d,ref:l,props:i,_owner:o.current}}t.Fragment=i,t.jsx=d,t.jsxs=d},24246:function(e,t,a){e.exports=a(71426)},45172:function(e,t,a){async function r(e,t){let a=n("/loki/api/v1/query",t.datasourceUrl);return a.searchParams.append("query",e.query),e.time&&a.searchParams.append("time",e.time),e.direction&&a.searchParams.append("direction",e.direction),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}function n(e,t){if(t.startsWith("http://")||t.startsWith("https://"))return new URL(e,t);return new URL(t.endsWith("/")&&e.startsWith("/")?t+e.slice(1):t.endsWith("/")||e.startsWith("/")?t+e:t+"/"+e,window.location.origin)}function i(e){if(e instanceof Date)return Math.floor(e.getTime()/1e3).toString();if("number"==typeof e)return Math.floor(e>1e11?e/1e3:e).toString();if(/^\d+$/.test(e)){let t=Number(e);return Math.floor(t>1e11?t/1e3:t).toString()}return Math.floor(new Date(e).getTime()/1e3).toString()}async function s(e,t){let a=n("/loki/api/v1/query_range",t.datasourceUrl);return a.searchParams.append("query",e.query),a.searchParams.append("start",i(e.start)),a.searchParams.append("end",i(e.end)),e.step&&a.searchParams.append("step",e.step),e.interval&&a.searchParams.append("interval",e.interval),e.direction&&a.searchParams.append("direction",e.direction),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}async function o(e,t,a){let r=n("/loki/api/v1/labels",a.datasourceUrl);return e&&r.searchParams.append("start",e),t&&r.searchParams.append("end",t),(await fetch(r.toString(),{method:"GET",headers:{"Content-Type":"application/json",...a.headers}})).json()}async function p(e,t,a,r){let i=n(`/loki/api/v1/label/${e}/values`,r.datasourceUrl);return t&&i.searchParams.append("start",t),a&&i.searchParams.append("end",a),(await fetch(i.toString(),{method:"GET",headers:{"Content-Type":"application/json",...r.headers}})).json()}async function d(e,t,a,r){let i=n("/loki/api/v1/series",r.datasourceUrl);return e.forEach(e=>i.searchParams.append("match[]",e)),t&&i.searchParams.append("start",t),a&&i.searchParams.append("end",a),(await fetch(i.toString(),{method:"GET",headers:{"Content-Type":"application/json",...r.headers}})).json()}async function l(e,t){let a=n("/loki/api/v1/index/volume",t.datasourceUrl);return a.searchParams.append("query",e.query),a.searchParams.append("start",e.start),a.searchParams.append("end",e.end),e.step&&a.searchParams.append("step",e.step),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}async function c(e,t){let a=n("/loki/api/v1/index/volume_range",t.datasourceUrl);return a.searchParams.append("query",e.query),a.searchParams.append("start",e.start),a.searchParams.append("end",e.end),e.step&&a.searchParams.append("step",e.step),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}async function h(e,t,a,r){let i=n("/loki/api/v1/index/stats",r.datasourceUrl);return i.searchParams.append("query",e),t&&i.searchParams.append("start",t),a&&i.searchParams.append("end",a),(await fetch(i.toString(),{method:"GET",headers:{"Content-Type":"application/json",...r.headers}})).json()}a.r(t),a.d(t,{LokiDatasourceEditor:()=>f,LokiDatasource:()=>P});var u=a(24246),m=a(
|
|
1
|
+
/*! For license information please see __federation_expose_LokiDatasource.3ce6abca.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.chunk_Loki=self.chunk_Loki||[]).push([["2863"],{71426:function(e,t,a){var r=a(54538),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function d(e,t,a){var r,i={},d=null,l=null;for(r in void 0!==a&&(d=""+a),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!p.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:n,type:e,key:d,ref:l,props:i,_owner:o.current}}t.Fragment=i,t.jsx=d,t.jsxs=d},24246:function(e,t,a){e.exports=a(71426)},45172:function(e,t,a){async function r(e,t){let a=n("/loki/api/v1/query",t.datasourceUrl);return a.searchParams.append("query",e.query),e.time&&a.searchParams.append("time",e.time),e.direction&&a.searchParams.append("direction",e.direction),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}function n(e,t){if(t.startsWith("http://")||t.startsWith("https://"))return new URL(e,t);return new URL(t.endsWith("/")&&e.startsWith("/")?t+e.slice(1):t.endsWith("/")||e.startsWith("/")?t+e:t+"/"+e,window.location.origin)}function i(e){if(e instanceof Date)return Math.floor(e.getTime()/1e3).toString();if("number"==typeof e)return Math.floor(e>1e11?e/1e3:e).toString();if(/^\d+$/.test(e)){let t=Number(e);return Math.floor(t>1e11?t/1e3:t).toString()}return Math.floor(new Date(e).getTime()/1e3).toString()}async function s(e,t){let a=n("/loki/api/v1/query_range",t.datasourceUrl);return a.searchParams.append("query",e.query),a.searchParams.append("start",i(e.start)),a.searchParams.append("end",i(e.end)),e.step&&a.searchParams.append("step",e.step),e.interval&&a.searchParams.append("interval",e.interval),e.direction&&a.searchParams.append("direction",e.direction),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}async function o(e,t,a){let r=n("/loki/api/v1/labels",a.datasourceUrl);return e&&r.searchParams.append("start",e),t&&r.searchParams.append("end",t),(await fetch(r.toString(),{method:"GET",headers:{"Content-Type":"application/json",...a.headers}})).json()}async function p(e,t,a,r){let i=n(`/loki/api/v1/label/${e}/values`,r.datasourceUrl);return t&&i.searchParams.append("start",t),a&&i.searchParams.append("end",a),(await fetch(i.toString(),{method:"GET",headers:{"Content-Type":"application/json",...r.headers}})).json()}async function d(e,t,a,r){let i=n("/loki/api/v1/series",r.datasourceUrl);return e.forEach(e=>i.searchParams.append("match[]",e)),t&&i.searchParams.append("start",t),a&&i.searchParams.append("end",a),(await fetch(i.toString(),{method:"GET",headers:{"Content-Type":"application/json",...r.headers}})).json()}async function l(e,t){let a=n("/loki/api/v1/index/volume",t.datasourceUrl);return a.searchParams.append("query",e.query),a.searchParams.append("start",e.start),a.searchParams.append("end",e.end),e.step&&a.searchParams.append("step",e.step),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}async function c(e,t){let a=n("/loki/api/v1/index/volume_range",t.datasourceUrl);return a.searchParams.append("query",e.query),a.searchParams.append("start",e.start),a.searchParams.append("end",e.end),e.step&&a.searchParams.append("step",e.step),e.limit&&a.searchParams.append("limit",e.limit.toString()),(await fetch(a.toString(),{method:"GET",headers:{"Content-Type":"application/json",...t.headers}})).json()}async function h(e,t,a,r){let i=n("/loki/api/v1/index/stats",r.datasourceUrl);return i.searchParams.append("query",e),t&&i.searchParams.append("start",t),a&&i.searchParams.append("end",a),(await fetch(i.toString(),{method:"GET",headers:{"Content-Type":"application/json",...r.headers}})).json()}a.r(t),a.d(t,{LokiDatasourceEditor:()=>f,LokiDatasource:()=>P});var u=a(24246),m=a(72);function f(e){let{value:t,onChange:a,isReadonly:r}=e;return(0,u.jsx)(m.HTTPSettingsEditor,{value:t,onChange:a,isReadonly:r,initialSpecDirect:{directUrl:""},initialSpecProxy:{proxy:{kind:"HTTPProxy",spec:{allowedEndpoints:[{endpointPattern:"/loki/api/v1/query",method:"GET"},{endpointPattern:"/loki/api/v1/query_range",method:"GET"},{endpointPattern:"/loki/api/v1/labels",method:"GET"},{endpointPattern:"/loki/api/v1/label/([a-zA-Z0-9_-]+)/values",method:"GET"},{endpointPattern:"/loki/api/v1/series",method:"GET"},{endpointPattern:"/loki/api/v1/index/volume",method:"GET"},{endpointPattern:"/loki/api/v1/index/volume_range",method:"GET"},{endpointPattern:"/loki/api/v1/index/stats",method:"GET"},{endpointPattern:"/loki/api/v1/tail",method:"GET"}],url:""}}}})}let P={createClient:(e,t)=>{let{directUrl:a,proxy:n}=e,{proxyUrl:i}=t,u=a??i;if(void 0===u)throw Error("No URL specified for Loki client. You can use directUrl in the spec to configure it.");let m=null==n?void 0:n.spec.headers;return{options:{datasourceUrl:u},query:(e,t)=>r(e,{datasourceUrl:u,headers:t??m}),queryRange:(e,t)=>s(e,{datasourceUrl:u,headers:t??m}),labels:(e,t,a)=>o(e,t,{datasourceUrl:u,headers:a??m}),labelValues:(e,t,a,r)=>p(e,t,a,{datasourceUrl:u,headers:r??m}),series:(e,t,a,r)=>d(e,t,a,{datasourceUrl:u,headers:r??m}),volume:(e,t)=>l(e,{datasourceUrl:u,headers:t??m}),volumeRange:(e,t)=>c(e,{datasourceUrl:u,headers:t??m}),indexStats:(e,t,a,r)=>h(e,t,a,{datasourceUrl:u,headers:r??m})}},OptionsEditorComponent:f,createInitialOptions:()=>({directUrl:""})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Loki=self.chunk_Loki||[]).push([["2705"],{57969:function(e,t,r){r.d(t,{h:()=>d});var a=r(24246),n=r(54538),o=r(94776),i=r(97313),l=r(61262),s=r(40495),u=r(94197);let c=(0,u.Gv)({LineComment:u.pJ.comment,"Identifier StreamSelector":u.pJ.labelName,"LabelName LabelMatcher":u.pJ.labelName,String:u.pJ.string,"Number Float Duration":u.pJ.number,"LogRangeAggregation VectorAggregation":u.pJ.function(u.pJ.keyword),"And Or Unless":u.pJ.logicOperator,"Eq Neq Re Nre Gt Lt Gte Lte":u.pJ.compareOperator,"Add Sub Mul Div Mod Pow":u.pJ.arithmeticOperator,Pipe:u.pJ.operator,"By Without":u.pJ.keyword,"( )":u.pJ.paren,"[ ]":u.pJ.squareBracket,"{ }":u.pJ.brace,"⚠":u.pJ.invalid});function d(e){let t=(0,o.Z)(),r="dark"===t.palette.mode,u=(0,n.useMemo)(()=>[l.qp.define({parser:s.E2.configure({props:[c]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}})],[]),d=(0,n.useMemo)(()=>{let e="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return i.tk.theme({"&":{backgroundColor:"transparent !important",border:`1px solid ${e}`,borderRadius:`${t.shape.borderRadius}px`},"&.cm-focused.cm-editor":{outline:"none"},".cm-content":{padding:"8px"}})},[t]);return(0,a.jsx)(i.ZP,{...e,theme:r?"dark":"light",basicSetup:{lineNumbers:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,foldGutter:!1,syntaxHighlighting:!0},extensions:[i.tk.lineWrapping,u,d],placeholder:'Example: {job="my-service"} |= "error"'})}},2570:function(e,t,r){r.d(t,{aH:()=>o,bK:()=>n});var a=r(72);let n="LokiDatasource";function o(e){return!(0,a.isVariableDatasource)(e)&&void 0===e.name}},82201:function(e,t,r){r.d(t,{M:()=>a,Q:()=>n});let a="LokiDatasource",n={kind:a}},74756:function(e,t,r){r.r(t),r.d(t,{LokiLogQuery:()=>f,getLokiLogData:()=>o,LokiLogQueryEditor:()=>y});var a=r(72),n=r(82201);let o=async(e,t)=>{if(!e.query)return{logs:{entries:[],totalCount:0},timeRange:{start:t.timeRange.start,end:t.timeRange.end}};let r=(0,a.replaceVariables)(e.query,t.variableState),o=await t.datasourceStore.getDatasourceClient(e.datasource??n.Q),{start:i,end:l}=t.timeRange,s=await o.queryRange({query:r,start:i.getTime().toString(),end:l.getTime().toString(),direction:e.direction});return"streams"===s.data.resultType?{logs:function(e){let t=[];return e.forEach(e=>{e.values.forEach(r=>{let[a,n]=r;t.push({timestamp:Number(a)/1e9,line:n,labels:e.stream})})}),{entries:t,totalCount:t.length}}(s.data.result),timeRange:{start:i,end:l},metadata:{executedQueryString:r}}:{logs:{entries:[],totalCount:0},timeRange:{start:i,end:l}}};var i=r(24246),l=r(25283),s=r(68808),u=r(5404),c=r(98346),d=r(54538),g=r(75586),p=r(19154),m=r(57969),h=r(2570),b=r(85752);function y(e){let{onChange:t,value:r}=e,{datasource:o}=r,y=o??n.Q,f=(0,a.useDatasourceSelectValueToSelector)(y,h.bK),{query:x,handleQueryChange:k,handleQueryBlur:v}=(0,b.v)(e),L=(0,d.useCallback)(e=>{k(e)},[k]);return(0,i.jsxs)(l.Z,{spacing:1.5,paddingBottom:1,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(s.Z,{sx:{display:"block",marginBottom:"4px",fontWeight:500},children:"Datasource"}),(0,i.jsx)(a.DatasourceSelect,{datasourcePluginKind:n.M,value:f,onChange:e=>{if(!(0,a.isVariableDatasource)(e)&&e.kind===n.M)return void t((0,g.Uy)(r,t=>{t.datasource=(0,h.aH)(e)?void 0:e}));throw Error("Got unexpected non LokiQuery datasource selection")},label:"Loki Datasource",notched:!0})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)(s.Z,{sx:{display:"block",marginBottom:"4px",fontWeight:500},children:"LogQL Query"}),(0,i.jsx)(m.h,{value:x,onChange:L,onBlur:v,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t((0,g.Uy)(r,e=>{e.query=x})))},placeholder:'Enter LogQL query (e.g. {job="mysql"} |= "error")'})]}),(0,i.jsx)("div",{children:(0,i.jsx)(p.OptionsEditorControl,{label:"Order",control:(0,i.jsxs)(u.Z,{exclusive:!0,value:(null==r?void 0:r.direction)??"backward",onChange:(e,a)=>t((0,g.Uy)(r,e=>{e.direction=a})),sx:{height:"36px",marginLeft:"10px",width:"max-content"},children:[(0,i.jsx)(c.Z,{"aria-label":"backward",value:"backward",sx:{fontWeight:500},children:"Newest first"}),(0,i.jsx)(c.Z,{"aria-label":"forward",value:"forward",sx:{fontWeight:500},children:"Oldest first"})]})})})]})}let f={getLogData:o,OptionsEditorComponent:y,createInitialOptions:()=>({query:""}),dependsOn:e=>({variables:[...new Set([...(0,a.parseVariables)(e.query)])]})}},85752:function(e,t,r){r.d(t,{v:()=>o});var a=r(54538),n=r(75586);function o(e){let{onChange:t,value:r}=e,[o,i]=(0,a.useState)(r.query),[l,s]=(0,a.useState)(r.query);return r.query!==l&&(i(r.query),s(r.query)),{query:o,handleQueryChange:e=>{i(e)},handleQueryBlur:()=>{s(o),t((0,n.Uy)(r,e=>{e.query=o}))}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.chunk_Loki=self.chunk_Loki||[]).push([["1966"],{29085:function(e,t,r){r.d(t,{AO:()=>M,Gt:()=>l,Ib:()=>d,LU:()=>m,T9:()=>o,YF:()=>y,fs:()=>u,oK:()=>p,q0:()=>n,s3:()=>a,sG:()=>i});var s=r(20461);function a(e){return void 0!==e.pastDuration}function n(e){return void 0!==e.start&&void 0!==e.end}function i(e){let t=e.end??new Date;return{start:(0,s.sub)(t,d(e.pastDuration)),end:t}}let o=/^(?:(\d+)y)?(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/;function d(e){let t=o.exec(e);if(null===t)throw Error(`Invalid duration string '${e}'`);return{years:parseInt(t[1]??"0"),months:0,weeks:parseInt(t[2]??"0"),days:parseInt(t[3]??"0"),hours:parseInt(t[4]??"0"),minutes:parseInt(t[5]??"0"),seconds:parseInt(t[6]??"0")+parseInt(t[7]??"0")/1e3}}function u(e){return""!==e&&o.test(e)}function l(e){return p(e.end.valueOf()-e.start.valueOf())}function p(e){let t=Math.trunc(e/31536e6);t>0&&(e-=31536e6*t);let r=Math.trunc(e/6048e5);r>0&&(e-=6048e5*r);let s=Math.trunc(e/864e5);s>0&&(e-=864e5*s);let a=Math.trunc(e/36e5);a>0&&(e-=36e5*a);let n=Math.trunc(e/6e4);return n>0&&(e-=6e4*n),{years:t,months:0,weeks:r,days:s,hours:a,minutes:n,seconds:e/1e3}}function m(e){let t=[];if(e.years&&t.push(`${e.years}y`),e.weeks&&t.push(`${e.weeks}w`),e.days&&t.push(`${e.days}d`),e.hours&&t.push(`${e.hours}h`),e.minutes&&t.push(`${e.minutes}m`),e.seconds){let r=Math.trunc(e.seconds);r&&t.push(`${r}s`);let s=Math.round((e.seconds-r)*1e3);s&&t.push(`${s}ms`)}return t.join("")}let c=[{maxMs:15,roundedStepMs:10,display:"0.01s"},{maxMs:35,roundedStepMs:20,display:"0.02s"},{maxMs:75,roundedStepMs:50,display:"0.05s"},{maxMs:150,roundedStepMs:100,display:"0.1s"},{maxMs:350,roundedStepMs:200,display:"0.2s"},{maxMs:750,roundedStepMs:500,display:"0.5s"},{maxMs:1500,roundedStepMs:1e3,display:"1s"},{maxMs:3500,roundedStepMs:2e3,display:"2s"},{maxMs:7500,roundedStepMs:5e3,display:"5s"},{maxMs:12500,roundedStepMs:1e4,display:"10s"},{maxMs:17500,roundedStepMs:15e3,display:"15s"},{maxMs:25e3,roundedStepMs:2e4,display:"20s"},{maxMs:45e3,roundedStepMs:3e4,display:"30s"},{maxMs:9e4,roundedStepMs:6e4,display:"1m"},{maxMs:21e4,roundedStepMs:12e4,display:"2m"},{maxMs:45e4,roundedStepMs:3e5,display:"5m"},{maxMs:75e4,roundedStepMs:6e5,display:"10m"},{maxMs:75e4,roundedStepMs:9e5,display:"15m"},{maxMs:15e5,roundedStepMs:12e5,display:"20m"},{maxMs:27e5,roundedStepMs:18e5,display:"30m"},{maxMs:54e5,roundedStepMs:36e5,display:"1h"},{maxMs:9e6,roundedStepMs:72e5,display:"2h"},{maxMs:162e5,roundedStepMs:108e5,display:"3h"},{maxMs:324e5,roundedStepMs:216e5,display:"6h"},{maxMs:864e5,roundedStepMs:432e5,display:"12h"},{maxMs:6048e5,roundedStepMs:864e5,display:"1d"},{maxMs:18144e5,roundedStepMs:6048e5,display:"1w"},{maxMs:36288e5,roundedStepMs:2592e6,display:"30d"},{maxMs:63072e6,roundedStepMs:31536e6,display:"1y"}];function M(e){for(let{maxMs:t,roundedStepMs:r}of c)if(e<t)return r;return 15e3}function y(e,t){return M(Math.floor((e.end.valueOf()-e.start.valueOf())/t))}},57969:function(e,t,r){r.d(t,{h:()=>p});var s=r(24246),a=r(54538),n=r(94776),i=r(97313),o=r(61262),d=r(40495),u=r(94197);let l=(0,u.Gv)({LineComment:u.pJ.comment,"Identifier StreamSelector":u.pJ.labelName,"LabelName LabelMatcher":u.pJ.labelName,String:u.pJ.string,"Number Float Duration":u.pJ.number,"LogRangeAggregation VectorAggregation":u.pJ.function(u.pJ.keyword),"And Or Unless":u.pJ.logicOperator,"Eq Neq Re Nre Gt Lt Gte Lte":u.pJ.compareOperator,"Add Sub Mul Div Mod Pow":u.pJ.arithmeticOperator,Pipe:u.pJ.operator,"By Without":u.pJ.keyword,"( )":u.pJ.paren,"[ ]":u.pJ.squareBracket,"{ }":u.pJ.brace,"⚠":u.pJ.invalid});function p(e){let t=(0,n.Z)(),r="dark"===t.palette.mode,u=(0,a.useMemo)(()=>[o.qp.define({parser:d.E2.configure({props:[l]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"#"}}})],[]),p=(0,a.useMemo)(()=>{let e="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return i.tk.theme({"&":{backgroundColor:"transparent !important",border:`1px solid ${e}`,borderRadius:`${t.shape.borderRadius}px`},"&.cm-focused.cm-editor":{outline:"none"},".cm-content":{padding:"8px"}})},[t]);return(0,s.jsx)(i.ZP,{...e,theme:r?"dark":"light",basicSetup:{lineNumbers:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1,foldGutter:!1,syntaxHighlighting:!0},extensions:[i.tk.lineWrapping,u,p],placeholder:'Example: {job="my-service"} |= "error"'})}},2570:function(e,t,r){r.d(t,{aH:()=>n,bK:()=>a});var s=r(72);let a="LokiDatasource";function n(e){return!(0,s.isVariableDatasource)(e)&&void 0===e.name}},82201:function(e,t,r){r.d(t,{M:()=>s,Q:()=>a});let s="LokiDatasource",a={kind:s}},70150:function(e,t,r){r.r(t),r.d(t,{LokiQueryEditor:()=>h,LokiTimeSeriesQuery:()=>g,getLokiTimeSeriesData:()=>o});var s=r(29085),a=r(72),n=r(20461),i=r(82201);let o=async(e,t)=>{if(!e.query)return{series:[],timeRange:{start:t.timeRange.start,end:t.timeRange.end},stepMs:15e3};let r=(0,a.replaceVariables)(e.query,t.variableState),o=await t.datasourceStore.getDatasourceClient(e.datasource??i.Q),{start:d,end:u}=t.timeRange,l=e.step?function(e){if(!e)return;let t=(0,s.Ib)(e);return Math.floor((0,n.milliseconds)(t)/1e3)}(e.step)??15:15,p=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=(t-e)/1e3/1e4;return a>1&&(a=Math.ceil(a)),Math.max(s/1e3,r,a)}(d.getTime(),u.getTime(),l,t.suggestedStepMs),m=p<60?`${Math.round(p)}s`:p<3600?`${Math.round(p/60)}m`:`${Math.round(p/3600)}h`,c=1e3*p,M=await o.queryRange({query:r,start:d.getTime().toString(),end:u.getTime().toString(),step:m});return"matrix"===M.data.resultType?{series:M.data.result.map(e=>({name:Object.entries(e.metric).map(e=>{let[t,r]=e;return`${t}=${r}`}).join(", "),values:e.values.map(e=>{let[t,r]=e;return[1e3*Number(t),Number(r)]}),labels:e.metric})),timeRange:{start:d,end:u},stepMs:c,metadata:{executedQueryString:r}}:{series:[],timeRange:{start:d,end:u},stepMs:c}};var d=r(24246),u=r(25283),l=r(68808),p=r(54538),m=r(75586),c=r(57969),M=r(2570),y=r(85752);function h(e){let{onChange:t,value:r}=e,{datasource:s}=r,n=s??i.Q,o=(0,a.useDatasourceSelectValueToSelector)(n,M.bK),{query:h,handleQueryChange:g,handleQueryBlur:x}=(0,y.v)(e),S=(0,p.useCallback)(e=>{g(e)},[g]);return(0,d.jsxs)(u.Z,{spacing:1.5,paddingBottom:1,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)(l.Z,{sx:{display:"block",marginBottom:"4px",fontWeight:500},children:"Datasource"}),(0,d.jsx)(a.DatasourceSelect,{datasourcePluginKind:i.M,value:o,onChange:e=>{if(!(0,a.isVariableDatasource)(e)&&e.kind===i.M)return void t((0,m.Uy)(r,t=>{t.datasource=e}));throw Error("Got unexpected non LokiQuery datasource selection")},label:"Loki Datasource",notched:!0})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(l.Z,{sx:{display:"block",marginBottom:"4px",fontWeight:500},children:"LogQL Query"}),(0,d.jsx)(c.h,{value:h,onChange:S,onBlur:x,onKeyDown:e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t((0,m.Uy)(r,e=>{e.query=h})))},placeholder:'Enter LogQL query (e.g. {job="mysql"} |= "error")'})]})]})}let g={getTimeSeriesData:o,OptionsEditorComponent:h,createInitialOptions:()=>({query:""}),dependsOn:e=>({variables:[...new Set([...(0,a.parseVariables)(e.query)])]})}},85752:function(e,t,r){r.d(t,{v:()=>n});var s=r(54538),a=r(75586);function n(e){let{onChange:t,value:r}=e,[n,i]=(0,s.useState)(r.query),[o,d]=(0,s.useState)(r.query);return r.query!==o&&(i(r.query),d(r.query)),{query:n,handleQueryChange:e=>{i(e)},handleQueryBlur:()=>{d(n),t((0,a.Uy)(r,e=>{e.query=n}))}}}}}]);
|