text: (function(e){function t(t){for(var n,s,i=t[0],u=t[1],c=t[2],d=0,p=[];d<i.length;d++)s=i[d],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&p.push(r[s][0]),r[s]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);l&&l(t);while(p.length)p.shift()();return o.push.apply(o,c||[]),a()}function a(){for(var e,t=0;t<o.length;t++){for(var a=o[t],n=!0,i=1;i<a.length;i++){var u=a[i];0!==r[u]&&(n=!1)}n&&(o.splice(t--,1),e=s(s.s=a[0]))}return e}var n={},r={app:0},o=[];function s(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=e,s.c=n,s.d=function(e,t,a){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(a,n,function(t){return e[t]}.bind(null,n));return a},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var c=0;c<i.length;c++)t(i[c]);var l=u;o.push([0,"chunk-vendors"]),a()})({0:function(e,t,a){e.exports=a("cd49")},"05d5":function(e,t,a){},"0614":function(e,t,a){"use strict";a("38fb")},"0a67":function(e,t,a){"use strict";a("ae17")},"10d3":function(e,t,a){},"13cd":function(e,t,a){"use strict";a("d798")},"14f3":function(e,t,a){},1744:function(e,t,a){"use strict";a("ac42")},1775:function(e,t,a){"use strict";a("14f3")},"1cac":function(e,t,a){},"224b":function(e,t,a){},2784:function(e,t,a){},"2ed5":function(e,t,a){},"38fb":function(e,t,a){},"4a99":function(e,t,a){"use strict";a("9242")},"4ec0":function(e,t,a){"use strict";a("763e")},"52b1":function(e,t,a){},"5a7a":function(e,t,a){"use strict";a("2784")},"735d":function(e,t,a){"use strict";a("10d3")},"763e":function(e,t,a){},"7a89":function(e,t,a){"use strict";a("96e0")},"831b":function(e,t,a){},"868d":function(e,t,a){},8784:function(e,t,a){"use strict";a("05d5")},"87c2":function(e,t,a){"use strict";a("1cac")},"88d8":function(e,t,a){"use strict";a("2ed5")},"8a92":function(e,t,a){"use strict";a("831b")},"8f56":function(e,t,a){},9242:function(e,t,a){},"96e0":function(e,t,a){},"9fbb":function(e,t,a){},a4e0:function(e,t,a){"use strict";a("868d")},a885:function(e,t,a){"use strict";a("52b1")},ac42:function(e,t,a){},adf7:function(e,t,a){"use strict";a("9fbb")},ae17:function(e,t,a){},b19c:function(e,t,a){},b20f:function(e,t,a){},c05d:function(e,t,a){"use strict";a("224b")},c867:function(e,t,a){},cd49:function(e,t,a){"use strict";a.r(t);a("6005"),a("a01d"),a("46d2"),a("6463");var n=a("d04a"),r=a("4bf0"),o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-app",[a("v-app-bar",{attrs:{app:"",elevation:"1",color:"white"}},[a("v-container",{staticClass:"pa-0 fill-height",attrs:{fluid:e.$vuetify.breakpoint.lgAndDown}},[a("v-row",{staticClass:"flex-nowrap",attrs:{align:"center"}},[a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"mt-2"},[e.$vuetify.breakpoint.lgAndUp?a("UptraceLogoLarge",{attrs:{to:{name:"Home"}}}):a("UptraceLogoSmall",{attrs:{to:{name:"Home"}}})],1)]),a("v-col",{attrs:{cols:"auto"}},[a("ProjectPicker")],1),a("v-col",{attrs:{cols:"auto"}},[a("v-tabs",{staticClass:"ml-8",attrs:{optional:""}},[a("v-tab",{attrs:{to:{name:"Overview"}}},[e._v("Overview")]),a("v-tab",{attrs:{to:{name:"GroupList"}}},[e._v("Explore")]),a("v-tab",{attrs:{to:{name:"Help"}}},[e._v("Help")])],1)],1),a("v-spacer"),a("v-col",{attrs:{cols:"auto"}},[a("v-text-field",{staticStyle:{"min-width":"300px",width:"300px"},attrs:{"prepend-inner-icon":"mdi-magnify",placeholder:"Jump to trace id...","hide-details":"",flat:"",solo:"","background-color":"grey lighten-4"},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.jumpToTrace.apply(null,arguments)}},model:{value:e.traceId,callback:function(t){e.traceId=t},expression:"traceId"}})],1),a("v-col",{staticClass:"d-none d-md-inline-block",attrs:{cols:"auto"}},[a("v-btn",{staticClass:"deep-orange darken-3 ml-lg-10",attrs:{href:"https://uptrace.dev/compare-open-source",target:"_blank",dark:""}},[e._v("Upgrade")])],1)],1)],1)],1),a("v-main",[a("XSnackbar"),a("router-view")],1),a("v-footer",{attrs:{app:"",absolute:"",color:"grey lighten-5"}},[a("v-container",{attrs:{fluid:""}},[a("v-row",{attrs:{justify:"center",align:"center"}},[a("v-col",{attrs:{cols:"auto"}},[e._v(" Found a bug? Create an "),a("a",{attrs:{href:"https://github.com/uptrace/uptrace/issues",target:"_blank"}},[e._v("issue")]),e._v(". Have a suggestion? Start a "),a("a",{attrs:{href:"https://github.com/uptrace/uptrace/discussions",target:"_blank"}},[e._v("discussion")]),e._v(". ")])],1)],1)],1)],1)},s=[],i=a("4956"),u=(a("a2c3"),a("7697"),a("b35d"),a("4967"),a("eef3"),a("e0f4"),a("9b3c"),a("7e15"),a("3b38"),a("1753"),a("c63a"),a("0297"),a("bcba"));function c(e,t){var a;return function(){return void 0===a&&(a=t()),a}}function l(){var e=Object(r["getCurrentInstance"])();if(!e)throw new Error("useRouter is called outside of setup");var t=e.proxy.$router,a=Object(r["computed"])((function(){return e.proxy.$route}));return{router:t,route:a}}var d=c("useQuery",(function(){var e,t=l(),a=t.router,n=t.route,o=Object(r["shallowRef"])(),s=Object(r["shallowRef"])([]),c=Object(r["shallowRef"])([]),d=Object(r["computed"])((function(){if(n.value.matched.length){var e,t={},a=Object(i["a"])(c.value);try{for(a.s();!(e=a.n()).done;){var r=e.value;if(r.toQuery){var o=r.toQuery();o&&Object.assign(t,Object(u["cloneDeep"])(o))}}}catch(s){a.e(s)}finally{a.f()}return t}})),v=Object(u["debounce"])((function(t,n){if(void 0!==n){for(var r in n)if(void 0===n[r])return;e=Object(u["omit"])(t,"matched"),e.query=n,a.replace({query:n,hash:t.hash}).catch((function(){}))}}),10);function f(e){function t(){var t=c.value.findIndex((function(t){return t===e}));t>=0&&(c.value.splice(t,1),c.value=c.value)}return c.value.push(e),c.value=c.value,Object(r["onBeforeUnmount"])(t),e.fromQuery&&Object(r["onBeforeMount"])((function(){o.value&&e.fromQuery&&e.fromQuery(o.value.query)})),t}function b(e){s.value.push(e),s.value=s.value,Object(r["onBeforeUnmount"])((function(){var t=s.value.findIndex((function(t){return t===e}));t>=0&&(s.value.splice(t,1),s.value=s.value)})),Object(r["onBeforeMount"])((function(){o.value&&e(o.value)}))}return Object(r["watch"])(n,(function(t){if(t.matched.length&&(!e||!p(t,e))){var a,n=Object(i["a"])(c.value);try{for(n.s();!(a=n.n()).done;){var r=a.value;r.fromQuery&&r.fromQuery(t.query)}}catch(v){n.e(v)}finally{n.f()}var u,l=Object(i["a"])(s.value);try{for(l.s();!(u=l.n()).done;){var d=u.value;d(t)}}catch(v){l.e(v)}finally{l.f()}o.value=t}}),{immediate:!0,flush:"sync"}),Object(r["watch"])(n,(function(t){t.matched.length&&(e&&p(t,e)||v(t,d.value))}),{flush:"post"}),Object(r["watch"])(d,(function(e,t){m(e,t)||v(n.value,e)}),{immediate:!0,flush:"post"}),{route:o,onRouteUpdated:b,sync:f}}));function p(e,t){return e.path===t.path&&v(e.params,t.params)&&m(e.query,t.query)}function v(e,t){return JSON.stringify(e,Object.keys(e).sort())===JSON.stringify(t,Object.keys(t).sort())}function m(e,t){var a=new URLSearchParams(e),n=new URLSearchParams(t);return a.toString()===n.toString()}var f=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("router-link",e._g(e._b({staticClass:"d-inline-block"},"router-link",e.$attrs,!1),e.$listeners),[a("v-img",{staticClass:"shrink",attrs:{src:"/uptrace/logo-large.svg","max-width":"160",width:"160",alt:"Uptrace"}})],1)},b=[],h=a("bdd7"),g=a("5628"),y=a.n(g),O=a("83f7"),x={},j=Object(h["a"])(x,f,b,!1,null,null,null),_=j.exports;y()(j,{VImg:O["a"]});var C=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("router-link",e._g(e._b({staticClass:"d-inline-block"},"router-link",e.$attrs,!1),e.$listeners),[a("v-img",{staticClass:"shrink",attrs:{src:"/uptrace/logo-small.svg","max-width":e.width,width:e.width,transition:"scale-transition",alt:"Uptrace"}})],1)},w=[],k=(a("8ec1"),Object(r["defineComponent"])({name:"UptraceLogoSmall",props:{width:{type:[Number,String],default:38}}})),S=k,P=Object(h["a"])(S,C,w,!1,null,null,null),V=P.exports;y()(P,{VImg:O["a"]});var q=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"frag",rawName:"v-frag"}]},[!e.autocompleteActive&&e.user.projects.length?a("v-toolbar-title",{staticClass:"cursor-pointer",on:{click:e.onClickActiveProject}},[a("span",[e._v(e._s(e.activeProject.name))]),a("v-icon",[e._v("mdi-menu-down")])],1):e._e(),e.autocompleteActive&&e.user.projects.length?a("v-autocomplete",{ref:"el",staticClass:"v-input--dense",staticStyle:{"max-width":"300px"},attrs:{items:e.user.projects,"item-text":"name","item-value":"id","return-object":"","search-input":e.searchInput,placeholder:"Select a project","hide-details":"",filled:""},on:{"update:searchInput":function(t){e.searchInput=t},"update:search-input":function(t){e.searchInput=t},input:e.onChange,blur:e.onBlur},model:{value:e.activeProject,callback:function(t){e.activeProject=t},expression:"activeProject"}}):e._e()],1)},T=[],R=(a("9814"),a("fb07")),I=(a("833b"),a("dc3b")),E=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("XPlaceholder",{scopedSlots:e._u([e.systems.hasNoData?{key:"placeholder",fn:function(){return[a("HelpCard",{attrs:{"date-range":e.dateRange,loading:e.systems.loading}})]},proxy:!0}:null],null,!0)},[a("PageToolbar",{attrs:{loading:e.systems.loading}},[a("v-spacer"),a("DateRangePicker",{attrs:{"date-range":e.dateRange}})],1),a("div",{staticClass:"border"},[a("div",{staticClass:"grey lighten-5"},[a("v-container",{staticClass:"mb-2",attrs:{fluid:""}},[a("SystemQuickMetrics",{attrs:{loading:e.systems.loading,systems:e.systems.list}})],1),a("v-container",{staticClass:"pb-0",attrs:{fluid:e.$vuetify.breakpoint.mdAndDown}},[a("v-tabs",{attrs:{"background-color":"transparent"}},[a("v-tab",{attrs:{to:{name:"Overview"}}},[e._v("Systems")]),a("v-tab",{attrs:{to:{name:"ServiceOverview"}}},[e._v("Services")]),a("v-tab",{attrs:{to:{name:"HostOverview"}}},[e._v("Hosts")])],1)],1)],1)]),a("v-container",{attrs:{fluid:e.$vuetify.breakpoint.mdAndDown}},[a("v-row",[a("v-col",[a("router-view",{attrs:{"date-range":e.dateRange,systems:e.systems}})],1)],1)],1)],1)},M=[],D=a("2768"),L=a("e97b"),N=a("e48e"),$=a("e636"),B=(a("c19e"),a("c3c4"),a("239e")),A=a("5529"),F=a("7a4f"),G=a("5e25"),X=c("useForceReload",(function(){var e=Object(r["ref"])(0);function t(){e.value=Date.now()}var a=Object(r["computed"])((function(){return e.value?{_force:e.value}:{}}));return{forceReload:t,forceReloadParams:a}})),U=(a("da4f"),a("3017")),H=a("83af"),Q=(a("17ae"),a("687d"),a("82ba")),W=a("98ee"),z=1,K=1e3*z,J=60*K,Z=60*J,Y=24*Z;function ee(e){if(e instanceof Date)return e;if("number"===typeof e)return new Date(e);if("string"!==typeof e)return new Date(NaN);if(/^\d+$/.test(e))return new Date(parseInt(e,10)/1e6);var t=Date.parse(e);return new Date(t)}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"LLL d y HH:mm";return ne(e,t)}function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"LLL d y HH:mm:ss.SSS";return ne(e,t)}function ne(e,t){return e?("string"===typeof e&&(e=Object(U["a"])(e)),Object(H["a"])(e,t)):String(e)}var re="yyyyMMdd'T'HHmmss";function oe(e){return Object(H["a"])(ie(e),re)}function se(e){var t=Object(Q["a"])(e,re,new Date);return Object(W["a"])(t)?(t=ue(t),t):new Date(e)}function ie(e){return Object(A["a"])(e,e.getTimezoneOffset()*J)}function ue(e){return Object(B["a"])(e,e.getTimezoneOffset()*J)}function ce(e,t){var a=e.getTime()%t;return 0===a?e:Object(A["a"])(e,t-a)}function le(){var e,t=Object(r["ref"])(),a=Object(r["ref"])(!1),n=Object(r["ref"])(0),o=X(),s=o.forceReload,i=o.forceReloadParams,u=Object(r["computed"])((function(){return Boolean(t.value)&&Boolean(n.value)})),c=Object(r["computed"])((function(){if(u.value){var e=Object(B["a"])(t.value,n.value);return e}})),l=Object(r["computed"])({get:function(){return ue(c.value).toISOString().substr(0,10)},set:function(e){var t=ie(new Date(e));O(t)}}),p=Object(r["computed"])({get:function(){var e=c.value;return"".concat(e.getHours(),":").concat(e.getMinutes())},set:function(e){var t=new Date(c.value.getTime()),a=e.split(":"),n=Object($["a"])(a,2),r=n[0],o=n[1];t.setHours(parseInt(r,10)),t.setMinutes(parseInt(o,10)),O(t)}});function v(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!n&&!a.value)return!1;a.value=!0;var r=ce(new Date,J);return!(r<=t.value)&&(t.value=r,e&&clearTimeout(e),e=setTimeout(v,5*J),!0)}function m(){e&&(clearTimeout(e),e=null),a.value=!1}function f(){v(!0),s()}function b(){m(),t.value=void 0,n.value=0}function h(e,a){var r=a.getTime()-e.getTime();t.value&&t.value.getTime()===a.getTime()&&n.value===r||(m(),t.value=a,n.value=r)}function g(e){if(t.value&&!a.value){var r=Object(A["a"])(c.value,e),o=new Date;if(r<o)return n.value=e,void(t.value=r)}n.value=e,v(!0)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;"string"===typeof e&&(e=new Date(e)),t&&(n.value=t),e=Object(A["a"])(e,n.value/2);var a=ce(new Date,J);e=Object(F["a"])([e,a]),x(e)}function O(e){x(Object(A["a"])(e,n.value))}function x(e){m(),t.value=e}var j=Object(r["computed"])((function(){if(!u.value)return!1;var e=Object(G["a"])(new Date,c.value);return e<30*Y}));function _(){m(),t.value=Object(B["a"])(t.value,n.value)}var C=Object(r["computed"])((function(){if(!u.value||a.value)return!1;var e=Object(G["a"])(new Date,t.value);return e>15*J}));function w(){var e=Object(A["a"])(t.value,n.value),a=new Date;x(e<=a?e:a)}function k(){var e;return u.value?a.value?Object(N["a"])({},"time_dur",n.value/K):(e={},Object(N["a"])(e,"time_gte",oe(c.value)),Object(N["a"])(e,"time_dur",n.value/K),e):{}}function S(e){var t=e["time_dur"],a=e["time_gte"];t&&(n.value=parseInt(t,10)*K,"string"===typeof a?O(se(a)):v(!0))}function P(){if(!u.value)return{time_gte:void 0,time_lt:void 0};var e=c.value,a=t.value,n=Object(L["a"])(Object(L["a"])({},i.value),{},{time_gte:e.toISOString(),time_lt:a.toISOString()});return n}function V(){d().sync({fromQuery:function(e){S(e)},toQuery:function(){return k()}})}return Object(r["proxyRefs"])({gte:c,lt:t,isValid:u,isNow:a,duration:n,datePicker:l,timePicker:p,updateNow:v,reload:f,forceReload:s,reset:b,change:h,changeDuration:g,changeWithin:y,changeGTE:O,changeLT:x,hasPrevPeriod:j,prevPeriod:_,hasNextPeriod:C,nextPeriod:w,queryParams:k,axiosParams:P,syncQuery:V})}a("582e"),a("60d1"),a("d4c6"),a("5a44"),a("edf1"),a("20ad"),a("9e06"),a("b05f");var de=a("4f14"),pe=a.n(de),ve=c("useSnackbar",(function(){var e=Object(r["ref"])(""),t=Object(r["ref"])(!1),a=Object(r["ref"])(""),n=Object(r["ref"])(-1);function o(e){i(e),a.value="success"}function s(e){i(me(e)),a.value="error"}function i(a){e.value=a,t.value=!0,n.value=1e4}return Object(r["proxyRefs"])({notification:e,active:t,color:a,timeout:n,notifySuccess:o,notifyError:s})}));function me(e){return"string"===typeof e?e:e.message}function fe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=ve(),n=Object(r["shallowRef"])(),o=Object(r["shallowRef"])(),s=Object(r["shallowRef"])(!1),i=0,u=function(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];var r;return i++,function(t){s.value=!0,r=e.apply(void 0,a),r.then((function(e){s.value=!1,t===i&&c(e)}),(function(e){return s.value=!1,t===i&&l(e),e}))}(i),r},c=function(e){n.value=e,o.value=void 0},l=function(e){if(null!==e&&!pe.a.isCancel(e)){if(void 0===e)return n.value=void 0,void(o.value=void 0);n.value=void 0,o.value=e}},d=function(){i++},p=Object(r["computed"])((function(){var e,t,a,n=null===(e=o.value)||void 0===e||null===(t=e.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.message;return n||be(o.value)}));return t.ignoreErrors||Object(r["watch"])(o,(function(e){var t;if(e&&p.value)switch(null===(t=e.response)||void 0===t?void 0:t.status){case 400:case 500:a.notifyError(p.value)}})),{promised:u,result:n,error:o,errorMessage:p,pending:s,cancel:d}}function be(e){return"string"===typeof e?e:e.message}function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null,a=fe((function(e){return null===e?Promise.reject(null):ge(e)?(e&&!e.cancelToken&&(t=pe.a.CancelToken.source(),e=Object(L["a"])(Object(L["a"])({},e),{},{cancelToken:t.token})),pe.a.request(e)):Promise.reject(void 0)}),e),n=a.pending,o=a.promised,s=a.result,i=a.error,u=a.cancel,c=Object(r["computed"])((function(){var e;return null===(e=s.value)||void 0===e?void 0:e.data}));function l(){u(),t&&(t.cancel(),t=null)}function d(e,t){return l(),t&&t.signal.addEventListener("abort",(function(){l()})),o(e)}return{loading:n,result:s,data:c,error:i,request:d,abort:l}}function ge(e){return void 0!==e&&((!e.url||!e.url.includes("undefined"))&&((!("params"in e)||void 0!==e.params)&&(!(e.params&&!ye(e.params))&&((!("data"in e)||void 0!==e.data)&&!(e.data&&!ye(e.data))))))}function ye(e){for(var t in e)if(void 0===e[t])return!1;return!0}function Oe(e,t){var a,n,o="",s=function(e,r,o){a=new AbortController,t(e,n,o,a).catch((function(){})).finally((function(){a=void 0}))},i=function(e,t,a){c(),s(e,n,a),n=e,o=JSON.stringify(n)},u=i;function c(){a&&(a.abort(),a=void 0,n=void 0,o="")}function l(e){var t=function(){};if(e){if(a&&!d(e))return;return s(e,n,t)}if(n){if(a)return;return s(n,void 0,t)}}function d(e){return JSON.stringify(e)!==o}i=function(e,t,a){d(e)&&u(e,t,a)};var p=Object(r["watch"])(e,i,{immediate:!0});return Object(r["onBeforeUnmount"])(c),{abort:c,reload:l,stopWatch:p}}function xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=he(t),n=a.loading,r=a.data,o=a.error,s=a.request,i=Oe(e,(function(e,t,a,n){return s(e,n)})),u=i.reload,c=i.abort;return{loading:n,data:r,error:o,abort:c,reload:u}}function je(e){var t=l(),a=t.route,n=xe((function(){var t=a.value.params.projectId;return{url:"/api/tracing/".concat(t,"/systems"),params:Object(L["a"])({},e.axiosParams())}})),o=n.loading,s=n.data,i=Object(r["computed"])((function(){var e,t;return _e(null!==(e=null===(t=s.value)||void 0===t?void 0:t.systems)&&void 0!==e?e:[])})),u=Object(r["computed"])((function(){return Ce(i.value)})),c=Object(r["computed"])((function(){var e;return!!Array.isArray(null===(e=s.value)||void 0===e?void 0:e.systems)&&0===s.value.systems.length})),d=Object(r["shallowRef"])(),p=Object(r["computed"])({get:function(){return d.value},set:function(e){d.value=e||void 0}}),v=Object(r["computed"])((function(){if(p.value){var e=i.value.find((function(e){return e.system===p.value}));return e}}));function m(){var e;return{system:null===(e=v.value)||void 0===e?void 0:e.system}}function f(e){p.value=e}function b(){p.value=void 0}return Object(r["proxyRefs"])({loading:o,list:i,tree:u,hasNoData:c,activeValue:p,activeItem:v,axiosParams:m,change:f,reset:b})}function _e(e){if(!e.length)return[];e=Object(u["clone"])(e);var t,a={},n=Object(i["a"])(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,o=r.system.indexOf(":");if(-1!==o){var s=r.system.slice(0,o),c=a[s];c||(c={system:s,count:0,countPerMin:0,errorCount:0,dummy:!0,numChild:0},a[s]=c),c.count+=r.count,c.countPerMin+=r.countPerMin,c.errorCount+=r.errorCount,c.numChild++}}}catch(m){n.e(m)}finally{n.f()}for(var l in a){var d=a[l];e.push(Object(L["a"])(Object(L["a"])({},d),{},{system:d.system+":all"}))}e=Object(u["orderBy"])(e,"system");var p=e.findIndex((function(e){return"internal"===e.system}));if(p>=0){var v=e[p];v.dummy=!0,e.splice(p,1),e.unshift(v)}return e.unshift({system:"all",count:0,countPerMin:0,errorCount:0,dummy:!0,numChild:0}),e}function Ce(e){return e=Object(u["clone"])(e),e=e.filter((function(e){return 1!==e.numChild})),e.slice(0).forEach((function(t){if(t.system.endsWith(":all")){for(var a=[],n=t.system.slice(0,-"all".length),r=e.length-1;r>=0;r--){var o=e[r];o.system!=t.system&&(o.system.startsWith(n)&&(e.splice(r,1),a.push(o)))}t.children=a}})),e}var we=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"text-no-wrap"},[a("v-btn",{attrs:{text:"",icon:"",disabled:!e.dateRange.hasPrevPeriod,title:"Previous period"},on:{click:e.dateRange.prevPeriod}},[a("v-icon",{staticClass:"small"},[e._v("mdi-chevron-left")])],1),e.dateRange.gte?a("DateTimePeriodMenu",{attrs:{"date-range":e.dateRange,periods:e.periods}}):e._e(),a("PeriodPickerMenu",{attrs:{value:e.dateRange.duration,periods:e.periods},on:{input:function(t){return e.dateRange.changeDuration(t)}}}),a("v-btn",{attrs:{text:"",icon:"",disabled:!e.dateRange.hasNextPeriod,title:"Next period"},on:{click:e.dateRange.nextPeriod}},[a("v-icon",{staticClass:"small"},[e._v("mdi-chevron-right")])],1),a("v-btn",{staticClass:"ml-2",attrs:{small:"",outlined:""},on:{click:e.dateRange.reload}},[a("v-icon",{staticClass:"mr-1",attrs:{small:""}},[e._v("mdi-refresh")]),a("span",[e._v(e._s(e.dateRange.isNow?"Reload":"Reset"))])],1)],1)},ke=[],Se=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[e.dateRange.isNow?a("v-btn",e._g(e._b({attrs:{icon:""}},"v-btn",r,!1),n),[a("v-icon",{attrs:{small:"",title:e.datetimeFull(e.dateRange.gte)}},[e._v("mdi-calendar-blank")])],1):a("v-btn",e._g(e._b({staticClass:"px-1",attrs:{text:"",small:""}},"v-btn",r,!1),n),[a("XDate",{attrs:{date:e.dateRange.gte,format:e.format}}),a("v-icon",[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("DateTimePeriod",{attrs:{"date-range":e.dateRange,periods:e.periods},on:{"click:ok":function(t){e.menu=!1}}})],1)},Pe=[],Ve=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{attrs:{width:"340"}},[a("v-tabs",{attrs:{"background-color":"primary",dark:"","icons-and-text":"","fixed-tabs":""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab",{attrs:{href:"#date"}},[e._v(" Date "),a("v-icon",[e._v("mdi-calendar-outline")])],1),a("v-tab",{attrs:{href:"#time"}},[e._v(" Time "),a("v-icon",[e._v("mdi-clock-outline")])],1),a("v-tab",{attrs:{href:"#period"}},[e._v(" Period "),a("v-icon",[e._v("mdi-calendar-range-outline")])],1)],1),a("v-tabs-items",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab-item",{attrs:{value:"date"}},[a("v-date-picker",{attrs:{"full-width":""},model:{value:e.dateRange.datePicker,callback:function(t){e.$set(e.dateRange,"datePicker",t)},expression:"dateRange.datePicker"}})],1),a("v-tab-item",{attrs:{value:"time"}},[a("v-time-picker",{staticClass:"v-time-picker-custom",attrs:{format:"24hr","full-width":""},model:{value:e.dateRange.timePicker,callback:function(t){e.$set(e.dateRange,"timePicker",t)},expression:"dateRange.timePicker"}})],1),a("v-tab-item",{attrs:{value:"period"}},[a("v-card",{attrs:{"min-height":"378px"}},[a("PeriodList",{attrs:{"date-range":e.dateRange,periods:e.periods}})],1)],1)],1),a("v-card-actions",[a("v-spacer"),a("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){return e.$emit("click:ok")}}},[e._v("OK")])],1)],1)},qe=[],Te=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-list",{attrs:{dense:""}},[a("v-list-item-group",{attrs:{color:"primary"},model:{value:e.activePeriodMs,callback:function(t){e.activePeriodMs=t},expression:"activePeriodMs"}},e._l(e.periods,(function(t){return a("v-list-item",{key:t.ms,attrs:{value:t.ms}},[a("v-list-item-content",[a("v-list-item-title",{domProps:{textContent:e._s(t.text)}})],1)],1)})),1)],1)},Re=[],Ie=Object(r["defineComponent"])({name:"PeriodList",props:{dateRange:{type:Object,required:!0},periods:{type:Array,required:!0}},setup:function(e,t){var a=t.emit,n=Object(r["computed"])({get:function(){return e.dateRange.duration},set:function(t){e.dateRange.changeDuration(t)}}),o=Object(r["computed"])((function(){var t=e.periods.find((function(e){return e.ms===n.value}));return t}));return Object(r["onMounted"])((function(){Object(r["watchEffect"])((function(){if(!o.value){var t=e.periods[0];n.value=t.ms}}))})),Object(r["watch"])(o,(function(e){a("update:period",e)}),{immediate:!0}),{activePeriodMs:n,activePeriod:o}}}),Ee=Ie,Me=a("206a"),De=a("4c49"),Le=a("7e7e"),Ne=a("f6d92"),$e=Object(h["a"])(Ee,Te,Re,!1,null,null,null),Be=$e.exports;y()($e,{VList:Me["a"],VListItem:De["a"],VListItemContent:Le["b"],VListItemGroup:Ne["a"],VListItemTitle:Le["c"]});var Ae=Object(r["defineComponent"])({name:"DateTimePeriod",components:{PeriodList:Be},props:{dateRange:{type:Object,required:!0},periods:{type:Array,required:!0}},setup:function(){var e=Object(r["ref"])();return{activeTab:e}}}),Fe=Ae,Ge=(a("d36a"),a("cfac")),Xe=a("d2e5"),Ue=a("4873"),He=a("0852"),Qe=a("2863"),We=a("497f"),ze=a("0905"),Ke=a("c599"),Je=a("cde6"),Ze=a("f35a"),Ye=a("42f1"),et=Object(h["a"])(Fe,Ve,qe,!1,null,null,null),tt=et.exports;y()(et,{VBtn:Ge["a"],VCard:Xe["a"],VCardActions:Ue["a"],VDatePicker:He["a"],VIcon:Qe["a"],VSpacer:We["a"],VTab:ze["a"],VTabItem:Ke["a"],VTabs:Je["a"],VTabsItems:Ze["a"],VTimePicker:Ye["a"]});var at=Object(r["defineComponent"])({name:"DateTimePeriodMenu",components:{DateTimePeriod:tt},props:{dateRange:{type:Object,required:!0},periods:{type:Array,required:!0},format:{type:String,default:"short"}},setup:function(){var e=Object(r["ref"])(!1);return{menu:e,datetimeFull:ae}}}),nt=at,rt=a("6daa"),ot=Object(h["a"])(nt,Se,Pe,!1,null,"6a16f40c",null),st=ot.exports;y()(ot,{VBtn:Ge["a"],VIcon:Qe["a"],VMenu:rt["a"]});var it=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on;return[a("v-btn",e._g({staticClass:"px-1",attrs:{text:"",small:""}},n),[e.activePeriod?a("span",[e._v(e._s(e.activePeriod.text))]):a("span",[e._v("Period")]),a("v-icon",[e._v("mdi-menu-down")])],1)]}}])},[a("v-list",{attrs:{dense:""}},[a("v-list-item-group",{attrs:{value:e.value,mandatory:""},on:{change:e.onChange}},e._l(e.periods,(function(t){return a("v-list-item",{key:t.ms,attrs:{value:t.ms}},[a("v-list-item-content",[a("v-list-item-title",[e._v("Last "+e._s(t.text))])],1)],1)})),1)],1)],1)},ut=[],ct=Object(r["defineComponent"])({name:"PeriodPickerMenu",props:{value:{type:Number,required:!0},periods:{type:Array,required:!0}},setup:function(e,t){var a=t.emit,n=Object(r["computed"])((function(){var t=e.periods.find((function(t){return t.ms===e.value}));return t}));function o(e){a("input",e)}return{activePeriod:n,onChange:o}}}),lt=ct,dt=Object(h["a"])(lt,it,ut,!1,null,"c084ad56",null),pt=dt.exports;function vt(e){for(var t=[],a=0,n=[1,3,6,12,24];a<n.length;a++){var r=n[a];t.push({text:"".concat(r," ").concat(1===r?"hour":"hours"),ms:r*Z})}for(var o=0,s=[3,7,10,14,30];o<s.length;o++){var i=s[o];i<=e&&t.push({text:"".concat(i," days"),ms:i*Y})}return t}y()(dt,{VBtn:Ge["a"],VIcon:Qe["a"],VList:Me["a"],VListItem:De["a"],VListItemContent:Le["b"],VListItemGroup:Ne["a"],VListItemTitle:Le["c"],VMenu:rt["a"]});var mt=Object(r["defineComponent"])({name:"DateRangePicker",components:{DateTimePeriodMenu:st,PeriodPickerMenu:pt},props:{dateRange:{type:Object,required:!0},defaultPeriod:{type:Number,default:Z}},setup:function(e){var t=Object(r["computed"])((function(){return vt(30)}));return Object(r["onMounted"])((function(){Object(r["watchEffect"])((function(){if(!e.dateRange.duration){var a=t.value.find((function(t){return t.ms===e.defaultPeriod}));a?e.dateRange.changeDuration(a.ms):e.dateRange.changeDuration(t.value[0].ms)}}))})),{periods:t}}}),ft=mt,bt=Object(h["a"])(ft,we,ke,!1,null,"10a87f18",null),ht=bt.exports;y()(bt,{VBtn:Ge["a"],VIcon:Qe["a"]});var gt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"container--fixed-sm"},[a("PageToolbar",{attrs:{loading:e.loading}},[a("v-toolbar-title",[e._v("Send data to Uptrace")]),a("v-spacer"),e.dateRange?a("v-btn",{attrs:{small:"",outlined:""},on:{click:e.dateRange.reload}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-refresh")]),a("span",{staticClass:"ml-1"},[e._v("Reload")])],1):e._e()],1),a("v-container",{staticClass:"mb-6 px-4 py-6"},[a("v-row",[a("v-col",{staticClass:"text-body-1"},[a("p",[e._v(" To start sending data to Uptrace, you need to install Uptrace client and configure it using the provided DSN (connection string). ")]),a("p",[e._v("For Go and .NET use "),a("strong",[e._v("OTLP/gRPC")]),e._v(":")]),a("XCode",{staticClass:"mb-4",attrs:{code:e.grpcDsn}}),a("p",[e._v("For Python, Ruby, and Node.JS use "),a("strong",[e._v("OTLP/HTTP")]),e._v(":")]),a("XCode",{staticClass:"mb-4",attrs:{code:e.httpDsn}}),a("p",[e._v(" See "),a("a",{attrs:{href:"https://docs.uptrace.dev/guide/os.html#otlp",target:"_blank"}},[e._v("documentation")]),e._v(" for instructions for your programming language. ")])],1)],1)],1),a("PageToolbar",{attrs:{loading:e.loading}},[a("v-toolbar-title",[e._v("Already using OpenTelemetry Collector?")])],1),a("v-container",{staticClass:"mb-6 px-4 py-6"},[a("v-row",[a("v-col",{staticClass:"text-body-1"},[e._v(" Uptrace natively supports OpenTelemetry Protocol (OTLP) in case you are already using OpenTelemetry Collector. Use the following OTLP exporter "),a("a",{attrs:{href:"https://opentelemetry.uptrace.dev/guide/collector.html#configuration",target:"_blank"}},[e._v("config")]),e._v(": ")])],1),a("v-row",[a("v-col",[a("CollectorTabs",{attrs:{"http-endpoint":e.httpEndpoint,"grpc-endpoint":e.grpcEndpoint,"http-dsn":e.httpDsn,"grpc-dsn":e.grpcDsn}})],1)],1)],1),a("HelpLinks")],1)},yt=[],Ot=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{attrs:{flat:""}},[a("v-tabs",{model:{value:e.tabs,callback:function(t){e.tabs=t},expression:"tabs"}},[a("v-tab",{attrs:{href:"#grpc"}},[e._v("GRPC")]),a("v-tab",{attrs:{href:"#http"}},[e._v("HTTP")])],1),a("v-tabs-items",{model:{value:e.tabs,callback:function(t){e.tabs=t},expression:"tabs"}},[a("v-tab-item",{attrs:{value:"grpc"}},[a("XCode",{attrs:{language:"yaml",code:e.otlpGrpc}})],1),a("v-tab-item",{attrs:{value:"http"}},[a("XCode",{attrs:{language:"yaml",code:e.otlpHttp}})],1)],1)],1)},xt=[],jt=(a("cbf9"),Object(r["defineComponent"])({name:"CollectorTabs",props:{grpcEndpoint:{type:String,default:""},httpEndpoint:{type:String,default:""},grpcDsn:{type:String,default:""},httpDsn:{type:String,default:""}},setup:function(e){var t=Object(r["ref"])(),a=Object(r["computed"])((function(){return _t(Ct,e.grpcEndpoint,e.grpcDsn)})),n=Object(r["computed"])((function(){return _t(wt,e.httpEndpoint,e.httpDsn)}));return{tabs:t,otlpGrpc:a,otlpHttp:n}}}));function _t(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];return e.replace(/{(\d+)}/g,(function(e,t){return"undefined"!==typeof a[t]?a[t]:e}))}var Ct="\nexporters:\n  otlp:\n    endpoint: {0}\n    tls:\n      insecure: true\n    headers:\n      uptrace-dsn: '{1}'\n".trim(),wt="\nexporters:\n  otlphttp:\n    endpoint: {0}\n    tls:\n      insecure: true\n    headers:\n      uptrace-dsn: '{1}'\n".trim(),kt=jt,St=Object(h["a"])(kt,Ot,xt,!1,null,"09cca6f7",null),Pt=St.exports;y()(St,{VCard:Xe["a"],VTab:ze["a"],VTabItem:Ke["a"],VTabs:Je["a"],VTabsItems:Ze["a"]});var Vt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("PageToolbar",[a("v-toolbar-title",[e._v("See also")])],1),a("v-container",{staticClass:"mb-6"},[a("v-card",{attrs:{flat:""}},[a("v-card-text",{staticClass:"text-subtitle-1"},[a("ul",[a("li",[a("a",{attrs:{href:"https://github.com/uptrace/uptrace/releases/latest",target:"_blank"}},[e._v("Latest release")])]),a("li",[a("a",{attrs:{href:"https://docs.uptrace.dev/",target:"_blank"}},[e._v("Uptrace documentation")])]),a("li",[a("a",{attrs:{href:"https://opentelemetry.uptrace.dev/",target:"_blank"}},[e._v("OpenTelemetry documentation")])]),a("li",[a("a",{attrs:{href:"https://opentelemetry.uptrace.dev/instrumentations/",target:"_blank"}},[e._v("Instrumentations")])]),a("li",[a("a",{attrs:{href:"https://opentelemetry.uptrace.dev/collector/",target:"_blank"}},[e._v("Collector Configurator")])]),a("li",[a("a",{attrs:{href:"https://opentelemetry.uptrace.dev/attributes/",target:"_blank"}},[e._v("Semantic attributes")])]),a("li",[a("a",{attrs:{href:"https://github.com/uptrace",target:"_blank"}},[e._v("GitHub")])])])])],1)],1)],1)},qt=[],Tt=Object(r["defineComponent"])({name:"HelpLinks"}),Rt=Tt,It=a("8ad5"),Et=a("98ad"),Mt=Object(h["a"])(Rt,Vt,qt,!1,null,null,null),Dt=Mt.exports;y()(Mt,{VCard:Xe["a"],VCardText:Ue["b"],VContainer:It["a"],VToolbarTitle:Et["b"]});var Lt=Object(r["defineComponent"])({name:"HelpCard",components:{CollectorTabs:Pt,HelpLinks:Dt},props:{loading:{type:Boolean,default:!1},dateRange:{type:Object,default:void 0}},setup:function(){var e=l(),t=e.route,a=xe((function(){var e=t.value.params.projectId;return{url:"/api/tracing/".concat(e,"/conn-info")}})),n=a.data,o=Object(r["computed"])((function(){var e,t,a;return null!==(e=null===(t=n.value)||void 0===t||null===(a=t.grpc)||void 0===a?void 0:a.endpoint)&&void 0!==e?e:"http://localhost:14317"})),s=Object(r["computed"])((function(){var e,t,a;return null!==(e=null===(t=n.value)||void 0===t||null===(a=t.http)||void 0===a?void 0:a.endpoint)&&void 0!==e?e:"http://localhost:14318"})),i=Object(r["computed"])((function(){var e,t,a;return null!==(e=null===(t=n.value)||void 0===t||null===(a=t.grpc)||void 0===a?void 0:a.dsn)&&void 0!==e?e:"http://localhost:14317"})),u=Object(r["computed"])((function(){var e,t,a;return null!==(e=null===(t=n.value)||void 0===t||null===(a=t.http)||void 0===a?void 0:a.dsn)&&void 0!==e?e:"http://localhost:14318"}));return{grpcEndpoint:o,httpEndpoint:s,grpcDsn:i,httpDsn:u}}}),Nt=Lt,$t=a("b72f"),Bt=a("07df"),At=Object(h["a"])(Nt,gt,yt,!1,null,"012b3200",null),Ft=At.exports;y()(At,{VBtn:Ge["a"],VCol:$t["a"],VContainer:It["a"],VIcon:Qe["a"],VRow:Bt["a"],VSpacer:We["a"],VToolbarTitle:Et["b"]});var Gt,Xt,Ut=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-row",{staticClass:"metrics",attrs:{justify:"center"}},[e.showAll?a("v-col",[a("SystemQuickMetricCard",{attrs:{metric:e.metrics.all},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.metric;return[a("XNum",{attrs:{value:n.countPerMin,unit:e.Unit.Rate,title:"{0} request per minute"}})]}}],null,!1,3804850338)})],1):e._e(),e.metrics.http.countPerMin?a("v-col",[a("SystemQuickMetricCard",{attrs:{metric:e.metrics.http},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.metric;return[a("XNum",{attrs:{value:n.countPerMin,unit:e.Unit.Rate,title:"{0} request per minute"}})]}}],null,!1,3804850338)})],1):e._e(),e.metrics.rpc.countPerMin?a("v-col",[a("SystemQuickMetricCard",{attrs:{metric:e.metrics.rpc},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.metric;return[a("XNum",{attrs:{value:n.countPerMin,unit:e.Unit.Rate,title:"{0} request per minute"}})]}}],null,!1,3804850338)})],1):e._e(),e.metrics.db.countPerMin?a("v-col",[a("SystemQuickMetricCard",{attrs:{metric:e.metrics.db},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.metric;return[a("XNum",{attrs:{value:n.countPerMin,unit:e.Unit.Rate,title:"{0} query per minute"}})]}}],null,!1,2838177657)})],1):e._e(),e.metrics.inMemDb.countPerMin?a("v-col",[a("SystemQuickMetricCard",{attrs:{metric:e.metrics.inMemDb},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.metric;return[a("XNum",{attrs:{value:n.countPerMin,unit:e.Unit.Rate,title:"{0} op per minute"}})]}}],null,!1,1735170156)})],1):e._e(),a("v-col",[a("SystemQuickMetricCard",{attrs:{metric:e.metrics.failures},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.metric;return[e._v(" "+e._s((a.errorCount/a.count*100).toFixed(2))+"% ")]}}])})],1)],1)],1)},Ht=[],Qt=a("e1ab"),Wt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{staticClass:"border-bottom",attrs:{outlined:"",rounded:"lg"}},[a("v-row",{staticClass:"no-gutters"},[a("v-col",{staticClass:"px-3 py-4"},[a("v-tooltip",{attrs:{top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("div",e._g(e._b({staticClass:"body-2 text-truncate text-uppercase blue-grey--text text--lighten-2"},"div",r,!1),n),[e._v(" "+e._s(e.metric.name)+" ")])]}}])},[a("span",[e._v(e._s(e.metric.tooltip))])]),a("div",{staticClass:"pt-4 text-h5 text-truncate"},[e._t("default",null,{metric:e.metric}),e.metric.suffix?a("span",{staticClass:"ml-2 text-subtitle-1 blue-grey--text text--lighten-3"},[e._v(e._s(e.metric.suffix))]):e._e()],2)],1)],1)],1)},zt=[],Kt=Object(r["defineComponent"])({name:"SystemMetricCard",props:{metric:{type:Object,required:!0}}}),Jt=Kt,Zt=(a("13cd"),a("c470")),Yt=Object(h["a"])(Jt,Wt,zt,!1,null,"28b82bd9",null),ea=Yt.exports;function ta(e){var t=ra(e),a=Object($["a"])(t,2),n=a[0],r=a[1];return n===Gt.allSystem||r===Gt.allSystem}function aa(e){return!!e&&(na(e)||e===Xt.event||e.startsWith(Xt.logPrefix)||e.startsWith(Xt.messagePrefix))}function na(e){if(!e)return!1;switch(e){case Xt.error:case Xt.exception:case Xt.logError:case Xt.logFatal:case Xt.logPanic:return!0;default:return!1}}function ra(e){if(!e)return["",""];var t=e.indexOf(":");return t>=0?e.slice(t+1)===Gt.allSystem?[e.slice(0,t),Gt.allSystem]:[e.slice(0,t),e]:[e,e]}y()(Yt,{VCard:Xe["a"],VCol:$t["a"],VRow:Bt["a"],VTooltip:Zt["a"]}),function(e){e["allSystem"]="all",e["internalSystem"]="internal",e["itemId"]="item.id",e["itemName"]="item.name",e["spanEvents"]="span.events",e["spanId"]="span.id",e["spanParentId"]="span.parent_id",e["spanTraceId"]="span.trace_id",e["spanSystem"]="span.system",e["spanGroupId"]="span.group_id",e["spanName"]="span.name",e["spanEventName"]="span.event_name",e["spanKind"]="span.kind",e["spanTime"]="span.time",e["spanDuration"]="span.duration",e["spanStatusCode"]="span.status_code",e["spanStatusMessage"]="span.status_message",e["spanCount"]="span.count",e["spanCountPerMin"]="span.count_per_min",e["spanErrorCount"]="span.error_count",e["spanErrorPct"]="span.error_pct",e["serviceName"]="service.name",e["hostName"]="host.name",e["enduserId"]="enduser.id",e["httpMethod"]="http.method",e["httpStatusCode"]="http.status_code",e["rpcMethod"]="rpc.method",e["dbStatement"]="db.statement",e["dbStatementPretty"]="_db.statement_pretty",e["dbOperation"]="db.operation",e["dbSqlTable"]="db.sql.table",e["exceptionStacktrace"]="exception.stacktrace",e["codeFunction"]="code.function",e["codeFilepath"]="code.filepath"}(Gt||(Gt={})),function(e){e["all"]="all",e["internal"]="internal",e["error"]="error",e["exception"]="exception",e["logWarn"]="log:warn",e["logError"]="log:error",e["logFatal"]="log:fatal",e["logPanic"]="log:panic",e["event"]="event",e["logPrefix"]="log:",e["messagePrefix"]="message:"}(Xt||(Xt={}));var oa;a("2bd3");function sa(e,t){var a="number"===typeof t;if(!a&&void 0!==t)return oa.None;switch(e){case"count":case"rate":return oa.None;case"errorPct":return oa.Percents;case"p50":case"p90":case"p99":return oa.Nanoseconds}var n="",r=e.match(/(\S+)\((\S+)\)/);return n=r?r[2]:e,ia(n)?oa.Nanoseconds:ua(n)?oa.Bytes:ca(n)?oa.Percents:oa.None}function ia(e){return e===Gt.spanDuration||la(e,"duration")}function ua(e){return la(e,"bytes")}function ca(e){return e===Gt.spanErrorPct||la(e,"pct")}function la(e,t){return e.endsWith("."+t)||e.endsWith("_"+t)}(function(e){e["None"]="",e["Bytes"]="bytes",e["Nanoseconds"]="nanoseconds",e["Percents"]="percents"})(oa||(oa={}));var da=a("8168"),pa=a.n(da);function va(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ma(e,t,Object(L["a"])({trimMantissa:!0},a))}function ma(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return"undefined"===typeof e?"0":pa()(e).format(Object(L["a"])({mantissa:t},a))}function fa(e){return"number"!==typeof e||0===e?"0":Math.abs(e)<1?va(e,3):Math.abs(e)<1e3?va(e,1):(e/=1e3,Math.abs(e)<100?ma(e,1)+"k":Math.abs(e)<1e3?ma(e,0)+"k":(e/=1e3,Math.abs(e)<1e3?ma(e,1)+"m":(e/=1e3,ma(e,1)+"b")))}function ba(e){return"number"!==typeof e||Math.abs(e)<1e-4?"0%":pa()(e).format({output:"percent",mantissa:ha(e),optionalMantissa:!0})}function ha(e){return e=Math.abs(e),e<.01?2:e<.1?1:0}function ga(e){if("number"!==typeof e||0===e)return"0";if(Math.abs(e)<10)return va(e,2);if(Math.abs(e)<1024)return va(e,1);for(var t=0,a=["KB","MB","GB","TB","PB"];t<a.length;t++){var n=a[t];if(e/=1024,Math.abs(e)<10)return va(e,1)+n;if(e=Math.round(e),Math.abs(e)<1e3)return va(e,0)+n}return va(e,0)+"PB"}function ya(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"!==typeof e||0===e?"0":Math.abs(e)<1e3?ma(e,0,t)+"ns":(e/=1e3,Math.abs(e)<100?ma(e,1,t)+"µs":Math.abs(e)<1e3?ma(e,0,t)+"µs":(e/=1e3,Math.abs(e)<100?ma(e,1,t)+"ms":Math.abs(e)<1e4?ma(e,0,t)+"ms":(e/=1e3,Math.abs(e)<100?ma(e,1,t)+"s":(e/=60,Math.abs(e)<10?ma(e,1,t)+"m":Math.abs(e)<100?ma(e,0,t)+"m":(e/=60,Math.abs(e)<10?ma(e,1,t)+"h":ma(e,0,t)+"h")))))}function Oa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"!==typeof e||0===e?"0":Math.abs(e)<1e3?va(e,0,t)+"ns":(e/=1e3,Math.abs(e)<1e3?va(e,0,t)+"µs":(e/=1e3,Math.abs(e)<10?va(e,1,t)+"ms":Math.abs(e)<1e3?va(e,0,t)+"ms":(e/=1e3,Math.abs(e)<100?va(e,1,t)+"s":(e/=60,Math.abs(e)<100?va(e,1,t)+"m":Math.abs(e)<100?ma(e,0,t)+"m":(e/=60,Math.abs(e)<10?ma(e,1,t)+"h":ma(e,0,t)+"h")))))}function xa(e){switch(e){case oa.Percents:return ba;case oa.Nanoseconds:return Oa;case oa.Bytes:return ga;default:return ja}}function ja(e){return void 0===e?"<missing>":""===e?"<empty>":"number"===typeof e?fa(e):String(e)}var _a=Object(r["defineComponent"])({name:"SystemQuickMetrics",components:{SystemQuickMetricCard:ea},props:{systems:{type:Array,required:!0}},setup:function(e){var t=Object(r["computed"])((function(){var t,a={all:{name:"All",tooltip:"Total number of spans per minute",color:Qt["a"].teal.base,countPerMin:0,suffix:"span/min"},http:{name:"HTTP",tooltip:"Number of HTTP requests per minute",color:Qt["a"].blue.base,countPerMin:0,suffix:"req/min"},rpc:{name:"RPC",tooltip:"Number of RPC requests per minute",color:Qt["a"].orange.base,countPerMin:0,suffix:"req/min"},db:{name:"Database",tooltip:"Number of database queries per minute",color:Qt["a"].purple.base,countPerMin:0,suffix:"op/min"},inMemDb:{name:"In-memory DB",tooltip:"Number of in-memory database commands per minute",color:Qt["a"].indigo.base,countPerMin:0,suffix:"op/min"},failures:{name:"Failures",tooltip:"Number of spans with ".concat(Gt.spanStatusCode,' = "error" divided by total number of spans'),color:Qt["a"].red.base,count:0,errorCount:0}},n=Object(i["a"])(e.systems);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.dummy||(a.all.countPerMin+=r.countPerMin,aa(r.system)||(a.failures.count+=r.count,a.failures.errorCount+=r.errorCount),r.system.startsWith("http:")?a.http.countPerMin+=r.countPerMin:r.system.startsWith("rpc:")?a.rpc.countPerMin+=r.countPerMin:wa(r.system)?a.inMemDb.countPerMin+=r.countPerMin:Ca(r.system)&&(a.db.countPerMin+=r.countPerMin))}}catch(o){n.e(o)}finally{n.f()}return a})),a=Object(r["computed"])((function(){return 0===t.value.http.countPerMin&&0===t.value.rpc.countPerMin}));return{Unit:oa,metrics:t,showAll:a}}});function Ca(e){return e.startsWith("db:")}function wa(e){switch(e){case"db:redis":case"db:memcache":return!0}return!1}var ka=_a,Sa=(a("7a89"),Object(h["a"])(ka,Ut,Ht,!1,null,"09fcbf10",null)),Pa=Sa.exports;y()(Sa,{VCol:$t["a"],VRow:Bt["a"]});var Va=Object(r["defineComponent"])({name:"Overview",components:{DateRangePicker:ht,HelpCard:Ft,SystemQuickMetrics:Pa},setup:function(){Object(D["useTitle"])("Overview");var e=le(),t=je(e);return{dateRange:e,systems:t}}}),qa=Va,Ta=(a("a885"),Object(h["a"])(qa,E,M,!1,null,"ae10ee26",null)),Ra=Ta.exports;y()(Ta,{VCol:$t["a"],VContainer:It["a"],VRow:Bt["a"],VSpacer:We["a"],VTab:ze["a"],VTabs:Je["a"]});var Ia=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("XPlaceholder",[a("v-card",{staticClass:"mb-4",attrs:{outlined:"",rounded:"lg"}},[a("v-toolbar",{attrs:{flat:"",color:"light-blue lighten-5"}},[a("v-toolbar-title",[e._v("Systems")]),a("v-spacer"),a("v-btn",{staticClass:"primary",attrs:{to:e.exploreRoute,small:""}},[e._v("Open explorer")])],1),a("v-card-text",{staticClass:"pb-0"},[e.systems.types.length>=3?a("v-slide-group",{staticClass:"ml-2",attrs:{"center-active":"","show-arrows":""},model:{value:e.systems.filter,callback:function(t){e.$set(e.systems,"filter",t)},expression:"systems.filter"}},e._l(e.systems.types,(function(t,n){return a("v-slide-item",{key:t,attrs:{value:t},scopedSlots:e._u([{key:"default",fn:function(r){var o=r.active,s=r.toggle;return[a("v-btn",{class:{"ml-1":n>0},attrs:{"input-value":o,"active-class":"blue white--text",small:"",depressed:"",rounded:""},on:{click:s}},[e._v(" "+e._s(t)+" ")])]}}],null,!0)})})),1):e._e()],1),a("v-card-text",[a("OverviewTable",{attrs:{"date-range":e.dateRange,loading:e.systems.loading,items:e.systems.pageSystems,order:e.systems.order}})],1)],1),a("XPagination",{attrs:{pager:e.systems.pager}})],1)},Ea=[],Ma=a("c0ac"),Da=a("b361");a("3856"),a("bd32"),a("a9bc"),a("4c82"),a("2dc3");function La(e){return e.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")}function Na(e){if("string"!==typeof e)return JSON.stringify(e);if(!e.length)return'""';if("'"===e[0]&&"'"===e[e.length-1])return e;if('"'===e[0]&&'"'===e[e.length-1])return e;var t=parseFloat(e);return isNaN(t)||t.toString()!==e?JSON.stringify(e):t}var $a=" | ",Ba=/^where\s+span\.group_id\s+=\s+(\S+)$/i;function Aa(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=null!==(e=t.paramName)&&void 0!==e?e:"query",n=l(),o=n.router,s=n.route,i=Object(r["shallowRef"])(!1),u=Object(r["shallowRef"])([]),c=Object(r["computed"])({set:function(e){u.value=Fa(e).map((function(e){return Object(r["reactive"])(e)}))},get:function(){return Xa(u.value)}});function p(e){u.value.splice(e,1),u.value=u.value}function v(e){e.disabled=!e.disabled}function m(e){e.editQuery=e.query,e.editMode=!0}function f(e,t){t&&(e.editQuery!==e.query&&(e.error=""),e.query=e.editQuery),e.editMode=!1}function b(e){u.value.length===e.length&&u.value.forEach((function(t,a){var n,r,o=e[a];t.query=o.query,t.error=null!==(n=o.error)&&void 0!==n?n:"",t.disabled=null!==(r=o.disabled)&&void 0!==r&&r}))}function h(){return{query:c.value}}function g(){return new Ua(c.value)}function y(e){t.syncQuery?o.push({query:Object(L["a"])(Object(L["a"])({},s.value.query),{},Object(N["a"])({},a,e.toString()))}).catch((function(){})):c.value=e.toString()}return"string"===typeof t.query?c.value=t.query:t.query&&Object(r["watch"])(t.query,(function(e){c.value=e}),{immediate:!0}),t.syncQuery&&d().sync({fromQuery:function(e){var n,r,o=null!==(n=null!==(r=e[a])&&void 0!==r?r:t.query)&&void 0!==n?n:"";e.where&&(o+=$a+"where "+e.where),c.value=o},toQuery:function(){return Object(N["a"])({},a,c.value)}}),Object(r["proxyRefs"])({rawMode:i,parts:u,query:c,removeAt:p,toggle:v,enterEditMode:m,exitEditMode:f,syncParts:b,axiosParams:h,createEditor:g,commitEdits:y})}function Fa(e){return e&&"string"===typeof e?e.split($a).map((function(e){return e.trim()})).filter((function(e){return e.length})).map((function(e){return Ga(e)})):[]}function Ga(e){return{query:e,error:"",disabled:!1,editMode:!1,editQuery:""}}function Xa(e){return e.map((function(e){return e.query})).join($a)}var Ua=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(Ma["a"])(this,e),Object(N["a"])(this,"parts",void 0),this.parts=Fa(t)}return Object(Da["a"])(e,[{key:"toString",value:function(){return Xa(this.parts)}},{key:"reset",value:function(){return this.parts=[],this.add(Ha(Gt.spanGroupId)),this}},{key:"add",value:function(e){var t,a=this,n=Object(i["a"])(Fa(e));try{var r=function(){var e=t.value,n=a.parts.findIndex((function(t){return t.query===e.query}));-1===n&&a.parts.push(e)};for(n.s();!(t=n.n()).done;)r()}catch(o){n.e(o)}finally{n.f()}return this}},{key:"where",value:function(e,t,a){return void 0===a?this.replaceOrPush(new RegExp("^where\\s+".concat(La(e),"\\s+").concat(t,"$"),"i"),"where ".concat(e," ").concat(t)):this.replaceOrPush(new RegExp("^where\\s+".concat(La(e),"\\s+").concat(t,"\\s+.+$"),"i"),"where ".concat(e," ").concat(t," ").concat(Na(a)))}},{key:"replace",value:function(e,t){var a=this.parts.find((function(t){return e.test(t.query)}));return!!a&&(a.query=t,!0)}},{key:"replaceOrPush",value:function(e,t){return this.replace(e,t)||this.parts.push(Ga(t)),this}},{key:"replaceOrUnshift",value:function(e,t){return this.replace(e,t)||this.parts.unshift(Ga(t)),this}},{key:"remove",value:function(e){var t;t="string"===typeof e?this.parts.findIndex((function(t){return t.query===e})):this.parts.findIndex((function(t){return e.test(t.query)})),t>=0&&this.parts.splice(t,1)}},{key:"groupId",value:function(){var e,t=Object(i["a"])(this.parts);try{for(t.s();!(e=t.n()).done;){var a=e.value,n=a.query.match(Ba);if(n)return n[1]}}catch(r){t.e(r)}finally{t.f()}return""}},{key:"removeGroupFilter",value:function(){return this.remove(Ba),this}},{key:"replaceGroupBy",value:function(e){return this.replaceOrUnshift(/^group\s+by\s+/i,"group by ".concat(e))}}]),e}();function Ha(e){var t=["group by ".concat(e),Gt.spanCountPerMin,Gt.spanErrorPct,"p50(".concat(Gt.spanDuration,")"),"p90(".concat(Gt.spanDuration,")"),"p99(".concat(Gt.spanDuration,")")];return t.join($a)}function Qa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{perPage:10},t=Object(r["shallowRef"])(0),a=Object(r["shallowRef"])(1),n=Object(r["shallowRef"])(e.perPage),o=Object(r["computed"])((function(){var e=(a.value-1)*n.value,r=e+n.value;return r>t.value&&(r=t.value),{start:e,end:r}})),s=Object(r["computed"])((function(){var e=1e3,a=Math.ceil(t.value/n.value);return a>e?e:a})),i=Object(r["computed"])((function(){return a.value>1}));function u(){i.value&&a.value--}var c=Object(r["computed"])((function(){return a.value<s.value}));function l(){c.value&&a.value++}function d(){a.value=1}function p(){return{page:a.value,limit:n.value}}return Object(r["watch"])(s,(function(e){a.value>e&&(a.value=1)})),Object(r["proxyRefs"])({numItem:t,page:a,perPage:n,pos:o,numPage:s,hasPrev:i,prev:u,hasNext:c,next:l,reset:d,axiosParams:p})}function Wa(){var e,t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a.column=null!==(e=a.column)&&void 0!==e?e:"",a.desc=null===(t=a.desc)||void 0===t||t;var n=Object(r["shallowRef"])(a.column),o=Object(r["shallowRef"])(a.desc),s=Object(r["shallowRef"])({}),i=Object(r["computed"])((function(){return o.value?"mdi-arrow-down":"mdi-arrow-up"}));function u(e){n.value=e.column,o.value=e.desc}function c(e){n.value!==e?(n.value=e,o.value=!0):o.value=!o.value}function l(e){var t=["cursor-pointer"];return n.value===e&&t.push("active"),o.value?t.push("desc"):t.push("asc"),t}function d(){n.value="",o.value=!0}return Object(r["watch"])((function(){return{sort_by:n.value,sort_dir:za(o.value)}}),(function(e){s.value=e}),{immediate:!0,flush:"sync"}),Object(r["proxyRefs"])({column:n,desc:o,icon:i,axiosParams:s,change:u,reset:d,toggle:c,thClass:l})}function za(e){return e?"desc":"asc"}function Ka(e){var t=l(),a=t.route,n=Qa({perPage:15}),o=Wa({column:"system",desc:!1}),s=Object(r["ref"])(""),c=xe((function(){var t=a.value.params.projectId;return{url:"/api/tracing/".concat(t,"/systems-stats"),params:Object(L["a"])({},e.axiosParams())}})),d=c.loading,p=c.data,v=Object(r["computed"])((function(){var e,t,a=null!==(e=null===(t=p.value)||void 0===t?void 0:t.systems)&&void 0!==e?e:[];return a})),m=Object(r["computed"])((function(){var e,t=Object(u["orderBy"])(v.value,null!==(e=o.column)&&void 0!==e?e:"system",o.desc?"desc":"asc");return t})),f=Object(r["computed"])((function(){return s.value?m.value.filter((function(e){return e.system.startsWith(s.value)})):m.value})),b=Object(r["computed"])((function(){var e=f.value.slice(n.pos.start,n.pos.end);return e})),h=Object(r["computed"])((function(){var e,t=[],a=Object(i["a"])(v.value);try{for(a.s();!(e=a.n()).done;){var n=e.value,r=n.system,o=r.indexOf(":");o>=0&&(r=r.slice(0,o)),-1===t.indexOf(r)&&t.push(r)}}catch(s){a.e(s)}finally{a.f()}return t.sort()}));return Object(r["watch"])(f,(function(e){n.numItem=e.length}),{flush:"sync"}),Object(r["proxyRefs"])({pager:n,order:o,filter:s,loading:d,list:f,pageSystems:b,types:h})}var Ja,Za=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-simple-table",{staticClass:"v-data-table--large"},[a("thead",{staticClass:"v-data-table-header"},[a("tr",[e.column?a("ThOrder",{attrs:{value:e.column,order:e.order}},[e._v(e._s(e.column))]):e._e(),a("ThOrder",{attrs:{value:"system",order:e.order}},[e._v("System")]),a("ThOrder",{attrs:{value:"rate",order:e.order,align:"center"}},[e._v("Spans per minute")]),a("ThOrder",{attrs:{value:"errorPct",order:e.order,align:"center"}},[e._v("Errors")]),a("ThOrder",{attrs:{value:"p50",order:e.order,align:"center"}},[e._v("P50 latency")]),a("ThOrder",{attrs:{value:"p99",order:e.order,align:"center"}},[e._v("P99 latency")])],1)]),a("thead",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}]},[a("tr",{staticClass:"v-data-table__progress"},[a("th",{staticClass:"column",attrs:{colspan:"99"}},[a("v-progress-linear",{attrs:{height:"2",absolute:"",indeterminate:""}})],1)])]),e.items.length?e._e():a("tbody",[a("tr",{staticClass:"v-data-table__empty-wrapper"},[a("td",{attrs:{colspan:"99"}},[e._v("There are no data for the selected date range.")])])]),a("tbody",e._l(e.items,(function(t,n){return a("tr",{key:n},[e.column?a("td",{staticClass:"text-subtitle-1"},[a("router-link",{attrs:{to:e.columnRoute(t[e.column])},nativeOn:{click:function(e){e.stopPropagation()}}},[e._v(" "+e._s(t[e.column])+" ")])],1):e._e(),a("td",{staticClass:"text-subtitle-1"},[a("router-link",{attrs:{to:e.groupListRoute(t.system)},nativeOn:{click:function(e){e.stopPropagation()}}},[e._v(" "+e._s(t.system)+" ")])],1),a("td",{staticClass:"text-subtitle-2"},[a("div",{staticClass:"d-flex align-center"},[a("SparklineChart",{staticClass:"mr-2",attrs:{name:"rate",line:t.stats.rate,time:t.stats.time}}),a("XNum",{attrs:{value:t.rate}})],1)]),a("td",{staticClass:"text-subtitle-2"},[t.stats.errorCount?a("div",{staticClass:"d-flex align-center"},[a("SparklineChart",{staticClass:"mr-2",attrs:{name:"errorPct",line:t.stats.errorPct,time:t.stats.time}}),e._v(" "+e._s(e.percent(t.errorPct))+" ")],1):e._e()]),a("td",{staticClass:"text-subtitle-2"},[t.stats.p50?a("div",{staticClass:"d-flex align-center"},[a("SparklineChart",{staticClass:"mr-2",attrs:{name:"p50",line:t.stats.p50,time:t.stats.time}}),a("XDuration",{attrs:{duration:t.p50}})],1):e._e()]),a("td",{staticClass:"text-subtitle-2"},[t.stats.p99?a("div",{staticClass:"d-flex align-center"},[a("SparklineChart",{staticClass:"mr-2",attrs:{name:"p99",line:t.stats.p99,time:t.stats.time}}),a("XDuration",{attrs:{duration:t.p99}})],1):e._e()])])})),0)])],1)},Ya=[];a("970e");(function(e){e["Start"]="start",e["End"]="end",e["Center"]="center"})(Ja||(Ja={}));var en,tn,an=n["default"].component("ThSort",{functional:!0,props:{value:{type:String,default:""},order:{type:Object,required:!0},align:{type:String,default:"start"}},render:function(e,t){var a,n=t.props,r=t.data,o=t.slots,s=[e("span",o().default)],i=e(Qe["a"],{props:{size:18},class:"v-data-table-header__icon"},"mdi-arrow-up");switch(n.align){case Ja.Start:a="text-left",s.push(i);break;case Ja.End:a="text-right",s.unshift(i);break;case Ja.Center:a="text-center",s.push(i);break;default:throw new Error("unknown ".concat(n.align))}return e("th",Object(L["a"])(Object(L["a"])({},r),{},{class:["text-no-wrap",a,n.order.thClass(n.value)],on:{click:function(){n.order.toggle(n.value)}}}),s)}}),nn=an,rn=Object(h["a"])(nn,en,tn,!1,null,"6e0f5777",null),on=rn.exports,sn=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("EChart",{attrs:{width:e.chart.width,height:e.chart.height,option:e.chart.option}})},un=[],cn=a("0963"),ln=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container"},[a("v-sheet",{staticClass:"mx-auto echart",attrs:{width:e.width,height:e.height}})],1)},dn=[],pn=(a("4ace"),a("8594"),Object(r["defineComponent"])({name:"EChart",props:{loading:{type:Boolean,default:!1},value:{type:Object,default:void 0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],required:!0},option:{type:Object,default:void 0},group:{type:[String,Symbol],default:void 0}},setup:function(e,t){var a,n=Object(r["shallowRef"])();function o(){if(!a){var r=n.value.getElementsByClassName("echart")[0];a=cn["b"](r),t.emit("input",a),e.group&&mn(e.group,a)}}var s=Object(u["debounce"])((function(e){a.isDisposed()||a.setOption(e,{notMerge:!0,lazyUpdate:!0,silent:!0})}),50);return Object(r["onMounted"])((function(){Object(r["watch"])((function(){return e.option}),(function(e){e&&(o(),s(e))}),{immediate:!0}),Object(r["watch"])((function(){return e.loading}),(function(e){o(),e?a.showLoading():a.hideLoading()}),{immediate:!0})})),Object(r["onUnmounted"])((function(){a&&(e.group&&fn(e.group,a),a.dispose())})),{container:n}}})),vn={};function mn(e,t){var a=vn[e];a||(a=[],vn[e]=a),a.push(t),bn(t,a)}function fn(e,t){var a=vn[e];if(a){var n=a.indexOf(t);n>=0&&a.splice(n,1)}}function bn(e,t){e.on("updateAxisPointer",(function(a){for(var n=e.makeActionFromEvent(a),r=n.axesInfo||[],o=r.length-1;o>=0;o--)"y"===r[o].axisDim&&r.splice(o,1);var s,u=Object(i["a"])(t);try{for(u.s();!(s=u.n()).done;){var c=s.value;c!==e&&(delete n.axesInfo,c.dispatchAction(n,!0))}}catch(l){u.e(l)}finally{u.f()}}))}var hn=pn,gn=(a("735d"),a("159b")),yn=Object(h["a"])(hn,ln,dn,!1,null,null,null),On=yn.exports;function xn(){return{animation:!1,textStyle:{fontFamily:'"Roboto", sans-serif'},toolbox:{show:!1},dataZoom:[{type:"inside",disabled:!0}],legend:[],grid:[],xAxis:[],yAxis:[],dataset:[],series:[],tooltip:[]}}function jn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.tooltip.push(Object(L["a"])({trigger:"axis",appendToBody:!0,axisPointer:{type:"cross",link:[{xAxisIndex:"all"}]}},t))}function _n(e){return function(t){var a,n=[],r=Object(i["a"])(t);try{for(r.s();!(a=r.n()).done;){var o=a.value,s=Object(u["truncate"])(o.seriesName,{length:60}),c=o.value[o.encode.y[0]];if(n.push("<tr>"+"<td>".concat(o.marker,"</td>")+"<td>".concat(s,"</td>")+"<td>".concat(e(c),"</td>")+"</tr>"),20===n.length)break}}catch(d){r.e(d)}finally{r.f()}var l=['<div class="chart-tooltip">',"<table>","<tbody>",n.join(""),"</tbody>","</table>","</div"];return l.join("")}}y()(yn,{VSheet:gn["a"]});var Cn=Object(r["defineComponent"])({name:"SparklineChart",components:{EChart:On},props:{name:{type:String,required:!0},line:{type:Array,required:!0},time:{type:Array,required:!0}},setup:function(e){var t=Object(r["computed"])((function(){var t={width:100,height:30},a=xn();return jn(a,{axisPointer:void 0,formatter:_n(xa(sa(e.name)))}),a.grid.push({show:!0,top:2,left:2,right:2,height:27,borderWidth:0}),a.xAxis.push({type:"time",show:!0,axisLine:{lineStyle:{color:Qt["a"].grey.lighten2}},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1}}),a.yAxis.push({type:"value",show:!1}),wn(a,e.name,e.line,e.time),t.option=a,t}));return{chart:t}}});function wn(e,t,a,n){e.dataset.push({source:Object(N["a"])({time:n},t,a)});var r=Qt["a"].blue.base;e.series.push({type:"line",name:t,encode:{x:"time",y:t},showSymbol:!1,lineStyle:{width:1},itemStyle:{color:r},areaStyle:{color:new cn["a"].LinearGradient(0,0,0,1,[{offset:0,color:r},{offset:1,color:"#ffe"}])}})}var kn=Cn,Sn=Object(h["a"])(kn,sn,un,!1,null,"e8f6d994",null),Pn=Sn.exports,Vn=Object(r["defineComponent"])({name:"OverviewTable",components:{ThOrder:on,SparklineChart:Pn},props:{dateRange:{type:Object,required:!0},loading:{type:Boolean,required:!0},items:{type:Array,default:function(){return[]}},order:{type:Object,required:!0},column:{type:String,default:""},baseColumnRoute:{type:Object,default:void 0}},setup:function(e){function t(t){var a;a=""===t?"".concat(e.column," does not exist"):"".concat(e.column," = ").concat(Na(t));var n=Object(L["a"])({},e.baseColumnRoute);return n.query=Object(L["a"])(Object(L["a"])({},n.query),{},{where:a}),n}function a(t){return{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.dateRange.queryParams()),{},{system:t})}}return{xkey:Gt,columnRoute:t,groupListRoute:a,percent:ba}}}),qn=Vn,Tn=(a("c05d"),a("755a")),Rn=a("1556"),In=Object(h["a"])(qn,Za,Ya,!1,null,null,null),En=In.exports;y()(In,{VProgressLinear:Tn["a"],VSimpleTable:Rn["a"]});var Mn=Object(r["defineComponent"])({name:"SystemOverview",components:{OverviewTable:En},props:{dateRange:{type:Object,required:!0}},setup:function(e){var t=Ka(e.dateRange),a=Object(r["computed"])((function(){return{name:"GroupList",query:{system:Gt.allSystem,query:Ha(Gt.spanSystem)}}}));return{xkey:Gt,systems:t,exploreRoute:a}}}),Dn=Mn,Ln=(a("1775"),a("4663")),Nn=a("d4eb"),$n=a("2c70"),Bn=Object(h["a"])(Dn,Ia,Ea,!1,null,null,null),An=Bn.exports;y()(Bn,{VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VSlideGroup:Ln["b"],VSlideItem:Nn["a"],VSpacer:We["a"],VToolbar:$n["a"],VToolbarTitle:Et["b"]});var Fn=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-card",{staticClass:"mb-4",attrs:{outlined:"",rounded:"lg"}},[a("v-toolbar",{attrs:{flat:"",color:"light-blue lighten-5"}},[a("v-toolbar-title",[e._v("Services")]),a("v-toolbar-items",{staticClass:"ml-5"},[a("v-col",{attrs:{"align-self":"center"}},[a("SystemPicker",{attrs:{"date-range":e.dateRange,systems:e.systems,"route-name":"ServiceOverview",outlined:""}})],1)],1),a("v-spacer"),a("v-btn",{staticClass:"primary",attrs:{to:e.groupListRoute,small:""}},[e._v("Open explorer")])],1),a("v-card-text",[a("OverviewTable",{attrs:{"date-range":e.dateRange,loading:e.services.loading,items:e.services.pageServices,order:e.services.order,column:"service","base-column-route":e.groupListRoute}})],1)],1),a("XPagination",{attrs:{pager:e.services.pager}})],1)},Gn=[];function Xn(e,t){var a=l(),n=a.route,o=Qa({perPage:15}),s=Wa({column:Gt.serviceName,desc:!1}),i=xe((function(){var a=n.value.params.projectId;return{url:"/api/tracing/".concat(a,"/services"),params:Object(L["a"])(Object(L["a"])({},t.axiosParams()),e.axiosParams())}})),c=i.loading,d=i.data,p=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=d.value)||void 0===t?void 0:t.services)&&void 0!==e?e:[]})),v=Object(r["computed"])((function(){var e,t=Object(u["orderBy"])(p.value,null!==(e=s.column)&&void 0!==e?e:Gt.serviceName,s.desc?"desc":"asc");return t})),m=Object(r["computed"])((function(){var e=v.value.slice(o.pos.start,o.pos.end);return e}));return Object(r["watch"])(p,(function(e){o.numItem=e.length}),{flush:"sync"}),Object(r["proxyRefs"])({pager:o,order:s,loading:c,list:v,pageServices:m})}var Un=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on;return[a("v-btn",e._g(e._b({staticStyle:{"text-transform":"none"}},"v-btn",e.attrs,!1),n),[a("span",{staticClass:"px-4"},[e._v(e._s(e.systems.activeValue||"Choose system"))]),a("v-icon",{attrs:{right:"",size:"24"}},[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("SystemList",{attrs:{"date-range":e.dateRange,systems:e.systems,"max-height":e.maxHeight},on:{"click:item":function(t){e.menu=!1}}})],1)},Hn=[],Qn=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-card",{attrs:{flat:"","max-height":e.maxHeight}},[a("v-list",{attrs:{dense:""}},[e._l(e.systems.tree,(function(t){return[t.children?a("v-menu",{key:t.system,attrs:{"open-on-hover":"","offset-x":"",transition:"slide-x-transition"},scopedSlots:e._u([{key:"activator",fn:function(n){var r=n.on,o=n.attrs;return[a("v-list-item",e._g(e._b({attrs:{to:e.systemRoute(t.system),exact:""}},"v-list-item",o,!1),r),[a("v-list-item-content",[a("v-list-item-title",[e._v(e._s(t.system))])],1),a("v-list-item-icon",{staticClass:"align-self-center"},[a("v-icon",[e._v("mdi-menu-right")])],1)],1)]}}],null,!0)},[a("v-card",{attrs:{flat:"","max-height":e.maxHeight}},[a("v-list",{attrs:{dense:""}},e._l(t.children,(function(t){return a("v-list-item",{key:t.system,attrs:{to:e.systemRoute(t.system),exact:""},on:{click:function(t){return e.$emit("click:item")}}},[a("v-list-item-content",[a("v-list-item-title",[e._v(e._s(t.system))])],1)],1)})),1)],1)],1):a("v-list-item",{key:t.system,attrs:{to:e.systemRoute(t.system),exact:""}},[a("v-list-item-content",[a("v-list-item-title",[e._v(e._s(t.system))])],1)],1)]}))],2)],1)},Wn=[],zn=Object(r["defineComponent"])({name:"SystemList",props:{dateRange:{type:Object,required:!0},systems:{type:Object,required:!0},maxHeight:{type:Number,default:420}},setup:function(e){var t=l(),a=t.route;function n(t){return{query:Object(L["a"])(Object(L["a"])({},e.dateRange.queryParams()),{},{system:t,query:a.value.query.query})}}return{systemRoute:n}}}),Kn=zn,Jn=a("27e2"),Zn=Object(h["a"])(Kn,Qn,Wn,!1,null,"31124747",null),Yn=Zn.exports;y()(Zn,{VCard:Xe["a"],VIcon:Qe["a"],VList:Me["a"],VListItem:De["a"],VListItemContent:Le["b"],VListItemIcon:Jn["a"],VListItemTitle:Le["c"],VMenu:rt["a"]});var er=Object(r["defineComponent"])({name:"SystemPicker",components:{SystemList:Yn},props:{dateRange:{type:Object,required:!0},systems:{type:Object,required:!0},outlined:{type:Boolean,default:!1},maxHeight:{type:Number,default:420}},setup:function(e){var t=Object(r["shallowRef"])(!1),a=Object(r["computed"])((function(){return e.outlined?{outlined:!0}:{dark:!0,class:"blue darken-1 elevation-5"}}));return d().sync({fromQuery:function(t){t.system&&e.systems.change(t.system)},toQuery:function(){if(e.systems.activeValue)return{system:e.systems.activeValue}}}),Object(r["watch"])((function(){return e.systems.list}),(function(){e.systems.activeItem||e.systems.list.length&&e.systems.change(e.systems.list[0].system)}),{immediate:!0}),{menu:t,attrs:a}}}),tr=er,ar=Object(h["a"])(tr,Un,Hn,!1,null,"0a64f944",null),nr=ar.exports;y()(ar,{VBtn:Ge["a"],VIcon:Qe["a"],VMenu:rt["a"]});var rr=Object(r["defineComponent"])({name:"ServiceOverview",components:{OverviewTable:En,SystemPicker:nr},props:{dateRange:{type:Object,required:!0},systems:{type:Object,required:!0}},setup:function(e){var t=Xn(e.dateRange,e.systems),a=Object(r["computed"])((function(){return Ha(Gt.serviceName)})),n=Object(r["computed"])((function(){return{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.systems.axiosParams()),{},{query:a.value})}}));return{xkey:Gt,services:t,groupListRoute:n}}}),or=rr,sr=Object(h["a"])(or,Fn,Gn,!1,null,null,null),ir=sr.exports;y()(sr,{VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VSpacer:We["a"],VToolbar:$n["a"],VToolbarItems:Et["a"],VToolbarTitle:Et["b"]});var ur=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-card",{staticClass:"mb-4",attrs:{outlined:"",rounded:"lg"}},[a("v-toolbar",{attrs:{flat:"",color:"light-blue lighten-5"}},[a("v-toolbar-title",[e._v("Hosts")]),a("v-toolbar-items",{staticClass:"ml-5"},[a("v-col",{attrs:{"align-self":"center"}},[a("SystemPicker",{attrs:{"date-range":e.dateRange,systems:e.systems,"route-name":"HostOverview",outlined:""}})],1)],1),a("v-spacer"),a("v-btn",{staticClass:"primary",attrs:{to:e.groupListRoute,small:""}},[e._v("Open explorer")])],1),a("v-card-text",[a("OverviewTable",{attrs:{"date-range":e.dateRange,loading:e.hosts.loading,items:e.hosts.pageHosts,order:e.hosts.order,column:"host","base-column-route":e.groupListRoute}})],1)],1),a("XPagination",{attrs:{pager:e.hosts.pager}})],1)},cr=[];function lr(e,t){var a=l(),n=a.route,o=Qa({perPage:15}),s=Wa({column:Gt.hostName,desc:!1}),i=xe((function(){var a=n.value.params.projectId;return{url:"/api/tracing/".concat(a,"/hosts"),params:Object(L["a"])(Object(L["a"])({},t.axiosParams()),e.axiosParams())}})),c=i.loading,d=i.data,p=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=d.value)||void 0===t?void 0:t.hosts)&&void 0!==e?e:[]})),v=Object(r["computed"])((function(){var e,t=Object(u["orderBy"])(p.value,null!==(e=s.column)&&void 0!==e?e:Gt.hostName,s.desc?"desc":"asc");return t})),m=Object(r["computed"])((function(){var e=v.value.slice(o.pos.start,o.pos.end);return e}));return Object(r["watch"])(p,(function(e){o.numItem=e.length}),{flush:"sync"}),Object(r["proxyRefs"])({pager:o,order:s,loading:c,list:v,pageHosts:m})}var dr=Object(r["defineComponent"])({name:"HostOverview",components:{OverviewTable:En,SystemPicker:nr},props:{dateRange:{type:Object,required:!0},systems:{type:Object,required:!0}},setup:function(e){var t=lr(e.dateRange,e.systems),a=Object(r["computed"])((function(){return Ha(Gt.hostName)})),n=Object(r["computed"])((function(){return{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.systems.axiosParams()),{},{query:a.value})}}));return{xkey:Gt,hosts:t,groupListRoute:n}}}),pr=dr,vr=Object(h["a"])(pr,ur,cr,!1,null,null,null),mr=vr.exports;y()(vr,{VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VSpacer:We["a"],VToolbar:$n["a"],VToolbarItems:Et["a"],VToolbarTitle:Et["b"]});var fr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("XPlaceholder",{scopedSlots:e._u([e.systems.hasNoData?{key:"placeholder",fn:function(){return[a("HelpCard",{attrs:{"date-range":e.dateRange,loading:e.systems.loading}})]},proxy:!0}:null],null,!0)},[a("div",[a("v-container",{staticClass:"pb-0",attrs:{fluid:e.$vuetify.breakpoint.mdAndDown}},[a("v-row",{staticClass:"mb-4",attrs:{align:"center",justify:"space-between"}},[a("v-col",{attrs:{cols:"auto"}},[a("SystemPicker",{attrs:{"date-range":e.dateRange,systems:e.systems,"route-name":"GroupList"}})],1),a("v-col",{attrs:{cols:"auto"}},[a("DateRangePicker",{attrs:{"date-range":e.dateRange}})],1)],1)],1)],1),a("v-container",{staticClass:"pt-2",attrs:{fluid:e.$vuetify.breakpoint.mdAndDown}},[a("UptraceQuery",{staticClass:"mb-1",attrs:{uql:e.uql}},[a("SpanFilters",{attrs:{uql:e.uql,systems:e.systems,"axios-params":e.axiosParams}})],1),a("GroupList",{attrs:{"date-range":e.dateRange,systems:e.systems,uql:e.uql,"axios-params":e.axiosParams}})],1)],1)},br=[],hr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-row",{staticClass:"mb-n1",attrs:{"no-gutters":"",align:"center"}},[a("v-col",[a("div",{staticClass:"d-flex filters"},[e._t("default")],2)]),a("v-col",{attrs:{cols:"auto"}},[a("SpanQueryHelpDialog",{staticClass:"mr-2",attrs:{uql:e.uql}})],1),a("v-col",{attrs:{cols:"auto"}},[e.uql.rawMode?a("v-btn",{attrs:{icon:"",title:"Apply filters"},on:{click:function(t){return e.exitRawMode(!0)}}},[a("v-icon",{attrs:{size:"26",color:"success"}},[e._v("mdi-check")])],1):e._e(),a("v-btn",{attrs:{icon:"",title:"Cancel editing"},on:{click:function(t){e.uql.rawMode=!e.uql.rawMode}}},[e.uql.rawMode?a("v-icon",{attrs:{size:"22"}},[e._v("mdi-pencil-off-outline")]):a("v-icon",{attrs:{size:"22"}},[e._v("mdi-pencil-outline")])],1)],1)],1),a("v-row",{attrs:{align:"center",dense:""}},[e.uql.rawMode?a("v-col",[a("v-textarea",{attrs:{hint:"Press ENTER to apply filters and ESC to cancel editing","permanent-hint":"",rows:"1",outlined:"",clearable:"","auto-grow":"",autofocus:""},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;t.stopPropagation(),t.preventDefault()},keydown:[function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),t.preventDefault(),e.exitRawMode(!0))},function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"])?null:(t.stopPropagation(),t.preventDefault(),e.exitRawMode(!1))}]},model:{value:e.query,callback:function(t){e.query=t},expression:"query"}})],1):e.uql.parts.length?a("v-col",{staticClass:"d-flex flex-wrap align-start"},[e._l(e.uql.parts,(function(t,n){return[t.editMode?a("div",{key:t.query,staticClass:"mr-2 d-inline-block"},[a("v-text-field",{attrs:{"error-messages":t.error,outlined:"",dense:"","hide-details":"auto",autofocus:""},on:{keyup:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;t.stopPropagation(),t.preventDefault()},keydown:[function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:(a.stopPropagation(),a.preventDefault(),e.uql.exitEditMode(t,!0))},function(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"esc",27,a.key,["Esc","Escape"])?null:(a.stopPropagation(),a.preventDefault(),e.uql.exitEditMode(t,!1))}],blur:function(a){return e.uql.exitEditMode(t,!0)}},model:{value:t.editQuery,callback:function(a){e.$set(t,"editQuery",a)},expression:"part.editQuery"}})],1):a("div",{key:t.query,staticClass:"mr-2 mb-1 d-inline-block"},[a("v-chip",{attrs:{label:"",color:"grey lighten-4"},on:{click:function(a){return e.uql.enterEditMode(t)}}},[e._t("part",(function(){return[a("span",[e._v(e._s(t.query))]),a("v-icon",{attrs:{right:""},on:{click:function(t){return e.uql.removeAt(n)}}},[e._v("mdi-close")])]}),{part:t})],2),t.error?a("div",{staticClass:"text-caption text-no-wrap red--text text--darken-2"},[e._v(" "+e._s(t.error)+" ")]):e._e()],1)]}))],2):a("v-col",{staticClass:"mb-1 px-3 text-body-2 grey--text text--darken-2"},[e._v(" Empty query... ")])],1)],1)},gr=[],yr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-btn",{attrs:{icon:""},on:{click:function(t){e.dialog=!0}}},[a("v-icon",[e._v("mdi-help-circle-outline")])],1),a("v-dialog",{attrs:{"max-width":1280},on:{keydown:function(t){if(!t.type.indexOf("key")&&e._k(t.keyCode,"esc",27,t.key,["Esc","Escape"]))return null;e.dialog=!1}},model:{value:e.dialog,callback:function(t){e.dialog=t},expression:"dialog"}},[a("v-card",[a("v-toolbar",{attrs:{flat:"",color:"blue lighten-5"}},[a("v-toolbar-title",[e._v("Querying")]),a("v-spacer"),a("v-btn",{attrs:{icon:""},on:{click:function(t){e.dialog=!1}}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-close")])],1)],1),a("v-card-text",{staticClass:"py-4"},[a("p",{staticClass:"grey--text text--darken-4"},[e._v(" Uptrace supports SQL-like language to filter, group, and aggregate span "),a("a",{attrs:{href:"https://opentelemetry.uptrace.dev/attributes/",target:"_blank"}},[e._v("attributes")]),e._v(". ")]),a("v-simple-table",[a("thead",{staticClass:"v-data-table-header"},[a("tr",[a("th",[e._v("Query")]),a("th",[e._v("Comment")])])]),a("tbody",[a("tr",[a("td",[a("UqlChip",{attrs:{uql:e.uql,column:"span.name",op:"contains",value:"get|post"},on:{click:function(t){e.dialog=!1}}})],1),a("td",[e._v('Filter span names that contain "get" or "post" (case-insensitive).')])]),a("tr",[a("td",[a("UqlChip",{attrs:{uql:e.uql,query:"group by span.group_id | avg(span.duration) | where span.duration > 10ms and span.duration < 50ms"},on:{click:function(t){e.dialog=!1}}})],1),a("td",[e._v("Filter span duration.")])]),a("tr",[a("td",[a("UqlChip",{attrs:{uql:e.uql,query:"group by host.name | p50(span.duration)"},on:{click:function(t){e.dialog=!1}}})],1),a("td",[e._v("Select median span duration for each host name.")])]),a("tr",[a("td",[a("UqlChip",{attrs:{uql:e.uql,query:"group by span.group_id | where span.event_count > 0"},on:{click:function(t){e.dialog=!1}}})],1),a("td",[e._v("Select spans with events for each group.")])])])])],1),a("v-card-actions",[a("v-spacer"),a("v-btn",{attrs:{text:"",color:"primary"},on:{click:function(t){e.dialog=!1}}},[e._v("Close")]),a("v-btn",{attrs:{text:"",color:"primary",href:"https://docs.uptrace.dev/guide/querying.html",target:"_blank"}},[e._v("Read more")])],1)],1)],1)],1)},Or=[],xr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-tooltip",{attrs:{disabled:!e.tooltip,top:""},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("v-chip",e._g(e._b({attrs:{label:"",color:"grey lighten-4"},on:{click:e.apply}},"v-chip",r,!1),n),[e._v(" "+e._s(e.text)+" ")])]}}])},[e._v(" "+e._s(e.tooltip)+" ")])},jr=[],_r=Object(r["defineComponent"])({name:"UqlChip",props:{uql:{type:Object,required:!0},column:{type:String,default:""},group:{type:String,default:""},op:{type:String,default:""},value:{type:void 0,default:void 0},query:{type:String,default:""},tooltip:{type:String,default:void 0}},setup:function(e,t){var a=Object(r["computed"])((function(){if(e.group)return e.group;if(e.column){var t=[e.column,e.op];return e.value&&t.push(Na(e.value)),t.join(" ")}return e.query?e.query:""}));function n(){if(t.emit("click"),e.group){var a=e.uql.createEditor();return a.replaceGroupBy(e.group),void e.uql.commitEdits(a)}if(e.column&&!e.op)return o(e.column);if(e.column&&e.op){var n=e.uql.createEditor();return n.where(e.column,e.op,e.value),void e.uql.commitEdits(n)}e.query&&(e.uql.query=e.query)}function o(t){var a=e.uql.createEditor();a.add(t),e.uql.commitEdits(a)}return{text:a,apply:n}}}),Cr=_r,wr=a("c0ee"),kr=Object(h["a"])(Cr,xr,jr,!1,null,"3117a298",null),Sr=kr.exports;y()(kr,{VChip:wr["a"],VTooltip:Zt["a"]});var Pr=Object(r["defineComponent"])({name:"SpanQueryHelpDialog",components:{UqlChip:Sr},props:{uql:{type:Object,required:!0}},setup:function(){var e=Object(r["ref"])(!1);return{dialog:e}}}),Vr=Pr,qr=(a("adf7"),a("6b3e")),Tr=Object(h["a"])(Vr,yr,Or,!1,null,"7da06156",null),Rr=Tr.exports;y()(Tr,{VBtn:Ge["a"],VCard:Xe["a"],VCardActions:Ue["a"],VCardText:Ue["b"],VDialog:qr["a"],VIcon:Qe["a"],VSimpleTable:Rn["a"],VSpacer:We["a"],VToolbar:$n["a"],VToolbarTitle:Et["b"]});var Ir=Object(r["defineComponent"])({name:"UptraceQuery",components:{SpanQueryHelpDialog:Rr},props:{uql:{type:Object,required:!0}},setup:function(e){var t=Object(r["shallowRef"])("");function a(a){e.uql.rawMode=!1,a&&(e.uql.query=t.value)}return Object(r["watch"])((function(){return e.uql.query}),(function(e){t.value=e}),{immediate:!0}),{query:t,exitRawMode:a}}}),Er=Ir,Mr=(a("d502"),a("8784"),a("7e31")),Dr=a("1d82"),Lr=Object(h["a"])(Er,hr,gr,!1,null,"19f392aa",null),Nr=Lr.exports;y()(Lr,{VBtn:Ge["a"],VChip:wr["a"],VCol:$t["a"],VIcon:Qe["a"],VRow:Bt["a"],VTextField:Mr["a"],VTextarea:Dr["a"]});var $r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"frag",rawName:"v-frag"}]},[a("SearchFilterMenu",{attrs:{uql:e.uql}}),a("DurationFilterMenu",{attrs:{uql:e.uql}}),a("AttrFilterMenu",{attrs:{uql:e.uql,"axios-params":e.axiosParams,"attr-key":e.xkey.spanStatusCode,label:"Status"}}),a("AttrFilterMenu",{attrs:{uql:e.uql,"axios-params":e.axiosParams,"attr-key":e.xkey.spanKind,label:"Kind"}}),a("v-divider",{staticClass:"mx-2",attrs:{vertical:""}}),a("WhereFilterMenu",{attrs:{systems:e.systems,uql:e.uql,"axios-params":e.axiosParams}}),a("AggFilterMenu",{attrs:{uql:e.uql,"axios-params":e.axiosParams}}),a("GroupByMenu",{attrs:{uql:e.uql,"axios-params":e.axiosParams}}),a("v-divider",{staticClass:"mx-2",attrs:{vertical:""}}),a("v-btn",{staticClass:"v-btn--filter",attrs:{text:""},on:{click:e.reset}},[e._v("Reset")])],1)},Br=[],Ar=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("v-btn",e._g(e._b({staticClass:"v-btn--filter",attrs:{text:""}},"v-btn",r,!1),n),[a("span",[e._v("Search")]),a("v-icon",{staticClass:"ml-0",attrs:{right:""}},[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("v-form",{on:{submit:function(t){return t.preventDefault(),e.addFilter.apply(null,arguments)}}},[a("v-card",{attrs:{width:"400"}},[a("v-card-text",{staticClass:"pa-6"},[a("v-row",[a("v-col",[a("v-text-field",{attrs:{label:"Contains substr1|substr2|substr3",hint:'Case-insensitive options separated with "|"',"persistent-hint":"",filled:"",dense:"",autofocus:""},model:{value:e.attrValue,callback:function(t){e.attrValue=t},expression:"attrValue"}})],1)],1),a("v-row",[a("v-spacer"),a("v-col",{attrs:{cols:"auto"}},[a("v-btn",{staticClass:"primary",attrs:{type:"submit",disabled:!e.attrValue.length}},[e._v("Filter")])],1)],1)],1)],1)],1)],1)},Fr=[],Gr=Object(r["defineComponent"])({name:"SearchFilterMenu",props:{uql:{type:Object,required:!0}},setup:function(e){var t=Object(r["shallowRef"])(!1),a=Object(r["shallowRef"])("");function n(){var n=Na(a.value),r=e.uql.createEditor();r.add("where ".concat(Gt.spanName," contains ").concat(n)),e.uql.commitEdits(r),t.value=!1}return{xkey:Gt,menu:t,attrValue:a,addFilter:n}}}),Xr=Gr,Ur=(a("4a99"),a("b148")),Hr=Object(h["a"])(Xr,Ar,Fr,!1,null,"75636ea2",null),Qr=Hr.exports;y()(Hr,{VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VForm:Ur["a"],VIcon:Qe["a"],VMenu:rt["a"],VRow:Bt["a"],VSpacer:We["a"],VTextField:Mr["a"]});var Wr=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("v-btn",e._g(e._b({staticClass:"v-btn--filter",attrs:{text:""}},"v-btn",r,!1),n),[a("span",[e._v("Dur.")]),a("v-icon",{staticClass:"ml-0",attrs:{right:""}},[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("v-form",{on:{submit:function(t){return t.preventDefault(),e.addFilter.apply(null,arguments)}}},[a("v-card",{attrs:{width:"360px"}},[a("v-card-text",{staticClass:"py-6"},[a("v-row",{staticClass:"mb-n4",attrs:{align:"center"}},[a("v-col",[a("v-text-field",{attrs:{type:"number",min:"0",label:">= duration",suffix:"ms",outlined:"",dense:"",autofocus:"","hide-details":"auto"},model:{value:e.gte,callback:function(t){e.gte=t},expression:"gte"}})],1),a("v-col",{staticClass:"px-0",attrs:{cols:"auto"}},[e._v("AND")]),a("v-col",[a("v-text-field",{attrs:{type:"number",min:e.gte+1,label:"< duration",suffix:"ms",outlined:"",dense:"","hide-details":"auto"},model:{value:e.lt,callback:function(t){e.lt=t},expression:"lt"}})],1)],1),a("v-row",[a("v-spacer"),a("v-col",{attrs:{cols:"auto"}},[a("v-btn",{attrs:{type:"submit",color:"primary",disabled:!e.isValid}},[e._v("Filter")])],1)],1)],1)],1)],1)],1)},zr=[],Kr=Object(r["defineComponent"])({name:"DurationFilterMenu",props:{uql:{type:Object,required:!0}},setup:function(e){var t=Object(r["shallowRef"])(!1),a=Object(r["shallowRef"])(),n=Object(r["shallowRef"])(),o=Object(r["computed"])((function(){return a.value||n.value}));function s(){if(o.value){var r=e.uql.createEditor();a.value&&r.replaceOrPush(/^where\s+span\.duration\s+>=\s.+$/i,"where ".concat(Gt.spanDuration," >= ").concat(a.value,"ms")),n.value&&r.replaceOrPush(/^where\s+span\.duration\s+<\s.+$/i,"where ".concat(Gt.spanDuration," < ").concat(n.value,"ms")),e.uql.commitEdits(r),t.value=!1,a.value=void 0,n.value=void 0}else t.value=!1}return{menu:t,gte:a,lt:n,isValid:o,addFilter:s}}}),Jr=Kr,Zr=Object(h["a"])(Jr,Wr,zr,!1,null,"2ccaf884",null),Yr=Zr.exports;y()(Zr,{VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VForm:Ur["a"],VIcon:Qe["a"],VMenu:rt["a"],VRow:Bt["a"],VSpacer:We["a"],VTextField:Mr["a"]});var eo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("v-btn",e._g(e._b({staticClass:"v-btn--filter",attrs:{text:""}},"v-btn",r,!1),n),[a("span",[e._v(e._s(e.label))]),a("v-icon",{staticClass:"ml-0",attrs:{right:""}},[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("XList",{attrs:{loading:e.suggestions.loading,items:e.suggestions.filteredItems,"num-item":e.suggestions.items.length,"search-input":e.suggestions.searchInput,"return-object":""},on:{"update:searchInput":function(t){return e.$set(e.suggestions,"searchInput",t)},"update:search-input":function(t){return e.$set(e.suggestions,"searchInput",t)},input:function(t){return e.addFilter(t.text,"=")}},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[a("v-list-item-content",[a("v-list-item-title",[e._v(" "+e._s(e.truncate(n.text,{length:60}))+" ")])],1),a("v-list-item-action",{staticClass:"my-0",on:{click:function(t){return t.stopPropagation(),e.addFilter(n.text,"!=")}}},[a("v-btn",{attrs:{icon:""}},[a("v-icon",{attrs:{small:""}},[e._v("mdi-not-equal")])],1)],1)]}}])})],1)},to=[];function ao(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(r["shallowRef"])(""),o=null!==(t=a.suggestSearchInput)&&void 0!==t&&t,s=xe((function(){return e()})),i=s.loading,u=s.data,c=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=u.value)||void 0===t?void 0:t.suggestions)&&void 0!==e?e:[]})),l=Object(r["computed"])((function(){var e=c.value.slice();if(!n.value)return e;if(e=e.filter((function(e){return e.text.indexOf(n.value)>=0})),o){var t={text:n.value};e.length<=5?e.push(t):e.unshift(t)}return e}));return Object(r["proxyRefs"])({searchInput:n,loading:i,data:u,items:c,filteredItems:l})}var no=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-sheet",{attrs:{"max-height":"320",loading:e.loading}},[a("XPlaceholder",{scopedSlots:e._u([e.loading?{key:"placeholder",fn:function(){return[a("v-skeleton-loader",{attrs:{width:"200",type:"list-item@3",loading:""}})]},proxy:!0}:e.items.length?null:{key:"placeholder",fn:function(){return[a("v-card-text",[e._v("There are no any suggestions.")])]},proxy:!0}],null,!0)},[e.showFilter?a("v-card-text",{staticClass:"mb-n2"},[a("v-text-field",{attrs:{placeholder:"Filter",outlined:"",dense:"","hide-details":"auto",autofocus:"",clearable:""},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}})],1):e._e(),a("v-list",{attrs:{dense:""}},e._l(e.filteredItems,(function(t){return a("v-list-item",{key:t.value,on:{click:function(a){return e.onClick(t)}}},[e._t("item",(function(){return[a("v-list-item-content",[a("v-list-item-title",{staticStyle:{"text-overflow":"clip"}},[e._v(" "+e._s(e.truncate(t.text,{length:80}))+" ")])],1)]}),{item:t})],2)})),1)],1)],1)},ro=[],oo=Object(r["defineComponent"])({name:"XList",props:{loading:{type:Boolean,default:!1},items:{type:Array,required:!0},numItem:{type:Number,default:void 0},searchInput:{type:String,default:""},returnObject:{type:Boolean,default:!1}},setup:function(e,t){var a=Object(r["shallowRef"])(""),n=Object(r["computed"])((function(){return e.items.map((function(e){return"string"===typeof e?{text:e,value:e}:e}))})),o=Object(r["computed"])((function(){var e=n.value.slice();return a.value?e.filter((function(e){return e.text.indexOf(a.value)>=0})):e})),s=Object(r["computed"])((function(){return e.numItem?e.numItem>10:e.items.length>10}));function i(a){e.returnObject?t.emit("input",a):t.emit("input",a.value)}return Object(r["watch"])((function(){return e.searchInput}),(function(e){a.value=e}),{immediate:!0}),Object(r["watch"])(a,(function(e){t.emit("update:searchInput",e)})),{search:a,filteredItems:o,showFilter:s,onClick:i,truncate:u["truncate"]}}}),so=oo,io=a("712d"),uo=Object(h["a"])(so,no,ro,!1,null,"bea19ccc",null),co=uo.exports;y()(uo,{VCardText:Ue["b"],VList:Me["a"],VListItem:De["a"],VListItemContent:Le["b"],VListItemTitle:Le["c"],VSheet:gn["a"],VSkeletonLoader:io["a"],VTextField:Mr["a"]});var lo=Object(r["defineComponent"])({name:"AttrFilterMenu",components:{XList:co},props:{uql:{type:Object,required:!0},axiosParams:{type:Object,required:!0},attrKey:{type:String,required:!0},label:{type:String,required:!0}},setup:function(e,t){var a=l(),n=a.route,o=Object(r["shallowRef"])(!1),s=ao((function(){if(!o.value)return null;var t=n.value.params.projectId;return{url:"/api/tracing/".concat(t,"/suggestions/values"),params:Object(L["a"])(Object(L["a"])({},e.axiosParams),{},{column:e.attrKey})}}));function i(a,n){var r=e.uql.createEditor();r.where(e.attrKey,n,a),e.uql.commitEdits(r),o.value=!1,t.emit("change")}return{menu:o,suggestions:s,addFilter:i,truncate:u["truncate"]}}}),po=lo,vo=a("0a8a"),mo=Object(h["a"])(po,eo,to,!1,null,"48482022",null),fo=mo.exports;y()(mo,{VBtn:Ge["a"],VIcon:Qe["a"],VListItemAction:vo["a"],VListItemContent:Le["b"],VListItemTitle:Le["c"],VMenu:rt["a"]});var bo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("v-btn",e._g(e._b({staticClass:"v-btn--filter",attrs:{text:""}},"v-btn",r,!1),n),[a("span",[e._v("Where")]),a("v-icon",{staticClass:"ml-0",attrs:{right:""}},[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("v-card",{staticClass:"pa-3"},[a("v-row",[a("v-col",{attrs:{cols:"auto"}},[a("v-form",{ref:"form",staticClass:"pa-3",staticStyle:{width:"400px"},model:{value:e.isValid,callback:function(t){e.isValid=t},expression:"isValid"}},[a("v-row",[a("v-col",{staticClass:"space-around"},[a("UqlChip",{attrs:{uql:e.uql,column:"span.event_count",op:">",value:"0",tooltip:"Filter spans with events"},on:{click:function(t){e.menu=!1}}}),a("UqlChip",{attrs:{uql:e.uql,column:"span.event_log_count",op:">",value:"0",tooltip:"Filter spans with logs"},on:{click:function(t){e.menu=!1}}}),a("UqlChip",{attrs:{uql:e.uql,column:"span.event_error_count",op:">",value:"0",tooltip:"Filter spans with errors"},on:{click:function(t){e.menu=!1}}})],1)],1),a("v-divider",{staticClass:"my-6"}),a("v-row",[a("v-col",{staticClass:"grey--text text--darken-3"},[e._v("For example, "),a("strong",[e._v("where span.duration > 100ms")]),e._v(".")])],1),a("v-row",{staticClass:"mb-n3"},[a("v-col",{staticClass:"pt-4 pr-2",attrs:{cols:"auto"}},[a("v-avatar",{attrs:{color:"grey",size:"30"}},[a("span",{staticClass:"white--text text-h6"},[e._v("1")])])],1),a("v-col",[a("SimpleSuggestions",{staticClass:"fit",attrs:{loading:e.columnSuggestions.loading,suggestions:e.columnSuggestions,rules:e.rules.column,label:"Column",dense:""},model:{value:e.column,callback:function(t){e.column=t},expression:"column"}})],1)],1),a("v-row",{staticClass:"mb-n3"},[a("v-col",{staticClass:"pt-4 pr-2",attrs:{cols:"auto"}},[a("v-avatar",{attrs:{color:"grey",size:"30"}},[a("span",{staticClass:"white--text text-h6"},[e._v("2")])])],1),a("v-col",[a("v-autocomplete",{staticClass:"fit",staticStyle:{width:"200px"},attrs:{rules:e.rules.op,label:"Operator",items:e.opItems,outlined:"",dense:"",clearable:"","hide-details":"auto"},model:{value:e.op,callback:function(t){e.op=t},expression:"op"}})],1)],1),a("v-row",[a("v-col",{staticClass:"pt-4 pr-2",attrs:{cols:"auto"}},[a("v-avatar",{attrs:{color:"grey",size:"30"}},[a("span",{staticClass:"white--text text-h6"},[e._v("3")])])],1),a("v-col",[a("SimpleSuggestions",{staticClass:"fit",attrs:{loading:e.valueSuggestions.loading,suggestions:e.valueSuggestions,rules:e.rules.colValue,label:"Value",placeholder:e.valuePlaceholder,hint:e.valueHint,disabled:e.valueDisabled,dense:""},model:{value:e.colValue,callback:function(t){e.colValue=t},expression:"colValue"}})],1)],1),a("v-row",[a("v-spacer"),a("v-col",{attrs:{cols:"auto"}},[a("v-btn",{staticClass:"primary",attrs:{disabled:!e.isValid},on:{click:e.addFilter}},[e._v("Filter")])],1)],1)],1)],1),e.lcAttrs.length?[a("v-col",{attrs:{cols:"auto"}},[a("v-divider",{attrs:{vertical:""}})],1),a("v-col",{staticClass:"pa-4",attrs:{cols:"auto"}},e._l(e.lcAttrs,(function(t){return a("div",{key:t},[a("AttrFilterMenu",{attrs:{uql:e.uql,"axios-params":e.axiosParams,"attr-key":t,label:t},on:{change:function(t){e.menu=!1}}})],1)})),0)]:e._e()],2)],1)],1)},ho=[],go=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-combobox",e._b({staticClass:"pt-0",attrs:{value:e.value,"persistent-hint":"",loading:e.loading,items:e.suggestions.filteredItems,"search-input":e.suggestions.searchInput,"return-object":"","no-filter":"","auto-select-first":"",clearable:"",outlined:"","hide-details":"auto"},on:{"update:searchInput":function(t){return e.$set(e.suggestions,"searchInput",t)},"update:search-input":function(t){return e.$set(e.suggestions,"searchInput",t)},input:e.onInput},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[a("v-list-item-content",[a("v-list-item-title",[e._v(e._s(e.truncate(n.text,{length:60})))])],1),n.hint?a("v-list-item-action",[a("v-list-item-action-text",[e._v(e._s(n.hint))])],1):e._e()]}}])},"v-combobox",e.$attrs,!1))},yo=[],Oo=Object(r["defineComponent"])({name:"SimpleSuggestions",props:{loading:{type:Boolean,default:!1},value:{type:Object,default:void 0},suggestions:{type:Object,required:!0}},setup:function(e,t){var a=t.emit;function n(e){"string"===typeof e&&(e={text:e}),a("input",e)}return{onInput:n,truncate:u["truncate"]}}}),xo=Oo,jo=a("0c1c"),_o=Object(h["a"])(xo,go,yo,!1,null,"a5dbcd36",null),Co=_o.exports;y()(_o,{VCombobox:jo["a"],VListItemAction:vo["a"],VListItemActionText:Le["a"],VListItemContent:Le["b"],VListItemTitle:Le["c"]});var wo=function(e){return e&&0!=e.length||"Field is required"};var ko={contains:"contains",doesNotContain:"does not contain",like:"like",notLike:"not like",exists:"exists",doesNotExist:"does not exist"},So=Object(r["defineComponent"])({name:"WhereFilterMenu",components:{AttrFilterMenu:fo,SimpleSuggestions:Co,UqlChip:Sr},props:{systems:{type:Object,required:!0},uql:{type:Object,required:!0},axiosParams:{type:Object,required:!0}},setup:function(e){var t=l(),a=t.route,n=Object(r["shallowRef"])(!1),o=Object(r["shallowRef"])(),s=Object(r["shallowRef"])(""),i=Object(r["shallowRef"])(),u=Object(r["shallowRef"])(),c=Object(r["shallowRef"])(!1),d={column:[wo],op:[wo],colValue:[]},p=ao((function(){if(!n.value)return null;var t=a.value.params.projectId;return{url:"/api/tracing/".concat(t,"/suggestions/attributes"),params:e.axiosParams}}),{suggestSearchInput:!0}),v=Object(r["computed"])((function(){var e=[Gt.serviceName,Gt.hostName,Gt.codeFilepath,Gt.codeFunction,Gt.rpcMethod,Gt.httpMethod,Gt.httpStatusCode];return p.items.filter((function(t){return e.indexOf(t.text)>=0})).map((function(e){return e.text})).sort((function(t,a){return e.indexOf(t)-e.indexOf(a)}))})),m=Object(r["computed"])((function(){return["=","!=","<","<=",">",">=",ko.contains,ko.doesNotContain,ko.like,ko.notLike,ko.exists,ko.doesNotExist]})),f=ao((function(){if(n.value&&o.value&&o.value.text){var t=a.value.params.projectId;return{url:"/api/tracing/".concat(t,"/suggestions/values"),params:Object(L["a"])(Object(L["a"])({},e.axiosParams),{},{column:o.value.text})}}}),{suggestSearchInput:!0}),b=Object(r["computed"])((function(){switch(s.value){case ko.like:case ko.notLike:return"%substring% or %suffix or prefix%";case ko.contains:case ko.doesNotContain:return"substr1|substr2|substr3";default:return""}})),h=Object(r["computed"])((function(){switch(s.value){case ko.like:case ko.notLike:return'"%" matches zero or more characters';case ko.contains:case ko.doesNotContain:return'Case-insensitive options separated with "|"';default:return""}})),g=Object(r["computed"])((function(){switch(s.value){case ko.exists:case ko.doesNotExist:return!0;default:return!1}}));function y(){setTimeout((function(){if(o.value&&s.value){var t=e.uql.createEditor();if(g.value)t.add("where ".concat(o.value.text," ").concat(s.value));else{var a,r,c=null!==(a=null===(r=i.value)||void 0===r?void 0:r.text)&&void 0!==a?a:"";t.add("where ".concat(o.value.text," ").concat(s.value," ").concat(Na(c)))}e.uql.commitEdits(t),o.value=void 0,s.value="",i.value=void 0,u.value.resetValidation(),n.value=!1}}),10)}return Object(r["watch"])(g,(function(e){e&&(i.value=void 0)})),{xkey:Gt,menu:n,lcAttrs:v,form:u,isValid:c,rules:d,columnSuggestions:p,opItems:m,valueSuggestions:f,valuePlaceholder:b,valueHint:h,valueDisabled:g,column:o,op:s,colValue:i,addFilter:y}}}),Po=So,Vo=(a("0614"),a("407f")),qo=a("e2bd"),To=a("6d62"),Ro=Object(h["a"])(Po,bo,ho,!1,null,"4f3aab5c",null),Io=Ro.exports;y()(Ro,{VAutocomplete:Vo["a"],VAvatar:qo["a"],VBtn:Ge["a"],VCard:Xe["a"],VCol:$t["a"],VDivider:To["a"],VForm:Ur["a"],VIcon:Qe["a"],VMenu:rt["a"],VRow:Bt["a"],VSpacer:We["a"]});var Eo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("v-btn",e._g(e._b({staticClass:"v-btn--filter",attrs:{text:""}},"v-btn",r,!1),n),[a("span",[e._v("Agg")]),a("v-icon",{staticClass:"ml-0",attrs:{right:""}},[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("v-form",{ref:"form",on:{submit:function(t){return t.preventDefault(),e.addFilter.apply(null,arguments)}},model:{value:e.isValid,callback:function(t){e.isValid=t},expression:"isValid"}},[a("v-card",{attrs:{width:"400px"}},[a("v-card-text",{staticClass:"py-6 text-body-2"},[a("v-row",[a("v-col",{staticClass:"no-transform space-around"},e._l(e.aggColumns,(function(t){return a("UqlChip",{key:t.name,attrs:{uql:e.uql,column:t.name,tooltip:t.tooltip},on:{click:function(t){e.menu=!1}}})})),1)],1),a("div",{staticClass:"mt-3 mb-4 d-flex align-center"},[a("v-divider"),a("div",{staticClass:"mx-2 grey--text text--lighten-1"},[e._v("or")]),a("v-divider")],1),a("v-row",{staticClass:"mb-n1"},[a("v-col",[e._v(" Select a function and then a column: "),a("strong",[e._v("func(column)")]),e._v(". ")])],1),a("v-row",{staticClass:"mb-n6",attrs:{dense:""}},[a("v-col",{attrs:{cols:5}},[a("v-autocomplete",{staticClass:"fit",attrs:{rules:e.rules.func,label:"Function",items:e.funcItems,"return-object":"",outlined:"",dense:""},model:{value:e.func,callback:function(t){e.func=t},expression:"func"}})],1),a("v-col",{attrs:{cols:7}},[a("SimpleSuggestions",{staticClass:"fit",attrs:{loading:e.suggestions.loading,suggestions:e.suggestions,label:"Column",rules:e.rules.column,disabled:!e.func||e.func.isColumn,dense:""},model:{value:e.column,callback:function(t){e.column=t},expression:"column"}})],1)],1),a("v-row",[a("v-spacer"),a("v-col",{attrs:{cols:"auto"}},[a("v-btn",{staticClass:"primary",attrs:{type:"submit",disabled:!e.isValid}},[e._v("Add column")])],1)],1)],1)],1)],1)],1)},Mo=[],Do=["any","top3","top10","avg","uniq","p50","p75","p90","p95","p99","min","max","sum"],Lo=[{name:Gt.spanCount,tooltip:"Number of spans in a group"},{name:Gt.spanCountPerMin,tooltip:"Number of spans per minute in a group"},{name:Gt.spanErrorCount,tooltip:'Number of spans with span.status_code = "error"'},{name:Gt.spanErrorPct,tooltip:'Percent of spans with span.status_code = "error"'},{name:"p75(".concat(Gt.spanDuration,")"),tooltip:"75th percentile of span.duration"},{name:"max(".concat(Gt.spanDuration,")"),tooltip:"Max span.duration"},{name:"uniq(".concat(Gt.enduserId,")"),tooltip:"Number of distinct enduser.id"}],No=Object(r["defineComponent"])({name:"AggFilterMenu",components:{SimpleSuggestions:Co,UqlChip:Sr},props:{uql:{type:Object,required:!0},axiosParams:{type:Object,required:!0}},setup:function(e){var t=l(),a=t.route,n=Object(r["shallowRef"])(!1),o=Object(r["shallowRef"])(),s=Object(r["shallowRef"])(),u=Object(r["shallowRef"])(),c=Object(r["shallowRef"])(!1),d={func:[wo],column:[b]},p=ao((function(){var t;if(!n.value)return null;var r=a.value.params.projectId;return{url:"/api/tracing/".concat(r,"/suggestions/attributes"),params:Object(L["a"])(Object(L["a"])({},e.axiosParams),{},{func:null===(t=o.value)||void 0===t?void 0:t.value})}}),{suggestSearchInput:!0}),v=Object(r["computed"])((function(){var e,t=[],a=Object(i["a"])(Do);try{for(a.s();!(e=a.n()).done;){var n=e.value;t.push({value:n,text:n+"(...)"})}}catch(r){a.e(r)}finally{a.f()}return t}));function m(){if(o.value&&s.value){var e="".concat(o.value.value,"(").concat(s.value.text,")");f(e),o.value=void 0,s.value=void 0,u.value.resetValidation()}}function f(t){var a=e.uql.createEditor();a.add(t),e.uql.commitEdits(a),n.value=!1}function b(e){var t=Boolean(o.value&&e);return t||"Column is required"}return{menu:n,form:u,isValid:c,rules:d,suggestions:p,aggColumns:Lo,func:o,funcItems:v,column:s,addFilter:m,aggBy:f}}}),$o=No,Bo=(a("1744"),Object(h["a"])($o,Eo,Mo,!1,null,"7b2d6b85",null)),Ao=Bo.exports;y()(Bo,{VAutocomplete:Vo["a"],VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VDivider:To["a"],VForm:Ur["a"],VIcon:Qe["a"],VMenu:rt["a"],VRow:Bt["a"],VSpacer:We["a"]});var Fo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-menu",{attrs:{"offset-y":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function(t){var n=t.on,r=t.attrs;return[a("v-btn",e._g(e._b({staticClass:"v-btn--filter",attrs:{text:"",disabled:e.disabled}},"v-btn",r,!1),n),[a("span",[e._v("Group by")]),a("v-icon",{staticClass:"ml-0",attrs:{right:""}},[e._v("mdi-menu-down")])],1)]}}]),model:{value:e.menu,callback:function(t){e.menu=t},expression:"menu"}},[a("v-form",{ref:"form",on:{submit:function(t){return t.preventDefault(),e.addFilter.apply(null,arguments)}},model:{value:e.isValid,callback:function(t){e.isValid=t},expression:"isValid"}},[a("v-card",{attrs:{width:"400px"}},[a("v-card-text",{staticClass:"py-6"},[a("v-row",[a("v-col",{staticClass:"space-around no-transform"},e._l(e.groupColumns,(function(t){return a("UqlChip",{key:t,attrs:{uql:e.uql,group:t},on:{click:function(t){e.menu=!1}}})})),1)],1),a("div",{staticClass:"mt-2 mb-3 d-flex align-center"},[a("v-divider"),a("div",{staticClass:"mx-2 grey--text text--lighten-1"},[e._v("or")]),a("v-divider")],1),a("v-row",{staticClass:"mb-n1"},[a("v-col",[e._v("Select a grouping column.")])],1),a("v-row",{attrs:{dense:""}},[a("v-col",[a("SimpleSuggestions",{staticClass:"fit",attrs:{loading:e.suggestions.loading,suggestions:e.suggestions,rules:e.rules.column,label:"Column",dense:""},model:{value:e.column,callback:function(t){e.column=t},expression:"column"}})],1)],1),a("v-row",[a("v-spacer"),a("v-col",{attrs:{cols:"auto"}},[a("v-btn",{staticClass:"primary",attrs:{type:"submit",disabled:!e.isValid}},[e._v("Group by")])],1)],1)],1)],1)],1)],1)},Go=[],Xo=[Gt.spanGroupId,Gt.serviceName,Gt.hostName,Gt.dbOperation],Uo=Object(r["defineComponent"])({name:"GroupByMenu",components:{SimpleSuggestions:Co,UqlChip:Sr},props:{uql:{type:Object,required:!0},axiosParams:{type:Object,required:!0},disabled:{type:Boolean,default:!1}},setup:function(e){var t=l(),a=t.route,n=Object(r["shallowRef"])(!1),o=Object(r["shallowRef"])(),s=Object(r["shallowRef"])(),i=Object(r["shallowRef"])(!1),u={column:[wo]},c=ao((function(){if(!n.value)return null;var t=a.value.params.projectId;return{url:"/api/tracing/".concat(t,"/suggestions/attributes"),params:e.axiosParams}}),{suggestSearchInput:!0});function d(){o.value&&(p(o.value.text),o.value=void 0,s.value.resetValidation())}function p(t){var a=e.uql.createEditor();a.replaceGroupBy(t),e.uql.commitEdits(a),n.value=!1}return{menu:n,form:s,isValid:i,rules:u,suggestions:c,groupColumns:Xo,column:o,addFilter:d}}}),Ho=Uo,Qo=(a("0a67"),Object(h["a"])(Ho,Fo,Go,!1,null,"2c0927e0",null)),Wo=Qo.exports;y()(Qo,{VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VDivider:To["a"],VForm:Ur["a"],VIcon:Qe["a"],VMenu:rt["a"],VRow:Bt["a"],VSpacer:We["a"]});var zo=Object(r["defineComponent"])({name:"SpanFilters",components:{SearchFilterMenu:Qr,DurationFilterMenu:Yr,AttrFilterMenu:fo,WhereFilterMenu:Io,AggFilterMenu:Ao,GroupByMenu:Wo},props:{uql:{type:Object,required:!0},systems:{type:Object,required:!0},axiosParams:{type:Object,required:!0}},setup:function(e){function t(){var t=e.uql.createEditor();t.reset(),e.uql.commitEdits(t)}return{xkey:Gt,reset:t}}}),Ko=zo,Jo=(a("ce7b"),Object(h["a"])(Ko,$r,Br,!1,null,"c58aae96",null)),Zo=Jo.exports;y()(Jo,{VBtn:Ge["a"],VDivider:To["a"]});var Yo=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("XPlaceholder",{scopedSlots:e._u(["invalid_query"===e.explore.errorCode?{key:"placeholder",fn:function(){return[a("v-row",[a("v-col",[a("v-banner",[a("v-icon",{attrs:{slot:"icon",color:"error",size:"36"},slot:"icon"},[e._v("mdi-alert-circle")]),a("span",{staticClass:"subtitle-1 text--secondary"},[e._v(e._s(e.explore.errorMessage))])],1),e.explore.query?a("XCode",{attrs:{code:e.explore.query,language:"sql"}}):e._e()],1)],1)]},proxy:!0}:null],null,!0)},[a("v-row",[a("v-col",[a("v-card",{staticClass:"mb-4",attrs:{rounded:"lg",outlined:""}},[a("v-toolbar",{attrs:{flat:"",color:"light-blue lighten-5"}},[a("v-toolbar-title",[a("span",[e._v("Groups")])]),a("v-spacer"),a("div",{staticClass:"text-body-2 blue-grey--text text--darken-3"},[a("strong",[a("XNum",{attrs:{value:e.explore.pager.numItem,verbose:""}})],1),e._v(" groups ")])],1),a("v-card-text",[a("v-slide-group",{staticClass:"mb-4",attrs:{multiple:"","center-active":"","show-arrows":""},model:{value:e.activeColumns,callback:function(t){e.activeColumns=t},expression:"activeColumns"}},e._l(e.explore.plotColumns,(function(t,n){return a("v-slide-item",{key:t.name,attrs:{value:t.name},scopedSlots:e._u([{key:"default",fn:function(r){var o=r.active,s=r.toggle;return[a("v-btn",{class:{"ml-1":n>0},staticStyle:{"text-transform":"none"},attrs:{"input-value":o,"active-class":"blue white--text",small:"",depressed:"",rounded:""},on:{click:s}},[e._v(" "+e._s(t.name)+" ")])]}}],null,!0)})})),1),a("GroupTable",{attrs:{"date-range":e.dateRange,systems:e.systems,uql:e.uql,loading:e.explore.loading,items:e.explore.pageItems,columns:e.explore.columns,"group-columns":e.explore.groupColumns,"plot-columns":e.activeColumns,order:e.explore.order,"axios-params":e.axiosParams}})],1)],1),a("XPagination",{attrs:{pager:e.explore.pager}})],1)],1)],1)},es=[],ts=a("b1cb");function as(e){var t,a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Qa(null!==(t=n.pager)&&void 0!==t?t:{perPage:10}),s=Wa(null!==(a=n.order)&&void 0!==a?a:{column:Gt.spanCountPerMin,desc:!0}),i=xe((function(){return e()}),{ignoreErrors:!0}),c=i.loading,l=i.error,d=i.data,p=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=d.value)||void 0===t?void 0:t.groups)&&void 0!==e?e:[]})),v=Object(r["computed"])((function(){if(!s.column)return p.value;var e=ns(s.column);return Object(u["orderBy"])(p.value,(function(t){var a=t[s.column];return e?new Date(a):a}),s.desc?"desc":"asc")})),m=Object(r["computed"])((function(){var e=v.value.slice(o.pos.start,o.pos.end);return e})),f=Object(r["computed"])((function(){var e;return null===(e=d.value)||void 0===e?void 0:e.queryParts})),b=Object(r["computed"])((function(){var e,t,a=null!==(e=null===(t=d.value)||void 0===t?void 0:t.columns)&&void 0!==e?e:[];return a})),h=Object(r["computed"])((function(){return b.value.filter((function(e){return e.isGroup}))})),g=Object(r["computed"])((function(){return b.value.filter((function(e){return e.isNum}))})),y=Object(r["computed"])((function(){var e,t,a,n;return null!==(e=null===(t=l.value)||void 0===t||null===(a=t.response)||void 0===a||null===(n=a.data)||void 0===n?void 0:n.message)&&void 0!==e?e:""})),O=Object(r["computed"])((function(){var e,t,a,n;return null!==(e=null===(t=l.value)||void 0===t||null===(a=t.response)||void 0===a||null===(n=a.data)||void 0===n?void 0:n.code)&&void 0!==e?e:""})),x=Object(r["computed"])((function(){var e,t,a,n;return Object(ts["format"])(null!==(e=null===(t=l.value)||void 0===t||null===(a=t.response)||void 0===a||null===(n=a.data)||void 0===n?void 0:n.query)&&void 0!==e?e:"")}));return Object(r["watch"])(p,(function(e){o.numItem=e.length}),{immediate:!0,flush:"pre"}),Object(r["proxyRefs"])({pager:o,order:s,loading:c,items:v,pageItems:m,queryParts:f,columns:b,groupColumns:h,plotColumns:g,error:l,errorCode:O,errorMessage:y,query:x})}function ns(e){return e===Gt.spanTime||rs(e,"time")||rs(e,"date")}function rs(e,t){return e.endsWith("."+t)||e.endsWith("_"+t)}var os=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-simple-table",{staticClass:"v-data-table--narrow",attrs:{dense:e.dense}},[a("colgroup",[e.hasGroupName?a("col",{staticClass:"target"}):e._e(),e.showSystemColumn?a("col"):e._e(),e._l(e.customColumns,(function(e){return a("col",{key:e.name})})),a("col")],2),e.items.length?a("thead",{staticClass:"v-data-table-header"},[a("tr",[e.hasGroupName?a("th",{staticClass:"target text-no-wrap"},[a("span",[e._v("Group Name")])]):e._e(),e.showSystemColumn?a("ThOrder",{attrs:{value:e.xkey.spanSystem,order:e.order}},[e._v("System")]):e._e(),e._l(e.customColumns,(function(t){return a("ThOrder",{key:t.name,attrs:{value:t.name,order:e.order,align:t.isNum?"center":"start"}},[a("span",[e._v(e._s(e.columnHeader(t)))])])})),e.hasTimeColumn?a("ThOrder",{attrs:{value:"max("+e.xkey.spanTime+")",order:e.order}},[e._v(" Time ")]):e._e(),a("th")],2)]):e._e(),a("thead",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}]},[a("tr",{staticClass:"v-data-table__progress"},[a("th",{staticClass:"column",attrs:{colspan:"99"}},[a("v-progress-linear",{attrs:{height:"2",absolute:"",indeterminate:""}})],1)])]),e.items.length?e._e():a("tbody",[a("tr",{staticClass:"v-data-table__empty-wrapper"},[a("td",{attrs:{colspan:"99"}},[e._v("There are no matching groups.")])])]),a("tbody",[e._l(e.items,(function(t){return[a("tr",{key:t[e.xkey.itemId],staticClass:"cursor-pointer",on:{click:function(a){return e.groupViewer.toggle(t[e.xkey.itemId])}}},[e.hasGroupName?a("td",{staticClass:"target"},[a("span",[e._v(e._s(e.itemName(t)))])]):e._e(),e.showSystemColumn?a("td",[a("router-link",{attrs:{to:e.systemRoute(t)},nativeOn:{click:function(e){e.stopPropagation()}}},[e._v(e._s(t[e.xkey.spanSystem]))])],1):e._e(),e._l(e.customColumns,(function(n){return a("td",{key:n.name},[n.isNum?a("div",{staticClass:"d-flex align-center justify-center"},[e.plotColumns.indexOf(n.name)>=0?a("LoadGroupSparkline",{staticClass:"mr-2",attrs:{"axios-params":e.axiosParams,where:e.groupBasedWhere(t),column:n.name}}):e._e(),a("XNum",{attrs:{value:t[n.name],name:n.name}})],1):a("span",[e._v(e._s(t[n.name]))])])})),e.hasTimeColumn?a("td",{staticClass:"text-no-wrap"},[e._t("time",(function(){return[a("XDate",{attrs:{date:t["max("+e.xkey.spanTime+")"],format:"relative"}})]}),{item:t})],2):e._e(),a("td",{staticClass:"text-center text-no-wrap"},[a("v-btn",{attrs:{icon:"",title:"Focus on this group",to:e.spanListRoute(t),exact:""},nativeOn:{click:function(e){e.stopPropagation()}}},[a("v-icon",[e._v("mdi-filter-variant")])],1),e.groupViewer.visible(t[e.xkey.itemId])?a("v-btn",{attrs:{icon:"",title:"Hide spans"},on:{click:function(a){return a.stopPropagation(),e.groupViewer.hide(t[e.xkey.itemId])}}},[a("v-icon",{attrs:{size:"30"}},[e._v("mdi-chevron-up")])],1):a("v-btn",{attrs:{icon:"",title:"View spans"},on:{click:function(a){return a.stopPropagation(),e.groupViewer.show(t[e.xkey.itemId])}}},[a("v-icon",{attrs:{size:"30"}},[e._v("mdi-chevron-down")])],1)],1)],2),e.groupViewer.visible(t[e.xkey.itemId])?a("tr",{key:t[e.xkey.itemId]+"-spans",staticClass:"v-data-table__expanded v-data-table__expanded__content"},[a("td",{staticClass:"px-6 pt-3 pb-4",attrs:{colspan:"99"}},[a("SpanListInline",{attrs:{"date-range":e.dateRange,systems:e.systems,uql:e.uql,"axios-params":e.axiosParams,where:e.groupBasedWhere(t)}})],1)]):e._e()]}))],2)])],1)},ss=[],is=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("SparklineChart",{attrs:{name:e.column,line:e.line,time:e.time}})},us=[],cs=Object(r["defineComponent"])({name:"LoadGroupSparkline",components:{SparklineChart:Pn},props:{axiosParams:{type:Object,required:!0},where:{type:String,required:!0},column:{type:String,required:!0}},setup:function(e){var t=l(),a=t.route,n=xe((function(){var t=a.value.params.projectId,n=e.where+" | "+e.axiosParams.query;return{url:"/api/tracing/".concat(t,"/stats"),params:Object(L["a"])(Object(L["a"])({},e.axiosParams),{},{query:n,column:e.column})}})),o=n.data,s=Object(r["computed"])((function(){var t;return o.value&&null!==(t=o.value[e.column])&&void 0!==t?t:[]})),i=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=o.value)||void 0===t?void 0:t.time)&&void 0!==e?e:[]}));return{line:s,time:i}}}),ls=cs,ds=Object(h["a"])(ls,is,us,!1,null,null,null),ps=ds.exports,vs=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("SpanTable",e._g({staticClass:"mb-4",attrs:{"date-range":e.dateRange,loading:e.spans.loading,spans:e.spans.items,order:e.spans.order,pager:e.spans.pager}},e.listeners)),a("XPagination",{attrs:{pager:e.spans.pager}})],1)},ms=[];function fs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Qa(t.pager),n=Wa(t.order),o=xe((function(){var t=e();return t?(t.params=Object(L["a"])(Object(L["a"])(Object(L["a"])({},t.params),n.axiosParams),a.axiosParams()),t):t})),s=o.loading,i=o.data,u=Object(r["computed"])((function(){var e,t,a=null!==(e=null===(t=i.value)||void 0===t?void 0:t.spans)&&void 0!==e?e:[];return a})),c=Object(r["computed"])((function(){var e;return null===(e=i.value)||void 0===e?void 0:e.queryParts}));return Object(r["watch"])(i,(function(e){var t;a.numItem=null!==(t=null===e||void 0===e?void 0:e.count)&&void 0!==t?t:0}),{immediate:!0,flush:"sync"}),Object(r["proxyRefs"])({pager:a,order:n,loading:s,items:u,queryParts:c})}var bs=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-simple-table",[a("thead",{staticClass:"v-data-table-header"},[a("tr",[a("th",[e._v("Span Name")]),a("th"),e._l(e.columns,(function(t){return a("ThOrder",{key:t,attrs:{value:t,order:e.order}},[a("span",[e._v(e._s(t))])])})),a("ThOrder",{attrs:{value:"span.time",order:e.order}},[e._v("Time")]),a("ThOrder",{attrs:{value:"span.duration",order:e.order,align:"end"}},[a("span",[e._v("Dur.")])])],2)]),e.loading?a("thead",[a("tr",{staticClass:"v-data-table__progress"},[a("th",{staticClass:"column",attrs:{colspan:"99"}},[a("v-progress-linear",{attrs:{height:"2",absolute:"",indeterminate:""}})],1)])]):e._e(),e.spans.length?e._e():a("tbody",[a("tr",{staticClass:"v-data-table__empty-wrapper"},[a("td",{attrs:{colspan:"99"}},[e._v("There are no spans for the selected date range and filters.")])])]),a("tbody",[e._l(e.spans,(function(t){return[a("tr",{key:"a-"+t.id,staticClass:"cursor-pointer",on:{click:function(a){return e.dialog.showSpan(t)}}},[a("td",[a("span",[e._v(e._s(e.eventOrSpanName(t)))])]),a("td",[a("SpanChips",{attrs:{span:t,clickable:"click:chip"in e.$listeners},on:{"click:chip":function(t){return e.$emit("click:chip",t)}}})],1),a("td",[a("XDate",{attrs:{date:t.time,format:"relative"}})],1),a("td",{staticClass:"text-right"},[a("XDuration",{attrs:{duration:t.duration,fixed:""}})],1)])]}))],2)]),a("v-dialog",{attrs:{"max-width":"1280"},model:{value:e.dialog.dialog,callback:function(t){e.$set(e.dialog,"dialog",t)},expression:"dialog.dialog"}},[a("v-sheet",[e.dialog.activeSpan?a("SpanCard",{key:e.dialog.activeSpan[e.xkey.spanId],attrs:{"date-range":e.dateRange,span:e.dialog.activeSpan,fluid:"","show-toolbar":""}}):e._e()],1)],1)],1)},hs=[],gs=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("PageToolbar",{attrs:{fluid:e.fluid}},[e.meta.external?a("v-icon",{staticClass:"mr-2"},[e._v("mdi-link-variant")]):e._e(),a("v-breadcrumbs",{attrs:{items:e.meta.breadcrumbs,divider:">",large:""},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[a("v-breadcrumbs-item",{attrs:{to:n.to,exact:n.exact}},[e._v(" "+e._s(n.text)+" ")])]}}])})],1),a("v-container",{staticClass:"py-4",attrs:{fluid:e.fluid}},[a("v-row",{staticClass:"px-4 text-subtitle-1"},[a("v-col",[e.span.eventName?[a("span",[e._v(e._s(e.span.eventName))]),e.span.name?[a("span",{staticClass:"mx-2"},[e._v(" • ")]),a("span",[e._v(e._s(e.spanName(e.span,1e3)))])]:e._e()]:a("span",[e._v(e._s(e.spanName(e.span,1e3)))])],2)],1),a("v-row",{staticClass:"px-4 text-subtitle-2 text-center",attrs:{align:"end"}},[e.span.kind?a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Kind")]),a("div",[e._v(e._s(e.span.kind))])]):e._e(),e.span.statusCode?a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Status")]),a("div",{class:{"error--text":"error"===e.span.statusCode}},[e._v(" "+e._s(e.span.statusCode)+" ")])]):e._e(),a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Time")]),e.span.time?a("XDate",{attrs:{date:e.span.time,format:"full"}}):e._e()],1),a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Duration")]),a("XDuration",{attrs:{duration:e.span.duration,fixed:""}})],1),a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"mb-0"},[e.meta.traceRoute?a("v-btn",{attrs:{depressed:"",small:"",to:e.meta.traceRoute,exact:""}},[e._v(" View trace ")]):e._e(),"GroupList"!==e.$route.name?a("v-btn",{staticClass:"ml-2",attrs:{depressed:"",small:"",to:e.meta.groupRoute,exact:""}},[e._v(" View group ")]):e._e()],1)])],1),a("v-row",[a("v-col",[a("v-sheet",{attrs:{outlined:"",rounded:"lg"}},[a("v-tabs",{staticClass:"light-blue lighten-5",attrs:{"background-color":"transparent"},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab",{attrs:{href:"#attrs"}},[e._v("Attrs")]),e.dbStatement?a("v-tab",{attrs:{href:"#dbStatement"}},[e._v("SQL")]):e._e(),e.dbStatementPretty?a("v-tab",{attrs:{href:"#dbStatementPretty"}},[e._v("SQL pretty")]):e._e(),e.excStacktrace?a("v-tab",{attrs:{href:"#excStacktrace"}},[e._v("Stacktrace")]):e._e(),e.span.events&&e.span.events.length?a("v-tab",{attrs:{href:"#events"}},[e._v(" Events ("+e._s(e.span.events.length)+") ")]):e._e(),e.span.groupId?a("v-tab",{attrs:{href:"#pctile"}},[e._v("Percentiles")]):e._e()],1),a("v-tabs-items",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[a("v-tab-item",{staticClass:"pa-4",attrs:{value:"attrs"}},[a("AttrTable",{attrs:{"date-range":e.dateRange,attrs:e.span.attrs}})],1),a("v-tab-item",{attrs:{value:"dbStatement"}},[a("XCode",{attrs:{code:e.dbStatement,language:"sql"}})],1),a("v-tab-item",{attrs:{value:"dbStatementPretty"}},[a("XCode",{attrs:{code:e.dbStatementPretty,language:"sql"}})],1),a("v-tab-item",{attrs:{value:"excStacktrace"}},[a("XCode",{attrs:{code:e.excStacktrace}})],1),a("v-tab-item",{attrs:{value:"events"}},[a("EventPanels",{attrs:{"date-range":e.dateRange,events:e.span.events}})],1),a("v-tab-item",{staticClass:"pa-4",attrs:{value:"pctile"}},[a("LoadPctileChart",{attrs:{"axios-params":e.axiosParams}})],1)],1)],1)],1)],1)],1)],1)},ys=[],Os=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("PctileChart",e._b({attrs:{loading:e.percentiles.loading,data:e.percentiles.data}},"PctileChart",e.$attrs,!1))},xs=[];function js(e){var t=xe(e),a=t.loading,n=t.data,o=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.count)&&void 0!==e?e:0})),s=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.rate)&&void 0!==e?e:0})),i=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.errorCount)&&void 0!==e?e:0})),u=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.p50)&&void 0!==e?e:0})),c=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.p90)&&void 0!==e?e:0})),l=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.max)&&void 0!==e?e:0}));return Object(r["proxyRefs"])({loading:a,data:n,count:o,rate:s,errorCount:i,p50:u,p90:c,max:l})}var _s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",e._l(e.charts,(function(t){return a("EChart",{key:t.name,attrs:{loading:e.loading,height:t.height,option:t.option,group:e.chartGroup}})})),1)},Cs=[],ws={count:Qt["a"].blue.base,rate:Qt["a"].blue.base,errorCount:Qt["a"].red.darken1,errorPct:Qt["a"].red.darken3,p50:Qt["a"].green.lighten2,p90:Qt["a"].amber.darken1,p99:Qt["a"].amber.darken3},ks=Object(r["defineComponent"])({name:"PctileChart",components:{EChart:On},props:{loading:{type:Boolean,default:!1},data:{type:Object,default:void 0}},setup:function(e){var t=Object(r["computed"])((function(){var t=[];return e.data&&e.data.p50?(t.push(Ss(e.data)),t.push(Ps(e.data))):t.push(qs(e.data)),t}));return{charts:t,chartGroup:Symbol()}}});function Ss(e){var t=xn();jn(t,{formatter:_n(Oa)}),t.xAxis.push({type:"time",axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},axisPointer:{label:{show:!1}}}),t.yAxis.push({type:"value",axisLabel:{formatter:Oa},axisPointer:{label:{formatter:function(e){return Oa(e.value)}}},splitNumber:4,splitLine:{show:!1}}),t.dataset.push({source:e});for(var a=[{name:"p50",color:ws.p50},{name:"p90",color:ws.p90},{name:"p99",color:ws.p99}],n=0,r=a;n<r.length;n++){var o=r[n];e[o.name]&&t.series.push({name:o.name,type:"line",symbol:"none",itemStyle:{color:o.color},areaStyle:{color:new cn["a"].LinearGradient(0,0,0,1,[{offset:0,color:o.color},{offset:1,color:"#ffe"}])},encode:{x:"time",y:o.name}})}return t.legend.push({type:"scroll",width:"90%",data:["p50","p90","p99"],selected:{p50:!0,p90:!0,p99:!1}}),t.grid.push({top:30,left:45,right:30,height:65}),{name:"pctile",height:100,option:t}}function Ps(e){var t=xn();return jn(t,{formatter:_n((function(e){return String(e)}))}),t.xAxis.push({type:"time",axisPointer:{label:{formatter:function(e){return te(e.value)}}},splitNumber:5}),t.yAxis.push({type:"value",axisLabel:{},axisPointer:{label:{}},splitNumber:4,splitLine:{show:!1}}),e&&(t.dataset.push({source:{time:e.time,rate:e.rate}}),t.series.push({datasetIndex:t.dataset.length-1,name:"count per min",type:"line",symbol:"none",itemStyle:{color:ws.count},areaStyle:{color:new cn["a"].LinearGradient(0,0,0,1,[{offset:0,color:ws.count},{offset:1,color:"#ffe"}])},encode:{x:"time",y:"rate"}}),Vs(t,e)),t.grid.push({top:15,left:45,right:30,height:60}),{name:"rate",height:100,option:t}}function Vs(e,t){e.dataset.push({source:{time:t.time,errorRate:t.errorRate}}),e.series.push({datasetIndex:e.dataset.length-1,name:"errors per min",type:"line",symbol:"none",itemStyle:{color:ws.errorCount},encode:{x:"time",y:"errorRate"}})}function qs(e){var t=xn();return jn(t),t.xAxis.push({type:"time",axisPointer:{label:{formatter:function(e){return te(e.value)}}},splitNumber:5}),t.yAxis.push({type:"value",splitNumber:4,splitLine:{show:!1}}),e&&(t.dataset.push({source:{time:e.time,rate:e.rate}}),t.series.push({name:"events per min",type:"bar",itemStyle:{color:ws.count},encode:{x:"time",y:"rate"}})),t.grid.push({top:15,left:45,right:30,height:120}),{name:"rate",height:160,option:t}}var Ts=ks,Rs=Object(h["a"])(Ts,_s,Cs,!1,null,"495c4c38",null),Is=Rs.exports,Es=Object(r["defineComponent"])({name:"LoadPctileChart",components:{PctileChart:Is},props:{axiosParams:{type:Object,required:!0}},setup:function(e){var t=l(),a=t.route,n=js((function(){var t=a.value.params.projectId;return{url:"/api/tracing/".concat(t,"/percentiles"),params:e.axiosParams}}));return{percentiles:n}}}),Ms=Es,Ds=Object(h["a"])(Ms,Os,xs,!1,null,"c1b2e998",null),Ls=Ds.exports,Ns=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-simple-table",{staticClass:"v-data-table--border table-scroll-target"},[a("colgroup",[a("col"),a("col")]),a("thead",{staticClass:"v-data-table-header"},[a("tr",[a("th",[e._v("Key")]),a("th",{staticClass:"target"},[e._v("Value")])])]),e.attrKeys.length?e._e():a("tbody",[a("tr",{staticClass:"v-data-table__empty-wrapper"},[a("td",{attrs:{colspan:"99"}},[e._v("There are no attributes matching the filters.")])])]),a("tbody",e._l(e.attrKeys,(function(t){return a("tr",{key:t},[a("th",[e._v(e._s(t))]),a("td",[a("XText",{attrs:{name:t,value:e.attrs[t]}})],1)])})),0)])],1)},$s=[],Bs=Object(r["defineComponent"])({name:"AttrTable",props:{attrs:{type:Object,required:!0}},setup:function(e){var t=Object(r["computed"])((function(){var t=Object.keys(e.attrs);return t.sort(),t}));return{xkey:Gt,attrKeys:t}}}),As=Bs,Fs=Object(h["a"])(As,Ns,$s,!1,null,"42287b72",null),Gs=Fs.exports;y()(Fs,{VSimpleTable:Rn["a"]});var Xs=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-expansion-panels",{attrs:{flat:e.flat,multiple:""},model:{value:e.panels,callback:function(t){e.panels=t},expression:"panels"}},e._l(e.events,(function(t,n){return a("v-expansion-panel",{key:n},[a("v-expansion-panel-header",{staticClass:"user-select-text"},[a("span",[a("XDate",{staticClass:"mr-5 text-caption",attrs:{date:t.time,format:"time"}}),a("span",[e._v(e._s(t.eventName))])],1)]),a("v-expansion-panel-content",[a("EventPanelContent",{attrs:{"date-range":e.dateRange,event:t}})],1)],1)})),1)},Us=[],Hs=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._e(),a("AttrTable",{staticClass:"mt-4",attrs:{"date-range":e.dateRange,attrs:e.event.attrs}})],1)},Qs=[],Ws=Object(r["defineComponent"])({name:"EventPanelContent",components:{PctileChart:Is,AttrTable:Gs},props:{dateRange:{type:Object,required:!0},event:{type:Object,required:!0}},setup:function(e){var t=js((function(){return{url:"/api/v1/tracing/percentiles",params:Object(L["a"])({group_id:void 0},e.dateRange.axiosParams())}}));return{percentiles:t}}}),zs=Ws,Ks=Object(h["a"])(zs,Hs,Qs,!1,null,"2483f260",null),Js=Ks.exports,Zs=Object(r["defineComponent"])({name:"EventPanels",components:{EventPanelContent:Js},props:{dateRange:{type:Object,required:!0},events:{type:Array,required:!0},flat:{type:Boolean,default:!1}},setup:function(e,t){var a=t.emit,n=Object(r["ref"])([]);return Object(r["watch"])((function(){return e.events}),(function(e){1===e.length?n.value=[0]:n.value=[]}),{immediate:!0}),{xkey:Gt,panels:n,emit:a}}}),Ys=Zs,ei=a("790c"),ti=a("285a"),ai=a("487c"),ni=a("b682"),ri=Object(h["a"])(Ys,Xs,Us,!1,null,"340e7bd7",null),oi=ri.exports;function si(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return e.eventName?Object(u["truncate"])(e.eventName,{length:t}):ii(e,t)}function ii(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;return Object(u["truncate"])(e.name,{length:t})}y()(ri,{VExpansionPanel:ei["a"],VExpansionPanelContent:ti["a"],VExpansionPanelHeader:ai["a"],VExpansionPanels:ni["a"]});var ui=Object(r["defineComponent"])({name:"SpanCard",components:{AttrTable:Gs,EventPanels:oi,LoadPctileChart:Ls},props:{dateRange:{type:Object,required:!0},span:{type:Object,required:!0},fluid:{type:Boolean,default:!1}},setup:function(e){var t=Object(r["ref"])("attrs"),a=Object(r["computed"])((function(){return Object(L["a"])(Object(L["a"])({},e.dateRange.axiosParams()),{},{system:e.span.system,group_id:e.span.groupId})})),n=Object(r["computed"])((function(){var t;return null!==(t=e.span.attrs[Gt.dbStatement])&&void 0!==t?t:""})),o=Object(r["computed"])((function(){return Object(ts["format"])(n.value)})),s=Object(r["computed"])((function(){var t;return null!==(t=e.span.attrs[Gt.exceptionStacktrace])&&void 0!==t?t:""}));return{xkey:Gt,meta:ci(e),activeTab:t,axiosParams:a,dbStatement:n,dbStatementPretty:o,excStacktrace:s,spanName:ii}}});function ci(e){var t=l(),a=t.route,n=Object(r["computed"])((function(){return e.span.traceId?"TraceShow"===a.value.name&&a.value.params.traceId===e.span.traceId?null:{name:"TraceShow",params:{traceId:e.span.traceId}}:null})),o=Object(r["computed"])((function(){return{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.dateRange.queryParams()),{},{system:e.span.system,where:"".concat(Gt.spanGroupId,' = "').concat(e.span.groupId,'"')})}})),s=Object(r["computed"])((function(){var t=[];return t.push({text:e.span.system,to:{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.dateRange.queryParams()),{},{system:e.span.system})},exact:!0}),t.push({text:Object(u["truncate"])(e.span.name,{length:50}),to:{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.dateRange.queryParams()),{},{system:e.span.system,where:"".concat(Gt.spanGroupId,' = "').concat(e.span.groupId,'"')})},exact:!0}),e.span.traceId&&t.push({text:e.span.traceId,to:{name:"TraceShow",params:{traceId:e.span.traceId}},exact:!0}),e.span.traceId&&e.span.id&&t.push({text:e.span.id,to:{name:"SpanShow",params:{traceId:e.span.traceId,spanId:e.span.id}},exact:!0}),t}));return Object(r["proxyRefs"])({groupRoute:o,traceRoute:n,breadcrumbs:s})}var li=ui,di=a("252b"),pi=a("e1db"),vi=Object(h["a"])(li,gs,ys,!1,null,"4ebb40f4",null),mi=vi.exports;y()(vi,{VBreadcrumbs:di["a"],VBreadcrumbsItem:pi["a"],VBtn:Ge["a"],VCol:$t["a"],VContainer:It["a"],VIcon:Qe["a"],VRow:Bt["a"],VSheet:gn["a"],VTab:ze["a"],VTabItem:Ke["a"],VTabs:Je["a"],VTabsItems:Ze["a"]});var fi=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("span",["error"===e.span.statusCode?a("v-btn",{staticClass:"mr-1",class:{"cursor-default":!e.clickable},attrs:{icon:"",title:e.xkey.spanStatusCode+" = 'error'"},on:{click:function(t){return t.stopPropagation(),e.$emit("click:chip",{key:e.xkey.spanStatusCode,value:"error"})}}},[a("v-icon",{attrs:{color:"error"}},[e._v(" mdi-alert-circle-outline ")])],1):e._e(),e._l(e.chips,(function(t,n){return a("v-chip",{key:t.key,class:{"ml-1":n>0,"mb-1":n>0,"cursor-default":!e.clickable},attrs:{color:"light-blue lighten-5",label:"",small:"",title:t.key+": "+t.value},on:{click:function(a){return a.stopPropagation(),e.$emit("click:chip",t)}}},[e._v(" "+e._s(t.text)+" ")])})),e.events.length?a("v-chip",{staticClass:"ml-1",attrs:{color:"blue lighten-5",label:"",small:""}},[a("strong",{staticClass:"mr-1"},[e._v(e._s(e.events.length))]),a("span",[e._v(e._s(1===e.events.length?"event":"events"))])]):e._e()],2)},bi=[],hi=Object(r["defineComponent"])({name:"SpanChips",props:{span:{type:Object,required:!0},showOperation:{type:Boolean,default:!1},traceMode:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1}},setup:function(e){var t=Object(r["computed"])((function(){var t,a;return null!==(t=null===(a=e.span)||void 0===a?void 0:a.events)&&void 0!==t?t:[]})),a=Object(r["computed"])((function(){if(e.traceMode)return gi(e.span.attrs);var t=[],a=e.span.attrs[Gt.serviceName];a&&t.push({key:Gt.serviceName,value:a,text:a}),Oi(t,e.span.attrs);var n=e.span.attrs[Gt.codeFilepath];return n&&t.push({key:Gt.codeFilepath,value:n,text:ji(n)}),xi(t,e.span.attrs),t}));return{xkey:Gt,events:t,chips:a}}});function gi(e){var t=[];return yi(t,e),Oi(t,e),xi(t,e),t}function yi(e,t){var a=t[Gt.spanSystem];a&&a!==Gt.internalSystem&&e.push({key:Gt.spanSystem,value:a,text:a})}function Oi(e,t){var a=t[Gt.spanKind];a&&"internal"!==a&&e.push({key:Gt.spanKind,value:a,text:a})}function xi(e,t){var a=t[Gt.httpStatusCode];"number"===typeof a&&0!=a&&(a<200||a>=300)&&e.push({key:Gt.httpStatusCode,value:a,text:String(a)})}function ji(e){var t=e.lastIndexOf("/");return-1!==t&&(e=e.slice(t+1)),Object(u["truncate"])(e)}var _i=hi,Ci=(a("88d8"),Object(h["a"])(_i,fi,bi,!1,null,"222808ba",null)),wi=Ci.exports;y()(Ci,{VBtn:Ge["a"],VChip:wr["a"],VIcon:Qe["a"]});var ki=Object(r["defineComponent"])({name:"SpansTable",components:{ThOrder:on,SpanChips:wi,SpanCard:mi},props:{dateRange:{type:Object,required:!0},loading:{type:Boolean,required:!0},spans:{type:Array,required:!0},pager:{type:Object,required:!0},order:{type:Object,required:!0},columns:{type:Array,default:function(){return[]}}},setup:function(e){function t(){Object(r["nextTick"])((function(){e.order.desc=!0}))}return{xkey:Gt,dialog:Si(),eventOrSpanName:si,onSortBy:t}}});function Si(){var e=Object(r["shallowRef"])(!1),t=Object(r["shallowRef"])();function a(a){t.value=a,e.value=!0}return Object(r["proxyRefs"])({dialog:e,activeSpan:t,showSpan:a})}var Pi=ki,Vi=Object(h["a"])(Pi,bs,hs,!1,null,"915739e8",null),qi=Vi.exports;y()(Vi,{VDialog:qr["a"],VProgressLinear:Tn["a"],VSheet:gn["a"],VSimpleTable:Rn["a"]});var Ti=Object(r["defineComponent"])({name:"SpanListInline",components:{SpanTable:qi},props:{dateRange:{type:Object,required:!0},uql:{type:Object,default:void 0},axiosParams:{type:Object,required:!0},where:{type:String,required:!0}},setup:function(e){var t=l(),a=t.route,n=fs((function(){var t=a.value.params.projectId,n=e.where+" | "+e.axiosParams.query;return{url:"/api/tracing/".concat(t,"/spans"),params:Object(L["a"])(Object(L["a"])({},e.axiosParams),{},{query:n})}}),{order:{column:Gt.spanDuration,desc:!0}}),o=Object(r["computed"])((function(){return e.uql?{"click:chip":s}:{}}));function s(t){var a=e.uql.createEditor();a.where(t.key,"=",t.value),e.uql.commitEdits(a)}return{spans:n,listeners:o,onChipClick:s}}}),Ri=Ti,Ii=Object(h["a"])(Ri,vs,ms,!1,null,"4b0eaee2",null),Ei=Ii.exports,Mi=(a("2ce0"),Object(r["defineComponent"])({name:"GroupTable",components:{ThOrder:on,LoadGroupSparkline:ps,SpanListInline:Ei},props:{dateRange:{type:Object,required:!0},systems:{type:Object,required:!0},uql:{type:Object,default:void 0},loading:{type:Boolean,required:!0},items:{type:Array,required:!0},columns:{type:Array,required:!0},groupColumns:{type:Array,required:!0},plotColumns:{type:Array,required:!0},order:{type:Object,required:!0},dense:{type:Boolean,default:!1},showDetails:{type:Boolean,default:!1},axiosParams:{type:Object,default:void 0}},setup:function(e){var t=l(),a=t.route,n=Di(),o=Object(r["computed"])((function(){return p(Gt.spanName)})),s=Object(r["computed"])((function(){return Boolean(e.showDetails&&e.uql)})),u=Object(r["computed"])((function(){return ta(e.systems.activeValue)&&p(Gt.spanSystem)})),c=Object(r["computed"])((function(){return p("max(".concat(Gt.spanTime,")"))})),d=Object(r["computed"])((function(){var t=[Gt.spanSystem,"max(".concat(Gt.spanTime,")")];o.value&&t.push(Gt.spanGroupId,Gt.spanName);var a=e.columns.filter((function(e){return-1===t.indexOf(e.name)}));return a}));function p(t){if(!e.items.length)return!1;var a=e.items[0];return t in a}function v(t){var n,r=e.uql.createEditor(),o=Object(i["a"])(e.groupColumns);try{for(o.s();!(n=o.n()).done;){var s=n.value,u=t[s.name];r.where(s.name,"=",u)}}catch(c){o.e(c)}finally{o.f()}return{name:"GroupList",query:Object(L["a"])(Object(L["a"])(Object(L["a"])({},a.value.query),e.systems.axiosParams()),{},{query:r.toString()})}}function m(e){switch(e.name){case Gt.spanErrorCount:return"errors";case Gt.spanErrorPct:return"err%"}var t=e.name.match(/^([0-9a-z]+)\(span\.duration\)$/);if(t)return t[1];var a="span.";return e.name.startsWith(a)?e.name.slice(a.length):e.name}function f(t){var a,n=[],r=Object(i["a"])(e.groupColumns);try{for(r.s();!(a=r.n()).done;){var o=a.value,s=t[o.name];n.push("".concat(o.name," = ").concat(Na(s)))}}catch(u){r.e(u)}finally{r.f()}return"where ".concat(n.join(" AND "))}function b(e){return{query:Object(L["a"])(Object(L["a"])({},a.value.query),{},{system:e[Gt.spanSystem]})}}return Object(r["watch"])((function(){return e.items}),(function(e){1===e.length&&n.show(e[0][Gt.itemId])}),{immediate:!0}),{xkey:Gt,groupViewer:n,hasGroupName:o,hasDetails:s,showSystemColumn:u,hasTimeColumn:c,customColumns:d,columnHeader:m,spanListRoute:v,groupBasedWhere:f,systemRoute:b,itemName:Li}}}));function Di(){var e=Object(r["shallowRef"])();function t(t){return e.value===t}function a(e){t(e)?o(e):n(e)}function n(t){e.value=t}function o(t){e.value=void 0}return{visible:t,show:n,hide:o,toggle:a}}function Li(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120,a=e[Gt.spanEventName];if(a)return Object(u["truncate"])(a,{length:t});var n=e[Gt.spanName];return Object(u["truncate"])(n,{length:t})}var Ni=Mi,$i=Object(h["a"])(Ni,os,ss,!1,null,"83f6a25a",null),Bi=$i.exports;y()($i,{VBtn:Ge["a"],VIcon:Qe["a"],VProgressLinear:Tn["a"],VSimpleTable:Rn["a"]});var Ai=Object(r["defineComponent"])({name:"GroupList",components:{GroupTable:Bi},props:{dateRange:{type:Object,required:!0},systems:{type:Object,required:!0},uql:{type:Object,required:!0},axiosParams:{type:Object,required:!0}},setup:function(e){var t=l(),a=t.route,n=Object(r["shallowRef"])([]),o=as((function(){var t=a.value.params.projectId;return{url:"/api/tracing/".concat(t,"/groups"),params:e.axiosParams}}));return Object(r["watch"])((function(){return o.plotColumns}),(function(e){e.length&&!n.value.length&&(n.value=[e[0].name])})),Object(r["watch"])((function(){return o.queryParts}),(function(t){t&&e.uql.syncParts(t)})),{activeColumns:n,explore:o}}}),Fi=Ai,Gi=a("b800"),Xi=Object(h["a"])(Fi,Yo,es,!1,null,null,null),Ui=Xi.exports;y()(Xi,{VBanner:Gi["a"],VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VIcon:Qe["a"],VRow:Bt["a"],VSlideGroup:Ln["b"],VSlideItem:Nn["a"],VSpacer:We["a"],VToolbar:$n["a"],VToolbarTitle:Et["b"]});var Hi=Object(r["defineComponent"])({name:"Tracing",components:{DateRangePicker:ht,SystemPicker:nr,HelpCard:Ft,UptraceQuery:Nr,SpanFilters:Zo,GroupList:Ui},setup:function(){Object(D["useTitle"])("Explore spans");var e=le(),t=je(e),a=Aa({query:Ha(Gt.spanGroupId),syncQuery:!0}),n=Object(r["computed"])((function(){return Object(L["a"])(Object(L["a"])(Object(L["a"])({},e.axiosParams()),a.axiosParams()),{},{system:t.activeValue})}));return{dateRange:e,systems:t,uql:a,axiosParams:n}}}),Qi=Hi,Wi=Object(h["a"])(Qi,fr,br,!1,null,"6b921b23",null),zi=Wi.exports;y()(Wi,{VCol:$t["a"],VContainer:It["a"],VRow:Bt["a"]});var Ki=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("XPlaceholder",{scopedSlots:e._u([e.trace.error?{key:"placeholder",fn:function(){return[e.trace.error?a("TraceError",{attrs:{error:e.trace.error}}):e._e()]},proxy:!0}:e.trace.root?null:{key:"placeholder",fn:function(){return[a("v-container",{attrs:{fluid:e.$vuetify.breakpoint.mdAndDown}},[a("v-skeleton-loader",{attrs:{type:"article, image, table"}})],1)]},proxy:!0}],null,!0)},[a("PageToolbar",{attrs:{loading:e.trace.loading,fluid:e.$vuetify.breakpoint.mdAndDown}},[a("v-breadcrumbs",{attrs:{items:e.meta.breadcrumbs,divider:">",large:""},scopedSlots:e._u([{key:"item",fn:function(t){var n=t.item;return[a("v-breadcrumbs-item",{attrs:{to:n.to,exact:n.exact}},[e._v(" "+e._s(n.text)+" ")])]}}])})],1),a("v-container",{staticClass:"py-4",attrs:{fluid:e.$vuetify.breakpoint.mdAndDown}},[e.trace.root?a("v-row",{staticClass:"px-4 text-body-2"},[a("v-col",[e._v(" "+e._s(e.trace.root.name)+" ")])],1):e._e(),e.trace.root?a("v-row",{staticClass:"px-4 text-subtitle-2 text-center",attrs:{align:"end"}},[e.trace.root.kind?a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Kind")]),a("div",[e._v(e._s(e.trace.root.kind))])]):e._e(),e.trace.root.statusCode?a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Status")]),a("div",{class:{"error--text":"error"===e.trace.root.statusCode}},[e._v(" "+e._s(e.trace.root.statusCode)+" ")])]):e._e(),a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Time")]),a("XDate",{attrs:{date:e.trace.root.time,format:"full"}})],1),a("v-col",{attrs:{cols:"auto"}},[a("div",{staticClass:"grey--text font-weight-regular"},[e._v("Duration")]),a("XDuration",{attrs:{duration:e.trace.root.duration,fixed:""}})],1),a("v-col",{attrs:{cols:"auto"}},[e.groupRoute?a("v-btn",{attrs:{depressed:"",small:"",to:e.groupRoute,exact:""}},[e._v("View group")]):e._e()],1),a("v-col",{attrs:{cols:"auto"}},[e.exploreTraceRoute?a("v-btn",{attrs:{depressed:"",small:"",to:e.exploreTraceRoute,exact:""}},[e._v("Explore trace")]):e._e()],1)],1):e._e(),e.trace.root&&e.trace.root.groupId?a("v-row",[a("v-col",[a("v-card",{attrs:{outlined:"",rounded:"lg"}},[a("v-card-text",[a("LoadPctileChart",{attrs:{"axios-params":e.axiosParams}})],1)],1)],1)],1):e._e(),a("v-row",[a("v-col",[a("SystemBarChart",{attrs:{systems:e.trace.coloredSystems}})],1)],1),a("v-row",[a("v-col",[a("v-sheet",{staticClass:"pa-4",attrs:{outlined:"",rounded:"lg"}},[a("TraceTimeline",{attrs:{"date-range":e.dateRange,trace:e.trace}})],1)],1)],1)],1)],1)},Ji=[],Zi=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("v-sheet",{attrs:{outlined:"",rounded:"t-lg"}},[a("v-row",e._l(e.styledSystems,(function(t){return a("v-col",{key:t.system,staticClass:"py-5 text-center text-subtitle-2",attrs:{justify:"space-around"}},[a("v-avatar",{staticClass:"mr-2",attrs:{color:t.color.base,size:"12"}}),a("span",{staticClass:"d-inline-flex mr-1"},[e._v(e._s(e.truncate(t.system,{length:30})))]),a("span",{staticClass:"d-inline-flex blue-grey--text"},[e._v(e._s(e.percent(t.duration/e.totalDuration)))])],1)})),1)],1),a("div",{staticClass:"d-flex"},e._l(e.styledSystems,(function(t){return a("v-tooltip",{key:t.system,attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function(n){var r=n.on;return[a("div",e._g({staticClass:"bar",style:t.barStyle},r))]}}],null,!0)},[a("div",[a("span",[e._v(e._s(t.system))]),a("XDuration",{staticClass:"ml-1",attrs:{duration:t.duration}})],1)])})),1),a("v-progress-linear",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],attrs:{indeterminate:"",absolute:""}})],1)},Yi=[],eu=Object(r["defineComponent"])({name:"SystemBarChart",props:{loading:{type:Boolean,default:!1},systems:{type:Array,required:!0}},setup:function(e){var t=Object(r["computed"])((function(){return e.systems.reduce((function(e,t){return t.duration?e+t.duration:e}),0)})),a=Object(r["computed"])((function(){var a,n=e.systems.slice(0,5),r=Object(i["a"])(n);try{for(r.s();!(a=r.n()).done;){var o=a.value;o.barStyle={width:tu(o.duration,t.value),"background-color":o.color.base}}}catch(s){r.e(s)}finally{r.f()}return n}));return{styledSystems:a,totalDuration:t,truncate:u["truncate"],percent:ba}}});function tu(e,t){if(0===t)return"100%";var a=e/t*100;return a+"%"}var au=eu,nu=(a("e4c5"),Object(h["a"])(au,Zi,Yi,!1,null,"67799368",null)),ru=nu.exports;y()(nu,{VAvatar:qo["a"],VCol:$t["a"],VProgressLinear:Tn["a"],VRow:Bt["a"],VSheet:gn["a"],VTooltip:Zt["a"]});var ou=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("table",{staticClass:"trace-table trace-table--timeline"},[e._m(0),e._m(1),a("tbody",[e._l(e.trace.spans,(function(t){return[e.trace.isVisible(t)?a("tr",{key:"span-"+t.id,staticClass:"cursor-pointer",class:{active:t===e.trace.activeSpan},attrs:{id:"span-"+t.id},on:{click:function(a){return e.showSpan(t)}}},[a("td",{style:{paddingLeft:36+20*t.level+"px"}},[a("v-btn",{staticClass:"ml-n9",attrs:{icon:"",disabled:!t.children},on:{click:function(a){return a.stopPropagation(),e.trace.toggleTree(t)}}},[a("v-icon",{attrs:{size:"28"}},[e._v(e._s(e.trace.isExpanded(t)?"mdi-chevron-down":"mdi-chevron-right"))])],1),a("span",{staticClass:"cursor-pointer span-name"},[e._v(e._s(e.spanName(t,100)))]),a("SpanChips",{staticClass:"ml-2",attrs:{span:t,"trace-mode":""}})],1),a("td",{staticClass:"text-caption",staticStyle:{position:"relative"}},[a("span",{style:t.labelStyle},[a("span",{directives:[{name:"show",rawName:"v-show",value:t.children&&e.trace.isExpanded(t),expression:"span.children && trace.isExpanded(span)"}]},[a("XDuration",{attrs:{duration:t.durationSelf}}),a("span",{staticClass:"mx-1"},[e._v("of")])],1),a("XDuration",{attrs:{duration:t.duration}})],1),e._l(t.bars,(function(n,r){return a("span",{key:r,staticClass:"span-bar",style:n.coloredStyle,attrs:{title:e.durationFixed(n.duration)+" "+e.spanName(t)}})})),t.children?a("TraceTimelineChildrenBars",{attrs:{trace:e.trace,span:t,children:t.children,hidden:!e.trace.isExpanded(t)}}):e._e()],2)]):e._e()]}))],2)]),a("v-dialog",{attrs:{"max-width":"1280"},model:{value:e.dialog,callback:function(t){e.dialog=t},expression:"dialog"}},[a("v-sheet",[e.trace.activeSpan?a("SpanCard",{key:e.trace.activeSpan.id,attrs:{"date-range":e.dateRange,span:e.trace.activeSpan,fluid:""}}):e._e()],1)],1)],1)},su=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("colgroup",[a("col",{staticStyle:{width:"50%"}}),a("col",{staticStyle:{width:"50%"}})])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("thead",[a("tr",[a("th",{staticClass:"px-2"},[e._v("Operation")]),a("th",[e._v("Timeline")])])])}],iu=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._l(e.internalChildren,(function(t){return[e._l(t.bars,(function(n,r){return a("span",{key:t.id+"-"+r,staticClass:"span-bar",style:e.hidden?n.coloredStyle:n.lightenStyle,attrs:{title:e.durationFixed(n.duration)+" "+t.name}})})),t.children?a("TraceTimelineChildrenBars",{key:t.id,attrs:{trace:e.trace,span:e.span,children:t.children,hidden:e.hidden}}):e._e()]}))],2)},uu=[],cu=Object(r["defineComponent"])({name:"TraceTimelineChildrenBars",props:{trace:{type:Object,required:!0},span:{type:Object,required:!0},children:{type:Array,required:!0},hidden:{type:Boolean,required:!0}},setup:function(e){var t=Object(r["computed"])((function(){return e.children.filter((function(t){return t.endPct<=e.span.endPct&&"consumer"!==t.kind}))}));return{internalChildren:t,durationFixed:ya}}}),lu=cu,du=Object(h["a"])(lu,iu,uu,!1,null,null,null),pu=du.exports,vu=Object(r["defineComponent"])({name:"TraceTimeline",components:{SpanCard:mi,SpanChips:wi,TraceTimelineChildrenBars:pu},props:{dateRange:{type:Object,required:!0},trace:{type:Object,required:!0}},setup:function(e){var t=Object(r["shallowRef"])(!1);function a(a){t.value=!0,e.trace.activeSpanId=a.id}return{dialog:t,showSpan:a,spanName:ii,durationFixed:ya}}}),mu=vu,fu=(a("4ec0"),a("a4e0"),Object(h["a"])(mu,ou,su,!1,null,"705c5792",null)),bu=fu.exports;y()(fu,{VBtn:Ge["a"],VDialog:qr["a"],VIcon:Qe["a"],VSheet:gn["a"]});var hu=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{staticClass:"fill-height grey lighten-5",attrs:{fluid:""}},[a("v-row",[a("v-col",{staticClass:"text-center"},[e.title?a("h1",{staticClass:"text-h1"},[e._v(e._s(e.title))]):e._e(),a("h2",{staticClass:"mt-4 text-h5"},[e._v(e._s(e.message))])])],1)],1)},gu=[],yu=Object(r["defineComponent"])({name:"TraceError",props:{error:{type:Error,required:!0}},setup:function(e){var t=Object(r["computed"])((function(){return e.error})),a=Object(r["computed"])((function(){var e,a,n,r;return null!==(e=null===(a=t.value)||void 0===a||null===(n=a.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.status)&&void 0!==e?e:""})),n=Object(r["computed"])((function(){var a,n,r,o;return null!==(a=null===(n=t.value)||void 0===n||null===(r=n.response)||void 0===r||null===(o=r.data)||void 0===o?void 0:o.message)&&void 0!==a?a:String(e.error)}));return{title:a,message:n}}}),Ou=yu,xu=Object(h["a"])(Ou,hu,gu,!1,null,"18d9686c",null),ju=xu.exports;function _u(e,t){!1!==t(e,null)&&Cu(e,t)}function Cu(e,t){if(!e.children)return!0;var a,n=Object(i["a"])(e.children);try{for(n.s();!(a=n.n()).done;){var r=a.value;if(!1===t(r,e))return!1;if(!1===Cu(r,t))return!1}}catch(o){n.e(o)}finally{n.f()}return!0}function wu(e,t){var a=ku(e,t);return a}function ku(e,t){var a=[];return _u(e,(function(e,n){e.parent=n,a.push(e),e.level=n?n.level+1:0;var r=e.startPct,o=Su(r,e.duration,t.duration);e.endPct=r+o,e.labelStyle=Vu(r,o),e.bars=[];var s=Pu(r,o);return e.bars.push({duration:e.durationSelf,style:s,coloredStyle:Object.assign({},s,{backgroundColor:e.color}),lightenStyle:Object.assign({},s,{backgroundColor:e.lightenColor})}),!0})),a}function Su(e,t,a){var n=t/a;return e+n>1?1-e:n}function Pu(e,t){var a=qu(e),n=t<=.001?"1px":qu(t);return{left:a,width:n}}function Vu(e,t){var a={position:"absolute",bottom:"6px"};if(e<=.5)a.left=qu(e);else{var n=1-(e+t);a.right=qu(n)}return a}function qu(e){return 100*e+"%"}y()(xu,{VCol:$t["a"],VContainer:It["a"],VRow:Bt["a"]});var Tu=["blue","pink","green","orange","purple","teal"].map((function(e){var t=Qt["a"][e];return{lighten:t.lighten4,base:t.base,darken:t.darken2}}));function Ru(e){var t={};_u(e,(function(e,a){if(e._system=e.system,e._system===Gt.internalSystem&&a&&(e._system=a._system),!e._system)return!0;var n=t[e._system];n||(n={system:e._system,duration:0,color:void 0},t[e._system]=n);var r=e.durationSelf;return r&&(n.duration+=r),!0}));var a=Iu(t),n=Tu[Tu.length-1];return _u(e,(function(e){var a,r,o=null!==(a=null===(r=t[e._system])||void 0===r?void 0:r.color)&&void 0!==a?a:n;return e.color=o.base,e.lightenColor=o.lighten,e.darkenColor=o.darken,!0})),a}function Iu(e){var t=[];for(var a in e)t.push(e[a]);t.sort((function(e,t){return e.duration<t.duration?1:e.duration>t.duration?-1:0}));for(var n=0;n<t.length&&n<Tu.length-1;n++){var r=t[n];r.color=Tu[n]}return t}function Eu(){var e=l(),t=e.route,a=X(),n=a.forceReloadParams,o=Object(r["ref"])(""),s=Object(r["ref"])([]),u=Mu(),c=u.isVisible,d=u.isExpanded,p=u.toggleTree,v=u.showTree,m=xe((function(){var e=t.value.params,a=e.projectId,r=e.traceId;return{url:"/api/tracing/".concat(a,"/traces/").concat(r),params:Object(L["a"])({},n.value)}})),f=m.loading,b=m.data,h=m.error,g=Object(r["computed"])((function(){return t.value.params.traceId})),y=Object(r["computed"])((function(){var e;return null===(e=b.value)||void 0===e?void 0:e.trace})),O=Object(r["computed"])((function(){var e;return null===(e=b.value)||void 0===e?void 0:e.root})),x=Object(r["computed"])((function(){var e,t=null===(e=b.value)||void 0===e?void 0:e.root;if(!t)return[];var a=wu(t,y.value);return a})),j=Object(r["computed"])((function(){if(o.value)return x.value.find((function(e){return e.id===o.value}))}));return Object(r["watch"])(x,(function(e){if(e.length){var t=e[0];if(t.children){var a,n=Object(i["a"])(t.children);try{for(n.s();!(a=n.n()).done;){var r=a.value;_u(r,(function(e){return p(e),!0}))}}catch(o){n.e(o)}finally{n.f()}}}}),{immediate:!0}),Object(r["watch"])(j,(function(e){e&&v(e)})),Object(r["watch"])(O,(function(e){e&&(s.value=Ru(e))}),{flush:"sync"}),Object(r["proxyRefs"])({activeSpanId:o,activeSpan:j,loading:f,error:h,coloredSystems:s,root:O,spans:x,id:g,trace:y,isVisible:c,isExpanded:d,toggleTree:p,showTree:v})}function Mu(){var e=Object(r["shallowReactive"])({}),t=Object(r["shallowReactive"])({});function a(t){return t.id in e||Object(r["set"])(e,t.id,0),!e[t.id]}function n(e){return e.id in t||Object(r["set"])(t,e.id,!1),!t[e.id]}function o(e){Object(r["set"])(t,e.id,n(e)),s(e,n(e)?1:-1)}function s(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t.children){var n,o=Object(i["a"])(t.children);try{for(o.s();!(n=o.n()).done;){var u,c=n.value;Object(r["set"])(e,c.id,(null!==(u=e[c.id])&&void 0!==u?u:0)+a),s(c,a)}}catch(l){o.e(l)}finally{o.f()}}}function u(e){e=e.parent;while(e)n(e)||o(e),e=e.parent}return{isVisible:a,isExpanded:n,toggleTree:o,showTree:u}}var Du=Object(r["defineComponent"])({name:"TraceShow",components:{LoadPctileChart:Ls,SystemBarChart:ru,TraceTimeline:bu,TraceError:ju},setup:function(){Object(D["useTitle"])("View trace");var e=le(),t=Eu(),a=Object(r["computed"])((function(){if(t.root)return Object(L["a"])(Object(L["a"])({},e.axiosParams()),{},{system:t.root.system,group_id:t.root.groupId})})),n=Object(r["computed"])((function(){if(t.root)return{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.queryParams()),{},{system:t.root.system,where:"".concat(Gt.spanGroupId,' = "').concat(t.root.groupId,'"')})}})),o=Object(r["computed"])((function(){if(t.root)return{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.queryParams()),{},{system:Gt.allSystem,query:["group by ".concat(Gt.spanGroupId),Gt.spanCount,Gt.spanErrorCount,"p50(".concat(Gt.spanDuration,")"),"p90(".concat(Gt.spanDuration,")"),"p99(".concat(Gt.spanDuration,")"),"sum(".concat(Gt.spanDuration,")"),"where ".concat(Gt.spanTraceId,' = "').concat(t.root.traceId,'"')].join(" | "),plot:null})}}));return Object(r["watch"])((function(){return t.root}),(function(t){t&&(Object(D["useTitle"])(t.name),e.changeWithin(t.time,Z))})),{dateRange:e,trace:t,meta:Lu(e,t),axiosParams:a,groupRoute:n,exploreTraceRoute:o}}});function Lu(e,t){var a=Object(r["computed"])((function(){var a=t.root,n=[];return a?(a.system&&n.push({text:a.system,to:{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.queryParams()),{},{system:a.system})},exact:!0}),a.system&&a.groupId&&n.push({text:a.name,to:{name:"GroupList",query:Object(L["a"])(Object(L["a"])({},e.queryParams()),{},{system:a.system,where:"".concat(Gt.spanGroupId,' = "').concat(a.groupId,'"')})},exact:!0}),n.push({text:t.id}),n):n}));return Object(r["proxyRefs"])({breadcrumbs:a})}var Nu=Du,$u=Object(h["a"])(Nu,Ki,Ji,!1,null,"355bdd64",null),Bu=$u.exports;y()($u,{VBreadcrumbs:di["a"],VBreadcrumbsItem:pi["a"],VBtn:Ge["a"],VCard:Xe["a"],VCardText:Ue["b"],VCol:$t["a"],VContainer:It["a"],VRow:Bt["a"],VSheet:gn["a"],VSkeletonLoader:io["a"]});var Au=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.span.loading?a("v-progress-linear",{attrs:{absolute:"",indeterminate:""}}):e._e(),e.span.item?a("SpanCard",{attrs:{"date-range":e.dateRange,span:e.span.item,fluid:e.$vuetify.breakpoint.mdAndDown}}):e._e()],1)},Fu=[],Gu=Object(r["defineComponent"])({name:"SpanShow",components:{SpanCard:mi},setup:function(){var e=le(),t=Xu();return Object(r["watch"])((function(){return t.item}),(function(t){t&&(Object(D["useTitle"])(t.name),e.changeWithin(t.time,Z))})),{dateRange:e,span:t}}});function Xu(){var e=l(),t=e.route,a=xe((function(){var e=t.value.params,a=e.projectId,n=e.traceId,r=e.spanId;return{url:"/api/tracing/".concat(a,"/traces/").concat(n,"/").concat(r)}})),n=a.loading,o=a.data,s=Object(r["computed"])((function(){var e;return null===(e=o.value)||void 0===e?void 0:e.span}));return Object(r["proxyRefs"])({loading:n,item:s})}var Uu=Gu,Hu=Object(h["a"])(Uu,Au,Fu,!1,null,"33fa6768",null),Qu=Hu.exports;y()(Hu,{VProgressLinear:Tn["a"]});var Wu=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-container",{staticClass:"fill-height grey lighten-5",attrs:{fluid:""}},[a("v-row",[a("v-col",[a("v-card",{staticClass:"mx-auto",attrs:{"max-width":"500"}},[a("v-toolbar",{attrs:{color:"primary",dark:"",flat:""}},[a("v-toolbar-title",[e._v("Log in")])],1),a("v-form",{on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}},model:{value:e.isValid,callback:function(t){e.isValid=t},expression:"isValid"}},[a("v-card",{staticClass:"px-14 py-8",attrs:{flat:""}},[a("v-text-field",{attrs:{"prepend-inner-icon":"mdi-account",label:"Username",rules:e.rules.username,required:"",filled:""},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}}),a("v-text-field",{attrs:{"prepend-inner-icon":"mdi-lock",label:"Password",type:"password",rules:e.rules.password,required:"",filled:""},model:{value:e.password,callback:function(t){e.password=t},expression:"password"}}),a("v-card-actions",[a("v-spacer"),a("v-btn",{attrs:{loading:e.loading,disabled:!e.isValid,type:"submit",color:"primary"}},[e._v(" Sign in ")])],1)],1)],1)],1)],1)],1)],1)},zu=[],Ku=function(e){return e&&0!=e.length||"Field is required"},Ju=Object(r["defineComponent"])({name:"Login",setup:function(){Object(D["useTitle"])("Log in");var e=l(),t=e.router,a=lc(),n=Object(r["ref"])(!1),o={username:[Ku],password:[Ku]},s=Object(r["ref"])("uptrace"),i=Object(r["ref"])("uptrace"),u=he(),c=u.loading,d=u.request;function p(){v().then((function(){a.reload()}))}function v(){var e={username:s.value,password:i.value},t="/api/users/login";return d({method:"POST",url:t,data:e})}return Object(r["watch"])((function(){return a.current}),(function(){a.isAuth&&t.push({name:"Home"})})),{rules:o,isValid:n,username:s,password:i,loading:c,submit:p}}}),Zu=Ju,Yu=Object(h["a"])(Zu,Wu,zu,!1,null,"c529e0a8",null),ec=Yu.exports;y()(Yu,{VBtn:Ge["a"],VCard:Xe["a"],VCardActions:Ue["a"],VCol:$t["a"],VContainer:It["a"],VForm:Ur["a"],VRow:Bt["a"],VSpacer:We["a"],VTextField:Mr["a"],VToolbar:$n["a"],VToolbarTitle:Et["b"]});var tc=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("HelpCard")},ac=[],nc=Object(r["defineComponent"])({name:"Tracing",components:{HelpCard:Ft},setup:function(){Object(D["useTitle"])("Getting started with Uptrace")}}),rc=nc,oc=Object(h["a"])(rc,tc,ac,!1,null,"69cf899e",null),sc=oc.exports;n["default"].use(I["a"]);var ic=[{name:"Home",path:"/",beforeEnter:function(){var e=Object(R["a"])(regeneratorRuntime.mark((function e(t,a,n){var r,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=lc(),e.next=3,r.getOrLoad();case 3:if(o=r.projects[0],!o){e.next=7;break}return n({name:"Overview",params:{projectId:String(o.id)}}),e.abrupt("return");case 7:n({name:"ProjectCreate"});case 8:case"end":return e.stop()}}),e)})));function t(t,a,n){return e.apply(this,arguments)}return t}()},{path:"/login",name:"Login",component:ec},{name:"Help",path:"/help/:projectId(\\d+)",component:sc},{name:"ProjectCreate",path:"/help/projects",component:sc},{path:"/overview/:projectId(\\d+)",component:Ra,children:[{name:"Overview",path:"",component:An}]},{path:"/services/:projectId(\\d+)",component:Ra,children:[{name:"ServiceOverview",path:"",component:ir}]},{path:"/hosts/:projectId(\\d+)",component:Ra,children:[{name:"HostOverview",path:"",component:mr}]},{name:"GroupList",path:"/explore/:projectId(\\d+)",component:zi},{name:"TraceShow",path:"/traces/:projectId(\\d+)/:traceId",component:Bu},{name:"SpanShow",path:"/traces/:projectId(\\d+)/:traceId/:spanId",component:Qu}],uc=new I["a"]({mode:"history",base:"/",routes:ic}),cc=uc,lc=c("useUser",(function(){var e,t=he(),a=t.loading,n=t.data,o=t.request,s=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.user)&&void 0!==e?e:{id:0,name:"Guest"}})),i=Object(r["computed"])((function(){return Boolean(s.value.id)})),u=Object(r["computed"])((function(){var e,t;return null!==(e=null===(t=n.value)||void 0===t?void 0:t.projects)&&void 0!==e?e:[]}));function c(){return e=o({url:"/api/users/current"}),e}function l(){return d.apply(this,arguments)}function d(){return d=Object(R["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e||c(),t.next=3,e;case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)}))),d.apply(this,arguments)}return l(),Object(r["proxyRefs"])({loading:a,current:s,isAuth:i,projects:u,reload:c,getOrLoad:l})}));function dc(){cc.push({name:"Login"}).catch((function(){}))}var pc=Object(r["defineComponent"])({name:"ProjectPicker",setup:function(){var e=l(),t=e.router,a=e.route,o=lc(),s=Object(r["ref"])(),u=Object(r["ref"])(""),c=Object(r["ref"])(!1),d=Object(r["computed"])({get:function(){var e=parseInt(a.value.params.projectId);if(e){var t,n=Object(i["a"])(o.projects);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.id===e)return r}}catch(s){n.e(s)}finally{n.f()}}},set:function(e){var n=a.value.name,r=Object.keys(a.value.params);1===r.length&&"projectId"===r[0]||(n="Overview"),t.push({name:n,params:{projectId:e.id.toString()}}).catch((function(){}))}}),p=Object(r["computed"])((function(){return!d.value||c.value}));function v(){setTimeout((function(){c.value=!1}),200)}function m(){n["default"].nextTick((function(){s.value&&s.value.blur()}))}function f(){c.value=!0,n["default"].nextTick((function(){s.value&&(s.value.focus(),s.value.activateMenu())}))}return{route:a,el:s,user:o,activeProject:d,searchInput:u,autocompleteActive:p,onBlur:v,onChange:m,onClickActiveProject:f}}}),vc=pc,mc=Object(h["a"])(vc,q,T,!1,null,"1f064c0a",null),fc=mc.exports;y()(mc,{VAutocomplete:Vo["a"],VIcon:Qe["a"],VToolbarTitle:Et["b"]});var bc=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-snackbar",{attrs:{color:e.snackbar.color,timeout:e.snackbar.timeout,top:""},scopedSlots:e._u([{key:"action",fn:function(t){var n=t.attrs;return[a("v-btn",e._b({attrs:{text:""},on:{click:function(t){e.snackbar.active=!1}}},"v-btn",n,!1),[e._v("Close")])]}}]),model:{value:e.snackbar.active,callback:function(t){e.$set(e.snackbar,"active",t)},expression:"snackbar.active"}},[a("span",[e._v(e._s(e.snackbar.notification))])])},hc=[],gc=Object(r["defineComponent"])({name:"XSnackbar",setup:function(){return{snackbar:ve()}}}),yc=gc,Oc=a("26fb"),xc=Object(h["a"])(yc,bc,hc,!1,null,"29f4304c",null),jc=xc.exports;y()(xc,{VBtn:Ge["a"],VSnackbar:Oc["a"]});var _c=Object(r["defineComponent"])({name:"App",components:{UptraceLogoLarge:_,UptraceLogoSmall:V,ProjectPicker:fc,XSnackbar:jc},setup:function(){var e=l(),t=e.router;d();var a=Object(r["shallowRef"])("");function n(){a.value&&(t.push({name:"TraceShow",params:{traceId:a.value}}),a.value="")}return{traceId:a,jumpToTrace:n}}}),Cc=_c,wc=(a("8a92"),a("3b39")),kc=a("75df"),Sc=a("4ea5"),Pc=a("4955"),Vc=Object(h["a"])(Cc,o,s,!1,null,"432a4c36",null),qc=Vc.exports;y()(Vc,{VApp:wc["a"],VAppBar:kc["a"],VBtn:Ge["a"],VCol:$t["a"],VContainer:It["a"],VFooter:Sc["a"],VMain:Pc["a"],VRow:Bt["a"],VSpacer:We["a"],VTab:ze["a"],VTabs:Je["a"],VTextField:Mr["a"]});a("b20f");var Tc=a("a69d");n["default"].directive("frag",Tc["a"]);var Rc=a("654b");Object(Rc["a"])(pe.a,{retries:2,retryDelay:Rc["a"].exponentialDelay}),pe.a.interceptors.request.use((function(e){return e.baseURL=Object({NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_BASE_URL,e.withCredentials=!0,e})),pe.a.interceptors.response.use((function(e){return e}),(function(e){var t;return 401===(null===(t=e.response)||void 0===t?void 0:t.status)&&dc(),Promise.reject(e)}));a("3468"),a("365e"),a("c058"),a("e52c"),a("fdca");var Ic=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page-toolbar",class:e.color},[e.loading?a("v-progress-linear",{attrs:{absolute:"",indeterminate:""}}):e._e(),a("v-container",{staticClass:"py-0",attrs:{fluid:e.fluid}},[a("v-row",{staticClass:"ma-0"},[a("v-col",{staticClass:"pa-0"},[a("v-toolbar",{attrs:{flat:"",color:"transparent",height:"auto"}},[e._t("default")],2)],1)],1)],1)],1)},Ec=[],Mc=Object(r["defineComponent"])({name:"PageToolbar",props:{loading:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1},color:{type:String,default:"light-blue lighten-5"}},setup:function(){return{}}}),Dc=Mc,Lc=(a("87c2"),Object(h["a"])(Dc,Ic,Ec,!1,null,null,null)),Nc=Lc.exports;y()(Lc,{VCol:$t["a"],VContainer:It["a"],VProgressLinear:Tn["a"],VRow:Bt["a"],VToolbar:$n["a"]});var $c=Object(r["defineComponent"])({name:"XPlaceholder",setup:function(e,t){return function(){return t.slots.placeholder?Bc(t.slots.placeholder()):t.slots.default?Bc(t.slots.default()):void 0}}});function Bc(e){return Array.isArray(e)&&e.length>1?Object(r["h"])("div",e):e}var Ac,Fc,Gc,Xc,Uc=$c,Hc=Object(h["a"])(Uc,Ac,Fc,!1,null,null,null),Qc=Hc.exports,Wc=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.pager.numPage>1?a("v-row",{attrs:{align:"center",justify:"space-between","no-gutters":""}},[a("v-col",{attrs:{cols:"2"}}),a("v-col",[a("v-pagination",{attrs:{"total-visible":7,length:e.pager.numPage},model:{value:e.pager.page,callback:function(t){e.$set(e.pager,"page",t)},expression:"pager.page"}})],1),a("v-col",{staticClass:"text-right",attrs:{cols:"2"}},[e.pager.numItem?a("XPager",{attrs:{pager:e.pager,"without-prev-next":""}}):e._e()],1)],1):e._e()},zc=[],Kc=n["default"].component("XPager",{functional:!0,props:{pager:{type:Object,required:!0},withoutPrevNext:{type:Boolean,default:!1}},render:function(e,t){var a=t.props,n=t.data,r=[e("span",{class:"text-body-2"},"".concat(a.pager.pos.start+1," - ").concat(a.pager.pos.end," of ")+"".concat(a.pager.numItem))];return a.withoutPrevNext||(r.push(e(Ge["a"],{class:{"ml-2":!0},props:{icon:!0,disabled:!a.pager.hasPrev},on:{click:a.pager.prev}},[e(Qe["a"],"mdi-chevron-left")])),r.push(e(Ge["a"],{props:{icon:!0,disabled:!a.pager.hasNext},on:{click:a.pager.next}},[e(Qe["a"],"mdi-chevron-right")]))),e("span",Object(L["a"])({},n),r)}}),Jc=Kc,Zc=Object(h["a"])(Jc,Gc,Xc,!1,null,"518cdcf5",null),Yc=Zc.exports,el=Object(r["defineComponent"])({name:"XPagination",components:{XPager:Yc},props:{pager:{type:Object,required:!0}}}),tl=el,al=a("c31e"),nl=Object(h["a"])(tl,Wc,zc,!1,null,"68dec63a",null),rl=nl.exports;y()(nl,{VCol:$t["a"],VPagination:al["a"],VRow:Bt["a"]});var ol,sl,il=n["default"].component("XNum",{functional:!0,props:{value:{type:void 0,required:!0},name:{type:String,default:""}},render:function(e,t){var a=t.props,n=sa(a.name,a.value),r=xa(n);return e("span",r(a.value))}}),ul=il,cl=Object(h["a"])(ul,ol,sl,!1,null,"6fba924e",null),ll=cl.exports,dl=a("71bc"),pl=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-sheet",{staticClass:"my-0 x-code",class:{"x-code--wrap":e.wrap},attrs:{color:"grey lighten-5"}},[a("prism",{attrs:{code:e.code,inline:e.inline,language:e.language}})],1)},vl=[],ml=a("c45e"),fl=a.n(ml),bl=Object(r["defineComponent"])({name:"XCode",components:{Prism:fl.a},props:{code:{type:String,required:!0},language:{type:String,default:"markup"},inline:{type:Boolean,default:!1}},setup:function(e){var t=Object(r["computed"])((function(){return!e.code.includes("\n")}));return{wrap:t}}}),hl=bl,gl=(a("5a7a"),Object(h["a"])(hl,pl,vl,!1,null,null,null)),yl=gl.exports;y()(gl,{VSheet:gn["a"]});var Ol=n["default"].component("XText",{functional:!0,props:{name:{type:String,default:""},value:{type:void 0,required:!0}},render:function(e,t){var a=t.props,n=t.data;if(Array.isArray(a.value))return e("span",n,a.value.join(", "));switch(Object(dl["a"])(a.value)){case"object":return e(yl,{props:{code:JSON.stringify(a.value,null,2)}});case"string":var r=xl(a.value);if("object"===Object(dl["a"])(r))return e(yl,{props:{code:JSON.stringify(r,null,2)}});break}return jl(a.value)?e(yl,{props:{code:a.value}}):e(ll,{props:{name:a.name,value:a.value}})}});function xl(e){try{return JSON.parse(e)}catch(t){return}}function jl(e){return"string"===typeof e&&e.includes("\n")}var _l,Cl,wl,kl,Sl,Pl,Vl=Ol,ql=Object(h["a"])(Vl,_l,Cl,!1,null,"44e08f33",null),Tl=ql.exports,Rl=n["default"].component("XDate",{functional:!0,props:{date:{type:[String,Date],required:!0}},render:function(e,t){var a=t.props,n=t.data,r=ee(a.date);return e("span",n,te(r))}}),Il=Rl,El=Object(h["a"])(Il,wl,kl,!1,null,"5c2cf197",null),Ml=El.exports,Dl=n["default"].component("XDuration",{functional:!0,props:{duration:{type:Number,default:void 0}},render:function(e,t){var a=t.props,n=ya(a.duration);return e("span",n)}}),Ll=Dl,Nl=Object(h["a"])(Ll,Sl,Pl,!1,null,"77d6d3b7",null),$l=Nl.exports;n["default"].component("PageToolbar",Nc),n["default"].component("XPlaceholder",Qc),n["default"].component("XPagination",rl),n["default"].component("XNum",ll),n["default"].component("XText",Tl),n["default"].component("XDate",Ml),n["default"].component("XDuration",$l),n["default"].component("XCode",yl);var Bl=a("85af");n["default"].use(Bl["a"]);var Al=new Bl["a"]({});n["default"].use(r["default"]),n["default"].config.productionTip=!1,new n["default"]({router:cc,vuetify:Al,render:function(e){return e(qc)}}).$mount("#app")},ce7b:function(e,t,a){"use strict";a("b19c")},d1ab:function(e,t,a){},d36a:function(e,t,a){"use strict";a("d1ab")},d502:function(e,t,a){"use strict";a("8f56")},d798:function(e,t,a){},e4c5:function(e,t,a){"use strict";a("c867")}});
  //# sourceMappingURL=app.d4686b58.js.map