@ytsaurus/ui 1.95.0 → 1.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/build/assets-manifest.json +31 -29
- package/dist/public/build/css/1454.e1b6441b.chunk.css +2 -0
- package/dist/public/build/css/1454.e1b6441b.chunk.css.map +1 -0
- package/dist/public/build/css/333.4b28585f.chunk.css +2 -0
- package/dist/public/build/css/333.4b28585f.chunk.css.map +1 -0
- package/dist/public/build/css/4592.687b04fa.chunk.css +2 -0
- package/dist/public/build/css/4592.687b04fa.chunk.css.map +1 -0
- package/dist/public/build/css/8944.c58273b7.chunk.css +2 -0
- package/dist/public/build/css/8944.c58273b7.chunk.css.map +1 -0
- package/dist/public/build/css/{navigation.32b6fca4.chunk.css → navigation.4b7a1ff3.chunk.css} +2 -2
- package/dist/public/build/css/navigation.4b7a1ff3.chunk.css.map +1 -0
- package/dist/public/build/js/1016.3ced9e8b.chunk.js +2 -0
- package/dist/public/build/js/1016.3ced9e8b.chunk.js.map +1 -0
- package/dist/public/build/js/2150.647430c7.chunk.js +2 -0
- package/dist/public/build/js/2150.647430c7.chunk.js.map +1 -0
- package/dist/public/build/js/cluster-page-wrapper.605a5ad5.chunk.js +2 -0
- package/dist/public/build/js/{cluster-page-wrapper.fe57aae8.chunk.js.map → cluster-page-wrapper.605a5ad5.chunk.js.map} +1 -1
- package/dist/public/build/js/dashboard.2150185c.chunk.js +3 -0
- package/dist/public/build/js/dashboard.2150185c.chunk.js.map +1 -0
- package/dist/public/build/js/main.56182cbb.js +3 -0
- package/dist/public/build/js/main.56182cbb.js.map +1 -0
- package/dist/public/build/js/navigation.e85f53e0.chunk.js +2 -0
- package/dist/public/build/js/navigation.e85f53e0.chunk.js.map +1 -0
- package/dist/public/build/js/runtime.ed973fa5.js +2 -0
- package/dist/public/build/js/runtime.ed973fa5.js.map +1 -0
- package/dist/public/build/js/{yt-df-dialog.ba05eea6.chunk.js → yt-df-dialog.e8489fd1.chunk.js} +3 -3
- package/dist/public/build/js/yt-df-dialog.e8489fd1.chunk.js.map +1 -0
- package/dist/public/build/manifest.json +26 -24
- package/package.json +2 -2
- package/dist/public/build/css/1454.cc1b5254.chunk.css +0 -2
- package/dist/public/build/css/1454.cc1b5254.chunk.css.map +0 -1
- package/dist/public/build/css/333.dc69b4bd.chunk.css +0 -2
- package/dist/public/build/css/333.dc69b4bd.chunk.css.map +0 -1
- package/dist/public/build/css/6975.7cc85b1a.chunk.css +0 -2
- package/dist/public/build/css/6975.7cc85b1a.chunk.css.map +0 -1
- package/dist/public/build/css/navigation.32b6fca4.chunk.css.map +0 -1
- package/dist/public/build/js/1016.d5d3729e.chunk.js +0 -2
- package/dist/public/build/js/1016.d5d3729e.chunk.js.map +0 -1
- package/dist/public/build/js/45.12c412c1.chunk.js +0 -2
- package/dist/public/build/js/45.12c412c1.chunk.js.map +0 -1
- package/dist/public/build/js/cluster-page-wrapper.fe57aae8.chunk.js +0 -2
- package/dist/public/build/js/dashboard.0a7085cc.chunk.js +0 -3
- package/dist/public/build/js/dashboard.0a7085cc.chunk.js.map +0 -1
- package/dist/public/build/js/main.0aacb164.js +0 -3
- package/dist/public/build/js/main.0aacb164.js.map +0 -1
- package/dist/public/build/js/navigation.f37d6960.chunk.js +0 -2
- package/dist/public/build/js/navigation.f37d6960.chunk.js.map +0 -1
- package/dist/public/build/js/runtime.f44b62dd.js +0 -2
- package/dist/public/build/js/runtime.f44b62dd.js.map +0 -1
- package/dist/public/build/js/yt-df-dialog.ba05eea6.chunk.js.map +0 -1
- /package/dist/public/build/js/{dashboard.0a7085cc.chunk.js.LICENSE.txt → dashboard.2150185c.chunk.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{main.0aacb164.js.LICENSE.txt → main.56182cbb.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{yt-df-dialog.ba05eea6.chunk.js.LICENSE.txt → yt-df-dialog.e8489fd1.chunk.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[45],{203:()=>{},9331:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(77810),i=n(76872),a=n(88787),o=n(64922),s=(0,i.A)("expand-icon");function l(e){var t=e.className,n=e.data,i=e.expanded,l=e.visible,u=e.onClick,c=i?"angle-up":"angle-down",d=r.useCallback((function(){u&&u(n,i)}),[n,u,i]);return(0,o.jsx)("span",{className:s({visible:Boolean(l),clickable:void 0!==u},t),onClick:d,children:(0,o.jsx)(a.A,{awesome:c})})}},11687:(e,t,n)=>{"use strict";n.d(t,{F:()=>S});var r=n(64922),i=n(72890),a=n(6542),o=n(84099),s=n(32235),l=n(17774),u=n(40590),c=n(70243),d=n(77810);const p=d.createContext(null),m=()=>{const e=d.useContext(p);if(!e)throw new Error('Alert: `useAlertContext` hook is used out of "AlertContext"');return e},h=e=>{const{view:t}=m();return(0,r.jsx)(a.$,Object.assign({view:"filled"===t?"normal-contrast":void 0},e))};const f=(0,n(21086).om)("alert"),v=({layout:e,view:t,children:n})=>(0,r.jsx)(p.Provider,{value:{layout:e,view:t},children:n});var g=n(12663);var A=n(44315);var b=n(16822);var j=n(71182);const x={danger:{filled:e=>d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94z",clipRule:"evenodd"})),outlined:e=>d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0M6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94z",clipRule:"evenodd"}))},info:{filled:e=>d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0M8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75",clipRule:"evenodd"})),outlined:g.A},success:{filled:e=>d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m3.1-8.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08z",clipRule:"evenodd"})),outlined:A.A},warning:{filled:e=>d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),d.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.835 2.244c.963-1.665 3.367-1.665 4.33 0l4.916 8.505c.964 1.666-.24 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.165-3.751zM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5m1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0",clipRule:"evenodd"})),outlined:b.A},utility:{filled:e=>d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),d.createElement("path",{fill:"currentColor",d:"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.22 2.22 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414"})),outlined:j.A},normal:null};var y=n(89648),_=n(37338);const w=JSON.parse('{"label_close":"Close"}'),k=JSON.parse('{"label_close":"Закрыть"}'),N=(0,_.N)({en:w,ru:k},"Alert"),S=e=>{const{theme:t="normal",view:n="filled",layout:d="vertical",message:p,className:m,corners:h,style:g,onClose:A,align:b,qa:j}=e;return(0,r.jsx)(v,{layout:d,view:n,children:(0,r.jsx)(o.Z,{style:g,className:f({corners:h},(0,u.Y)({py:4,px:5},m)),theme:t,view:n,qa:j,children:(0,r.jsxs)(c.s,{gap:"3",alignItems:b,children:[void 0===e.icon?(0,r.jsx)(S.Icon,{theme:t,view:n}):e.icon,(0,r.jsxs)(c.s,{direction:"vertical"===d?"column":"row",gap:"5",grow:!0,children:[(0,r.jsx)(c.s,{gap:"2",grow:!0,className:f("text-content"),children:(0,r.jsxs)(c.s,{direction:"column",gap:"1",grow:!0,justifyContent:b,children:["string"==typeof e.title?(0,r.jsx)(S.Title,{text:e.title}):e.title,p]})}),Array.isArray(e.actions)?(0,r.jsx)(S.Actions,{items:e.actions}):e.actions]}),A&&(0,r.jsx)(a.$,{view:"flat",className:f("close-btn"),onClick:A,extraProps:{"aria-label":N("label_close")},children:(0,r.jsx)(s.I,{data:i.A,size:18,className:(0,l.$)({color:"secondary"})})})]})})})};S.Icon=({className:e,theme:t,view:n="filled",size:i=18})=>{const a=x[t];if(!a)return null;let o;return"success"===t?o="positive":"normal"!==t&&(o=t),(0,r.jsx)("div",{className:f("icon",(0,l.$)({color:o},e)),children:(0,r.jsx)(s.I,{data:a[n],size:i})})},S.Title=({text:e,className:t})=>(0,r.jsx)(y.E,{variant:"subheader-2",className:f("title",t),children:e}),S.Actions=({items:e,children:t,className:n})=>{const{layout:i}=m();return(0,r.jsx)(c.s,{className:f("actions",{minContent:"horizontal"===i},n),direction:"row",gap:"3",wrap:!0,alignItems:"horizontal"===i?"center":"flex-start",children:(null==e?void 0:e.map((({handler:e,text:t},n)=>(0,r.jsx)(h,{onClick:e,children:t},n))))||t})},S.Action=h},14880:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(40319),i=n(18801),a=(n(77810),n(15647)),o=n(97536),s=n(57614),l=n(64922),u=["title","getPathProps","path","exactPath","attribute","attributes","openAttributesModal","withTooltip","tooltipProps"];const c=(0,a.Ng)(null,{openAttributesModal:s.V6})((function(e){var t=e.title,n=e.getPathProps,a=void 0===n?function(){return{}}:n,s=e.path,c=e.exactPath,d=e.attribute,p=e.attributes,m=e.openAttributesModal,h=e.withTooltip,f=void 0===h||h,v=e.tooltipProps,g=void 0===v?{placement:"bottom-end",content:"Show attributes"}:v,A=(0,i.A)(e,u);return(0,l.jsx)(o.A,(0,r.A)((0,r.A)({},A),{},{tooltipProps:g,withTooltip:f,onClick:function(){var e=(0,r.A)({path:s,exactPath:c},a());m((0,r.A)((0,r.A)({title:t},e),{},{attribute:d,attributes:p}))}}))}))},15672:(e,t,n)=>{"use strict";n.d(t,{t1:()=>r.t}),n(40319),n(77810);var r=n(54299);n(64922),r.S},21952:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(40319),i=n(29121),a=n(12937),o=n(66134),s=n(10785),l=n(77810),u=n(75826),c=n.n(u),d=n(76872),p=n(5992),m=n(96843),h=n.n(m),f=n(14880),v=n(11394),g=n(49133),A=n(41652),b=n(11970),j=n(16727),x=n(51744),y=n(73822),_=n(68175),w=n(53332),k={state:{align:"left",get:function(e){return e.state}},phase:{align:"left",caption:"State : Phase",get:function(e){if("total"===e.state)return"Total";var t=y.A.format.Readable,n=t(e.state),r=t(e.phase||y.A.format.NO_VALUE);return"".concat(n," : ").concat(r)}},progress:{align:"center",caption:"",get:function(e){return{value:e.progress&&e.progress.duration,theme:{initializing:"grass",preparing:"mint",pending:"aqua",materializing:"bluejeans",running:"lavander",completing:"grapefruit",reviving:"bittersweet",reviving_jobs:"sunflower",failed:"grapefruit"}[e.state]||"mediumgray"}}},duration:{align:"right",get:function(e){return e.duration}},start_time:{align:"left",get:function(e){return e.time}},actions:{align:"center",caption:""}},N="default",S="withActions";function T(e,t){var n=function(e){return{theme:"light",striped:!1,virtual:!0,header:!1,size:"m",computeKey:function(e){return e.state+"/"+e.time},columns:{items:(0,w.TU)(k),sets:(0,_.A)((0,_.A)({},N,{items:[e,"progress","duration","start_time"]}),S,{items:[e,"progress","duration","start_time","actions"]}),mode:N}}}(t),i=n;return e&&((i=(0,r.A)({},n)).columns=(0,r.A)((0,r.A)({},i.columns),{},{mode:S})),i}var C=n(64922),R=(c().array,(0,d.A)("events")),E=(0,d.A)("operation-detail"),I=(0,p.Zz)(A.A,g.A)(v.A);function P(e,t){var n;return null===(n=k[t])||void 0===n?void 0:n.get(e)}var O=function(e){function t(){return(0,i.A)(this,t),(0,o.A)(this,t,arguments)}return(0,s.A)(t,e),(0,a.A)(t,[{key:"templates",get:function(){return{start_time:function(e,t){var n=P(e,t);return n?(0,C.jsx)(j.Bj.Time,{time:n,settings:{format:"full"},valueFormat:"DateTime"}):null},finish_time:function(e,t){var n=P(e,t);return n?(0,C.jsx)(j.Bj.Time,{time:n,settings:{format:"full"},valueFormat:"DateTime"}):null},duration:function(e,t){if(x.Jh.isFinalState(e))return y.A.format.NO_VALUE;var n=P(e,t);return(0,C.jsx)(j.Bj.Time,{time:n,settings:{format:"milliseconds"},valueFormat:"TimeDuration"})},progress:function(e,t){if(x.Jh.isNotFinalState(e)&&"total"!==e.state){var n=e.progress.duration,r=P(e,t),i=r.theme,a=r.value;return(0,C.jsxs)("div",{className:E("events-progress",{theme:i}),children:[(0,C.jsx)("span",{className:E("events-progress-percentage","elements-secondary-text"),children:y.A.format.Percent(n)}),(0,C.jsx)(b.k,{value:a,size:"s"})]})}},state:function(e,t){var n=P(e,t);return(0,C.jsx)(j.Bj.Readable,{value:n})},phase:function(e,t){var n=P(e,t);return(0,C.jsx)(j.Bj.Readable,{value:n})},actions:function(e){var t=(e||{}).attributes;return h()(t)?null:(0,C.jsx)(f.A,{title:"Event attributes",attributes:e.attributes})}}}},{key:"render",value:function(){var e=this.props,t=e.events,n=e.type,i=t.slice(),a=i.pop(),o=a.showAttributesColumn;return(0,C.jsx)("div",{className:R(),children:(0,C.jsx)(I,(0,r.A)((0,r.A)({},T(o,n)),{},{items:i,css:R(),footer:a,templates:this.templates}))})}}])}(l.Component);O.defaultProps={type:"state"}},25820:function(e){e.exports=function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,s=31536e6,l=2628e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,c={years:s,months:l,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof A},p=function(e,t,n){return new A(e,n,t.$l)},m=function(e){return t.p(e)+"s"},h=function(e){return e<0},f=function(e){return h(e)?Math.ceil(e):Math.floor(e)},v=function(e){return Math.abs(e)},g=function(e,t){return e?h(e)?{negative:!0,format:""+v(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},A=function(){function h(e,t,n){var r=this;if(this.$d={},this.$l=n,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),t)return p(e*c[m(t)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(t){r.$d[m(t)]=e[t]})),this.calMilliseconds(),this;if("string"==typeof e){var i=e.match(u);if(i){var a=i.slice(2).map((function(e){return null!=e?Number(e):0}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var v=h.prototype;return v.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*c[n]}),0)},v.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=f(e/s),e%=s,this.$d.months=f(e/l),e%=l,this.$d.days=f(e/a),e%=a,this.$d.hours=f(e/i),e%=i,this.$d.minutes=f(e/r),e%=r,this.$d.seconds=f(e/n),e%=n,this.$d.milliseconds=e},v.toISOString=function(){var e=g(this.$d.years,"Y"),t=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=g(n,"D"),i=g(this.$d.hours,"H"),a=g(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=g(o,"S"),l=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,u=i.format||a.format||s.format?"T":"",c=(l?"-":"")+"P"+e.format+t.format+r.format+u+i.format+a.format+s.format;return"P"===c||"-P"===c?"P0D":c},v.toJSON=function(){return this.toISOString()},v.format=function(e){var n=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return n.replace(o,(function(e,t){return t||String(r[e])}))},v.as=function(e){return this.$ms/c[m(e)]},v.get=function(e){var t=this.$ms,n=m(e);return"milliseconds"===n?t%=1e3:t="weeks"===n?f(t/c[n]):this.$d[n],t||0},v.add=function(e,t,n){var r;return r=t?e*c[m(t)]:d(e)?e.$ms:p(e,this).$ms,p(this.$ms+r*(n?-1:1),this)},v.subtract=function(e,t){return this.add(e,t,!0)},v.locale=function(e){var t=this.clone();return t.$l=e,t},v.clone=function(){return p(this.$ms,this)},v.humanize=function(t){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},v.valueOf=function(){return this.asMilliseconds()},v.milliseconds=function(){return this.get("milliseconds")},v.asMilliseconds=function(){return this.as("milliseconds")},v.seconds=function(){return this.get("seconds")},v.asSeconds=function(){return this.as("seconds")},v.minutes=function(){return this.get("minutes")},v.asMinutes=function(){return this.as("minutes")},v.hours=function(){return this.get("hours")},v.asHours=function(){return this.as("hours")},v.days=function(){return this.get("days")},v.asDays=function(){return this.as("days")},v.weeks=function(){return this.get("weeks")},v.asWeeks=function(){return this.as("weeks")},v.months=function(){return this.get("months")},v.asMonths=function(){return this.as("months")},v.years=function(){return this.get("years")},v.asYears=function(){return this.as("years")},h}(),b=function(e,t,n){return e.add(t.years()*n,"y").add(t.months()*n,"M").add(t.days()*n,"d").add(t.hours()*n,"h").add(t.minutes()*n,"m").add(t.seconds()*n,"s").add(t.milliseconds()*n,"ms")};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){var n=i.locale();return p(e,{$l:n},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?b(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?b(this,e,-1):o.bind(this)(e,t)}}}()},30045:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>uc});var r=n(77810),i=n(76872),a=n(64965),o=n(9736),s=n(68175),l=n(40319),u=n(15647),c=n(96833),d=n.n(c),p=n(65304),m=n.n(p),h=n(27528),f=n.n(h),v=n(75414),g=n.n(v),A=n(13322),b=n(29121),j=n(12937),x=n(66134),y=n(10785),_=n(75826),w=n.n(_),k=n(42321),N=n(29746),S=n(73822);function T(e){return S.A.format.SmallNumber(e,{significantDigits:4})}var C=n(84092),R=n.n(C),E=n(53775),I=n(28407),P=n(10720),O=n(40519),z=n(97270),M=n(39760),V=n.n(M),F=n(17239),D=n.n(F),L=n(63281),B=n.n(L);function J(e){return!D()(e,(function(e){return Boolean(N.A.getValue(e))}))}function U(e){return N.A.getValue(e,"/@progress/tasks")}var H=n(70353),$=n(49214),W=n.n($),q=n(7787),Y=n(85593),G="tasks/";function K(e){return{path:N.A.getValue(e),originalPath:N.A.getValue(e,"/@original_path"),name:N.A.getValue(e,"/@file_name"),executable:N.A.getBoolean(e,"/@executable")}}function Z(e){var t=f()(e,(function(e,t){return{name:t,value:e}}));return B()(t,"name")}function X(e){var t=N.A.getValue(e,"/@spec/started_by"),n=N.A.getValue(t,"/command")||[],r=W()(Z(t),(function(e){return"command"!==e.name}));if(r.length||n.length)return{fields:r,command:n}}function Q(e){var t=N.A.getValue(e,"/@spec/transfer_manager");if(t)return{id:t.task_id,url:q.Ay.makeUrlForTransferTask(e)}}function ee(e,t,n){if(e.isRunning()){var r=e.getLivePreviewPath(t,n),i=r.path,a=r.virtualPath;if(a)return{path:a,supported:!0};if(i)return{path:i,transaction:N.A.getValue(e,"/@async_scheduler_transaction_id"),supported:!0}}return{supported:!1}}function te(e){var t,n=function(e){var t=N.A.getValue(e,"/@ranges");if(void 0===t){var n,r=N.A.getValue(e,"/@upper_limit"),i=N.A.getValue(e,"/@lower_limit");void 0!==r&&((n=n||{}).upper_limit=r),void 0!==i&&((n=n||{}).lower_limit=i),n&&(t=[n]),n&&(t=[n])}return t}(e),r=N.A.getValue(e,"/@columns");return n&&((t=t||{}).ranges=n),r&&((t=t||{}).columns=r),t}function ne(e,t,n,r,i,a){var o=N.A.getValue(n),s=N.A.getValue(n,"/@cluster"),u=N.A.getValue(n,"/@original_path"),c=function(e,t,n,r){return N.A.get(n,"/@transaction_id")||("running"===e.state?N.A.get(e,"/@".concat("stderr"===t?"debug_output":t,"_transaction_id")):r?N.A.get(e,"/@user_transaction_id"):void 0)}(e,t,n,i);return(0,l.A)((0,l.A)({path:o},s?{cluster:s}:{}),{},{originalPath:u,transaction:c,livePreview:ee(e,t,a),append:N.A.getBoolean(n,"/@append"),teleport:N.A.getBoolean(n,"/@teleport"),primary:N.A.getBoolean(n,"/@primary"),foreign:N.A.getBoolean(n,"/@foreign"),filters:te(n),typedFilters:te(r)})}function re(e){var t,n=[];return V()(e,(function(e){try{var r=e.cluster,i=N.A.YPath.create(e.path,"absolute"),a=i.getKey(),o=i.toSubpath(-2).stringify(),s=r?"".concat(r,":").concat(o):o;t!==s&&(t=s,n.push((0,l.A)({path:o,transaction:e.transaction,isFolder:!0},r?{cluster:r}:{}))),n.push(Object.assign(e,{name:a}))}catch(e){console.error("groupTables error",e)}})),n}function ie(e,t){var n,r="input";switch(e.type){case"remote_copy":case"merge":case"map":case"reduce":case"map_reduce":case"sort":case"join_reduce":var i=N.A.get(e.$typedAttributes,"/spec/input_table_paths");n=N.A.get(e,"/@spec/input_table_paths"),n=f()(n,(function(n,a){return ne(e,r,n,i[a],t)}));break;case"erase":var a=N.A.get(e.$typedAttributes,"/spec/input_table_path");n=(n=N.A.get(e,"/@spec/table_path"))&&[ne(e,r,n,a,t)]}return re(n)}function ae(e,t){var n=N.A.get(e.$typedAttributes,"/spec/input_table_paths"),r=N.A.get(e,"/@spec/stderr_table_path");return re(r=r&&[ne(e,"stderr",r,n,t)])}function oe(e){var t=N.A.get(e.$typedAttributes,"/spec/core_table_path");return re(t?[ne(e,"core",t,[],!1)]:[])}function se(e,t){var n,r="output";switch(e.type){case"map":case"reduce":case"map_reduce":case"join_reduce":var i=N.A.get(e.$typedAttributes,"/spec/input_table_paths");n=N.A.get(e,"/@spec/output_table_paths"),n=f()(n,(function(n,a){return ne(e,r,n,i[a],t,a)}));break;case"merge":case"sort":case"remote_copy":var a=N.A.get(e.$typedAttributes,"/spec/input_table_path");n=(n=N.A.get(e,"/@spec/output_table_path"))&&[ne(e,r,n,a,t)]}return re(n)}function le(e){var t;switch(e.type){case"map_reduce":case"sort":t=ee(e,"intermediate")}if(t&&t.supported)return t}function ue(e){return 0===e.indexOf(G)?e.substring(G.length)+"_task":e}function ce(e,t){try{var n,r=N.A.getValue(e,"/@spec/"+t),i=N.A.getValue(r,"/environment");i=Z(i);var a=N.A.getValue(r,"/command"),o=N.A.getValue(r,"/class_name"),s=N.A.getValue(r,"/job_count"),l=f()(N.A.getValue(r,"/file_paths"),K),u=N.A.getValue(r,"/layer_paths");if(a||o||s||null!=l&&l.length||null!==(n=i)&&void 0!==n&&n.length)return{type:t,caption:ue(t),command:a,className:o,jobCount:s,files:l,environment:i,layerPaths:u}}catch(e){console.error("prepareScript error:",e)}}function de(e){var t=N.A.getValue(e,"/@spec/tasks");if(t)return f()(m()(t),(function(t){return ce(e,G+t)}))}function pe(e){return W()(e,(function(e){return!e.isFolder}))}function me(e,t){var n,r=[],i=0,a=(0,H.A)(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(o.isFolder||i++,i===t+1)break;r.push(o)}}catch(e){a.e(e)}finally{a.f()}return r}var he=n(51744),fe=n(29081);function ve(e){return(0,fe.fs)(q.Ay.docsUrls.faq+"#"+e.replace(/_/g,""))}var ge,Ae=n(24050),be=n(74360),je=n(18801),xe=n(41655),ye=n.n(xe),_e=n(18472),we=["id"],ke=function(){function e(t){(0,b.A)(this,e),this.id=void 0,this.$value=void 0,this.$attributes=void 0,this.state=void 0,this.pools=[];var n=t.id,r=(0,je.A)(t,we);this.$value=n,this.id=n,this.$attributes=r,this.state=N.A.getValue(r,"/state")}return(0,j.A)(e,[{key:"isRunning",value:function(){return-1!==e.RUNNING_STATES.indexOf(this.state)}},{key:"isPreparing",value:function(){return-1!==e.PREPARING_STATES.indexOf(this.state)}},{key:"inIntermediateState",value:function(){return-1!==e.INTERMEDIATE_STATES.indexOf(this.state)}},{key:"successfullyCompleted",value:function(){return"completed"===this.state}},{key:"computePools",value:function(e){var t=N.A.getValue(e,"/runtime_parameters/scheduling_options_per_pool_tree"),n=N.A.getValue(e,"/scheduling_attributes_per_pool_tree"),r=N.A.getValue(e,"/slot_index_per_pool_tree")||{};this.pools=f()(t,(function(e,t){var i=t,a=e.pool,o=N.A.getValue(n,"/".concat(i));return{tree:i,pool:a,isEphemeral:N.A.getValue(o,"/running_in_ephemeral_pool")||!1,isLightweight:N.A.getValue(o,"/running_in_lightweight_pool")||!1,slotIndex:r[t],weight:e.weight||1}}))}}])}();ge=ke,ke.PREPARING_STATES=["materializing","initializing","preparing","pending"],ke.RUNNING_STATES=["running","completing","failing","aborting","reviving"],ke.INTERMEDIATE_STATES=[].concat((0,A.A)(ge.RUNNING_STATES),(0,A.A)(ge.PREPARING_STATES));var Ne=function(e){function t(e){var n;(0,b.A)(this,t),(n=(0,x.A)(this,t,[e])).weight=void 0,n.title=void 0,n.type=void 0,n.user=void 0,n.suspended=void 0,n.input=void 0,n.output=void 0,n.startTime=void 0,n.finishTime=void 0,n.duration=void 0,n.jobs=void 0,n.completedJobs=void 0,n.runningJobs=void 0,n.failedJobs=void 0,n.totalJobs=void 0,n.completedJobsProgress=void 0,n.runningJobsProgress=void 0,n.jobsProgress=void 0;var r=n.$attributes,i=N.A.getValue(r,"/brief_spec");n.title=N.A.getValue(i,"/title"),n.type=N.A.getValue(r,"/type"),n.user=N.A.getValue(r,"/authenticated_user"),n.suspended=N.A.getValue(r,"/suspended");var a="remote_copy"===n.type?N.A.get(n,"/@brief_spec/cluster_name"):void 0;n.input=n.computeIOProperties(i,"input",a),n.output=n.computeIOProperties(i,"output"),n.computePools(r),1===n.pools.length&&(n.weight=n.pools[0].weight),n.startTime=N.A.getValue(r,"/start_time"),n.finishTime=N.A.getValue(r,"/finish_time"),n.duration=ye()(n.finishTime)-ye()(n.startTime);var o=N.A.getValue(r,"/brief_progress"),s=n.jobs=N.A.getValue(o,"/jobs");return void 0!==s&&(n.completedJobs="object"===(0,be.A)(s.completed)?s.completed.total:s.completed,n.runningJobs=s.running,n.failedJobs=s.failed,n.totalJobs=s.total,n.completedJobsProgress=n.completedJobs/n.totalJobs*100,n.runningJobsProgress=n.runningJobs/n.totalJobs*100,n.jobsProgress=n.completedJobsProgress+n.runningJobsProgress),n}return(0,y.A)(t,e),(0,j.A)(t,[{key:"computeIOProperties",value:function(e,t,n){var r=N.A.get(e,"/"+t+"_table_paths"),i={count:N.A.getValue(r,"/@count"),table:N.A.getValue(r,"/0"),url:void 0,remote:void 0};return n&&(i.url=function(e,t,n){return"/"+e+"/navigation?path="+t}(n,i.table),i.remote=!0),i}}])}(ke),Se=function(e){function t(e,n){var r;(0,b.A)(this,t),(r=(0,x.A)(this,t,[e])).$typedAttributes=void 0,r.alias=void 0,r.type=void 0,r.user=void 0,r.suspended=void 0,r.startTime=void 0,r.finishTime=void 0,r.duration=void 0,r.jobs=void 0,r.completedJobs=void 0,r.runningJobs=void 0,r.failedJobs=void 0,r.totalJobs=void 0,r.completedJobsProgress=void 0,r.runningJobsProgress=void 0,r.jobsProgress=void 0,r.totalFailedJobs=void 0,r.failedJobsProgress=void 0,r.description=void 0,r.title=void 0,r.typedSpec=void 0,r.typedProvidedSpec=void 0,r.typedFullSpec=void 0,r.typedUnrecognizedSpec=void 0,r.live_preview=void 0,r.$typedAttributes=n;var i=r.$attributes,a=r.$typedAttributes,o=N.A.getValue(i,"/spec"),s=N.A.getValue(i,"/full_spec");r.alias=N.A.getValue(o,"/alias"),r.typedSpec=N.A.getValue(a,"/spec"),r.typedProvidedSpec=N.A.getValue(a,"/provided_spec"),r.typedFullSpec=N.A.getValue(a,"/full_spec"),r.typedUnrecognizedSpec=N.A.getValue(a,"/unrecognized_spec"),r.title=N.A.getValue(o,"/title");var l=N.A.getValue(i,"/runtime_parameters/annotations");r.description=N.A.getValue(l,"/description"),r.description=r.description||N.A.getValue(o,"/description"),r.type=N.A.getValue(i,"/operation_type")||N.A.getValue(i,"/type"),r.user=N.A.getValue(i,"/authenticated_user"),r.suspended=N.A.getValue(i,"/suspended"),r.startTime=N.A.getValue(i,"/start_time"),r.finishTime=N.A.getValue(i,"/finish_time"),r.duration=ye()(r.finishTime)-ye()(r.startTime),r.computePools(i);var u=N.A.getValue(i,"/progress"),c=r.jobs=N.A.getValue(u,"/jobs");return void 0!==c&&(r.completedJobs="object"===(0,be.A)(c.completed)?c.completed.total:c.completed,r.runningJobs=c.running,r.totalJobs=c.total,r.completedJobsProgress=r.completedJobs/r.totalJobs*100,r.runningJobsProgress=r.runningJobs/r.totalJobs*100,r.jobsProgress=r.completedJobsProgress+r.runningJobsProgress,r.failedJobs=c.failed,s&&(r.totalFailedJobs=N.A.getValue(s,"/max_failed_job_count")),r.failedJobsProgress=r.totalFailedJobs?r.failedJobs/r.totalFailedJobs*100:0),r.live_preview=N.A.getValue(u,"/live_preview"),r}return(0,y.A)(t,e),(0,j.A)(t,[{key:"getLivePreviewPath",value:function(e,t){var n=N.A.getBoolean(this.live_preview,"/virtual_table_format/".concat(e,"_supported")),r=!n&&N.A.getBoolean(this.live_preview,"/".concat(e,"_supported")),i=n?"/controller_orchid/live_previews":"",a="//sys/operations/".concat(S.A.utils.extractFirstByte(this.id),"/").concat(this.id).concat(i);switch(e){case"output":return Te("".concat(a,"/output_").concat(t||0),n,r);case"stderr":return Te("".concat(a,"/stderr"),n,r);case"intermediate":return Te("".concat(a,"/intermediate"),n,r);case"core":return n?Te("".concat(a,"/core"),n,!1):{}}return{}}}])}(ke);function Te(e,t,n){return t?{virtualPath:e}:{path:n?e:void 0}}function Ce(e,t){return void 0===e?t:e}function Re(e){return function(t){var n=t.operations.jobs.filters[e];return Ce(n.value,n.defaultValue)}}var Ee=(0,_e.Mz)([Re("filterBy"),Re("jobId")],(function(e,t){return"id"===e&&Boolean(t)})),Ie=n(39686),Pe=n(53332),Oe=n(48971);function ze(e){var t="[0-9a-fA-F]{1,8}";return new RegExp("^".concat(t,"-").concat(t,"-").concat(t,"-").concat(t,"$")).test(e)}function Me(e){var t=new RegExp("^\\*[0-9a-zA-Z_-]+$");return ze(e)||t.test(e)}var Ve=n(76365),Fe=n(33952),De=n(27859),Le=n(52797),Be=n(35441),Je=(0,_e.Mz)([function(e){return N.A.getValue(e.operations.detail,"/operation/@runtime_parameters/erased_trees")}],(function(e){return g()(e,(function(e,t){return e[N.A.getValue(t)]=!0,e}),{})})),Ue=(0,_e.Mz)([function(e){return e.operations.detail.details.alert_events}],(function(e){var t={};return g()(e,(function(e,n){var r=N.A.getValue(n.alert_type),i=N.A.getNumberDeprecated(n,"/error/code",NaN);return!i&&t[r]?(t[r].to=N.A.getValue(n.time),delete t[r]):i?(e.push({from:N.A.getValue(n.time),type:r,error:n.error,url:ve(r)}),t[r]=e[e.length-1]):e.push({to:N.A.getValue(n.time),type:r,error:n.error,url:ve(r)}),e}),[])})),He=function(e){return e.operations.detail.operation},$e=function(e){return N.A.getValue(e.operations.detail.operation)},We=(0,_e.Mz)([He],(function(e){return N.A.getValue(e,"/@progress/tasks")})),qe=(0,_e.Mz)([We],(function(e){return f()(e,"task_name").sort()})),Ye=(0,_e.Mz)([function(e){return e.operations.detail.loading},function(e){return e.operations.detail.loaded},function(e){return e.operations.detail.error}],(function(e,t,n){return(0,Oe.Ts)(e,t,n)})),Ge=function(e){return e.operations.detail.operation.$typedAttributes},Ke=((0,_e.Mz)([function(e){return e.operations.detail.operation.pools}],(function(e){return f()(e,"pool")})),(0,_e.Mz)([function(e){return e.operations.detail.monitorChartStates}],(function(e){return g()(e,(function(e,t){return t?e+1:e}),0)})),(0,_e.Mz)([function(e){return e.operations.jobs.loading},function(e){return e.operations.jobs.loaded},function(e){return e.operations.jobs.error}],(function(e,t,n){return(0,Oe.Ts)(e,t,n)}))),Ze=(0,_e.Mz)([He],(function(e){return N.A.getValue(e,"/@experiment_assignments")})),Xe=(0,_e.Mz)([He],(function(e){return N.A.getNumberDeprecated(e,"/@brief_progress/registered_monitoring_descriptor_count")})),Qe=(0,_e.Mz)([Xe],(function(e){return{visible:e>0&&e<=200,maxJobCount:200}})),et=(0,_e.Mz)([function(e){return e.operations.detail.treeConfigs}],(function(e){return null==e?void 0:e.every((function(e){return"gpu"===e.config.main_resource}))})),tt=(0,_e.Mz)([$e,Le.jU],(function(e,t){var n=null==t?void 0:t.operation_performance_url_template;if(n)return{url:(0,Be.j)(n.url_template,{operation_id:e}),title:n.title}})),nt=new Ve.A,rt=new P.I,it=new Ve.A;function at(e){return function(t,n){var r=!ze(e),i=Object.assign({include_scheduler:!0,output_format:{$value:"json",$attributes:{stringify:!0,annotate_with_types:!0,encode_utf8:!1}}},r?{operation_alias:e}:{operation_id:e});return t({type:Ae.ZO.REQUEST,data:{isAlias:r,id:e}}),De.X8.getOperation(i,it).then(Ie.w1).then((function(r){var i=(0,o.A)(r,2),a=i[0],s=i[1],u=(0,Pe.VS)(a),c=new Se(u,a),d=function(){var r=(0,Ie.pj)(c),i=function(e,t){var n,r,i=function(e){if("remote_copy"===e.type)return{cluster:N.A.getValue(e,"/@spec/cluster_name"),network:N.A.getValue(e,"/@spec/network_name")}}(e);return{startedBy:X(e),remote:i,transferTask:Q(e),mode:N.A.getValue(e,"/@spec/mode"),input:(n=ie(e,t),r=null==i?void 0:i.cluster,r?f()(n,(function(e){return(0,l.A)((0,l.A)({},e),{},{remote:!0,url:(0,Y.K)((0,l.A)({cluster:r},e))})})):n),output:se(e,t),stderr:ae(e,t),intermediate:le(e),coredumps:oe(e),mapper:ce(e,"mapper"),reducer:ce(e,"reducer"),reduceCombiner:ce(e,"reduce_combiner"),tasks:de(e)}}(c,s),a=function(e){if(e)return f()(e,(function(e,t){return{error:e,helpURL:ve(t)}}))}(N.A.getValue(c,"/@alerts")),o=N.A.getValue(c,"/@alert_events"),u=function(e){if("aborted"===e.state||"failed"===e.state)return N.A.getValue(e,"/@result")}(c),d=function(e){var t=N.A.getValue(e,"/@progress");if(t&&e.isRunning()){var n=N.A.getValue(t,"/scheduling_info_per_pool_tree");return n&&f()(n,(function(e,t){return{progress:e,name:t}}))}}(c),p=(0,he.k7)(c),h=function(e){if(N.A.getValue(e,"/@progress")){var t=[],n=N.A.getValue(e,"/@progress/estimated_input_statistics");return n&&t.push({name:"Estimated input",value:n}),t.concat(function(e){if(U(e))return function(e){var t=N.A.getValue(e,"/@progress/data_flow"),n=N.A.getValue(e,"/@progress/tasks"),r=g()(t,(function(e,t){var n=t.source_name,r=t.target_name,i=t.job_data_statistics,a=t.teleport_data_statistics;return e.push({from:n,to:r,info:t,value:m()(i).reduce((function(e,t){var n=N.A.getValue(i[t]),r=N.A.getValue(a[t]);return e[t]=n+r,e}),{}),job_data_statistics:J(i)?null:i,teleport_data_statistics:J(a)?null:a}),e}),[]),i=g()(n,(function(e,t,n){return e[t.task_name]=n,e}),{});return B()(r,(function(e){var t=e.from;return"input"===t?-1:i[t]}))}(e);var t=N.A.getValue(e,"/@progress/data_flow_graph"),n=N.A.getValue(t,"/topological_ordering"),r=N.A.getValue(t,"/edges"),i=[];return t&&V()(n,(function(e){V()(r[e],(function(t,n){i.push({from:e,to:n,value:t.statistics})}))})),i}(e))}}(c);null!=u&&u.error&&(0,z.Qw)([u.error],(function(t){var r,i=N.A.getValue(t,"/attributes"),a=N.A.getValue(i,"/job_id"),o=null!==(r=i.$value)&&void 0!==r?r:i;if("string"==typeof a){var s=(0,Le.dB)(n());Object.assign(o,{job_id:{$attributes:{_type_tag:"url"},$value:{href:"".concat(window.location.origin,"/").concat(s,"/job/").concat(e,"/").concat(a),text:a}}})}}));var v,A,b={specification:i,alerts:a,alert_events:o,error:u,runtime:d,events:p,resources:h};t({type:Ae.ZO.SUCCESS,data:{operation:c,actions:r,details:b}}),t((v=e,function(e,t){var n=Qe(t()),r=n.visible,i=n.maxJobCount;if(r)return e({type:Ae.MZ.REQUEST}),De.Qq.listJobs(De.Vu.listJobs100,{parameters:{operation_id:v,limit:i,with_monitoring_descriptor:!0},cancellation:nt.removeAllAndSave}).then((function(t){var n=t.jobs;e({type:Ae.MZ.SUCCESS,data:{jobs:n,operation_id:v}})})).catch((function(t){(0,Ve.m)(t)?e({type:Ae.MZ.CANCELLED}):e({type:Ae.MZ.FAILURE,data:{error:t}})}))})),t((A=c.pools,function(e){var t=null==A?void 0:A.map((function(e){return e.tree}));return(0,Oe.fI)(De.Qq.executeBatch(De.Vu.operationTreeConfigs,{requests:t.map((function(e){return{command:"get",parameters:(0,l.A)({path:"//sys/pool_trees/".concat(e,"/@config")},O.R)}}))}),{toasterName:"operationTreeConfigs",skipSuccessToast:!0,batchType:"v3",errorTitle:"Failed to load tree configs"}).then((function(n){e({type:Ae.O2,data:{treeConfigs:n.map((function(e,n){return{tree:t[n],config:e.output}}))}})}))}))};c.inIntermediateState()?t(function(e,t){return function(){var n=(0,I.A)((0,E.A)().mark((function n(r){var i;return(0,E.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(i=N.A.get(e,"/@output_transaction_id"))||"0-0-0-0"===i){n.next=6;break}return r({type:Ae.M2.REQUEST}),n.abrupt("return",De.Qq.get(De.Vu.operationIntermediateResourceUsage,{path:"#"+i+"/@resource_usage"}).then((function(e){t();var n,i=(n=e,f()(n,(function(e,t){return(0,l.A)((0,l.A)({},e),{},{account:t})})));r({type:Ae.M2.SUCCESS,data:{resources:e,intermediateResources:i}})})).catch((function(){t(),r({type:Ae.M2.FAILURE})})));case 6:t(),r({type:Ae.M2.CANCELLED});case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}(c,d)):d()})).catch((function(r){var i=!n().operations.detail.loaded;r.code!==Fe.N.CANCELLED&&(i||rt.add({name:"get operation",autoHiding:!1,theme:"danger",title:"Failed to load operation",content:r.message,actions:[{label:" view",onClick:function(){return(0,Oe.eW)(r)}}]}),t({type:Ae.ZO.FAILURE,data:{message:'Error occured when loading operation "'.concat(e,'"'),details:r}}))}))}}var ot=n(29063),st=n(59028),lt=n(53144),ut=n.n(lt),ct=n(31470),dt=n.n(ct),pt=["state"],mt=function(e){return e.operations.list.filters},ht=function(e){var t;return(null===(t=e.operations.list.filters.poolTree.counters)||void 0===t?void 0:t.pool_tree_counts)||{}},ft=function(e){var t;return(null===(t=function(e){return mt(e).pool}(e).counters)||void 0===t?void 0:t.pool_counts)||{}},vt=function(e){var t;return(null===(t=function(e){return mt(e).user}(e).counters)||void 0===t?void 0:t.user_counts)||{}},gt=(0,_e.Mz)([ht],Nt),At=(0,_e.Mz)([Le.iq,ht],(function(e,t){return St(e,t)})),bt=(0,_e.Mz)([gt,At],ut()),jt=(0,_e.Mz)([ft],Nt),xt=(0,_e.Mz)([Le.K6,ft],St),yt=(0,_e.Mz)([jt,xt],ut()),_t=(0,_e.Mz)([vt],Nt),wt=(0,_e.Mz)([Le.Le,vt],St),kt=(0,_e.Mz)([_t,wt],ut());function Nt(e){return B()(f()(e,(function(e,t){return{value:t,text:t,counter:e}})),"text")}function St(e,t){return B()(f()(W()(e,(function(e){return void 0===t[e]})),(function(e){return{value:e,text:e}})),"text")}var Tt=[{value:"withStderr",text:"With stderr"},{value:"withFailContext",text:"With fail context"},{value:"withSpec",text:"With full input"},{value:"withCompetitors",text:"With competitive jobs"},{value:"withMonitoringDescriptor",text:"With monitoring descriptor"}],Ct=f()(Tt,(function(e){return e.value})),Rt=(0,_e.Mz)([mt],(function(e){var t=e.text,n=e.user,r=e.subject,i=e.permissions,a=e.pool,o=e.poolTree,s=e.state,u=e.type,c=e.failedJobs,d=Ot(r),p=Ot(i),m=d||(null==p?void 0:p.length)>0?{subject:d,permissions:p||[]}:void 0,h={filter:Ot(t),user:Ot(n),pool:Ot(a),pool_tree:Ot(o),type:Ot(u),with_failed_jobs:Ot(c),access:m};return(0,l.A)({state:Ot(s)},h)}));function Et(e){var t=e.operations.list.timeRange,n=t.from;return{to_time:t.to,from_time:n}}var It=(0,_e.Mz)([Rt,Le.ID,Et,Le.dB],(function(e,t,n,r){var i,a=n.from_time,o=n.to_time;if(null!==(i=(0,Le.lt)(r).operationPageSettings)&&void 0!==i&&i.disableOptimizationForYTFRONT2838)return e;var s=e.state,u=(0,je.A)(e,pt);return Boolean(a||o)&&!D()(u,Boolean)&&(u.user=t),(0,l.A)({state:s},u)})),Pt=(0,_e.Mz)([Rt,It],(function(e,t){if(!dt()(e,t))return t.user}));function Ot(e){return e.value===e.defaultValue?void 0:e.value}function zt(e,t){return t===ot.Uu.ARCHIVE?ye()(e).toISOString():void 0}function Mt(e,t){return t===ot.Uu.ARCHIVE?ye()(e).subtract(6,"hours").toISOString():void 0}function Vt(e){return(0,l.A)((0,l.A)((0,l.A)((0,l.A)({},function(e){return It(e)}(e)),Et(e)),{cursor_time:(t=e.operations.list.cursor).from,cursor_direction:t.direction}),{},{include_archive:e.operations.list.dataMode===ot.Uu.ARCHIVE,limit:20},O.R);var t}var Ft=n(19314),Dt=n(11896),Lt=["operations","incomplete"],Bt=new Ve.A;function Jt(e){var t=e.timestamp,n=e.direction,r=e.firstPageReached,i=e.lastPageReached,a=e.resetLoadingStatus,o=void 0===a||a;return{type:ot.DE,data:{timestamp:t,direction:n,firstPageReached:r,lastPageReached:i,resetLoadingStatus:o}}}function Ut(){return function(e,t){var n=t();return e(Ht((0,Le.dB)(n),Vt(n)))}}function Ht(e,t){return function(n){n({type:ot.bb});var r=new De.CT(e,Dt.c.OPERATIONS_LIST);return r.fetch(De.Vu.listOperations,De.Qq.listOperations(De.Vu.listOperations,{parameters:t,cancellation:Bt.removeAllAndSave})).then((function(e){var t=e.operations,i=e.incomplete,a=(0,je.A)(e,Lt);n(function(e){return function(t,n){var r=n().operations.list.cursor.direction;r===ot.Iv.PAST?t(Jt({lastPageReached:!e,resetLoadingStatus:!1})):r===ot.Iv.FUTURE&&t(Jt({firstPageReached:!e,resetLoadingStatus:!1}))}}(i)),n({type:ot.xX,data:r.wrap("parse",(function(){return f()(t,(function(e){return new Ne(e)}))}))}),n({type:ot.bZ,data:a})})).catch((function(e){e.code===R().codes.CANCELLED?n({type:ot.nO}):n({type:ot.ce,data:{message:"Could not load operations.",details:e}})}))}}function $t(){return Jt({timestamp:null,direction:ot.Iv.PAST,firstPageReached:!0,lastPageReached:!1})}function Wt(e,t){return function(n){n({type:ot.bS,data:{name:e,value:t}}),n($t())}}function qt(){return function(e,t){var n=t().operations.list.dataMode,r=ye()();e({type:ot.EE,data:{from:Mt(r,n),to:zt(r,n)}})}}function Yt(e,t){return function(n){n({type:ot.vk,data:{dataMode:ot.Uu.ARCHIVE,from:e,to:t}}),n($t())}}function Gt(){return{type:ot.FW}}var Kt=n(26264);function Zt(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:ot.dj,data:{operation:e,editable:t}}}var Xt=n(9262),Qt=n(64922),en=(0,i.A)("elements-heading"),tn=(0,i.A)("runtime");function nn(e){var t=(e.progress||{}).starvation_status;return(t?S.A.format.Readable(t):void 0)||null}w().arrayOf(w().shape({name:w().string.isRequired,progress:w().object.isRequired})),w().shape({$value:w().string,$attributes:w().object,type:w().string,user:w().string,pool:w().string,state:w().string,title:w().string,suspended:w().bool,duration:w().number,startTime:w().string,finishTime:w().string,description:w().object,pools:w().arrayOf(w().shape({tree:w().string.isRequired,pool:w().string.isRequired}))});var rn=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).handlePoolEditClick=function(){var t=e.props;(0,t.showEditPoolsWeightsModal)(t.operation)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderTree",value:function(e){var t,n,r=e.progress,i=e.name,a=this.props,o=a.cluster,s=a.operation,l=a.showEditPoolsWeightsModal,u=s.state,c={pool:r.pool,tree:i,weight:r.weight},d=N.A.getValue(s,"/@full_spec/is_gang");return(0,Qt.jsxs)("div",{className:tn("tree"),children:[(0,Qt.jsx)("div",{className:en({size:"s"}),children:S.A.format.ReadableField(i)}),(0,Qt.jsx)(k.Ay,{items:[[{key:"pool",value:(0,Qt.jsx)(Xt.s,{onEdit:this.handlePoolEditClick,cluster:o,state:u,pool:c,compact:!0})},{key:"weight",value:(0,Qt.jsx)(k.tJ,{operation:s,pool:c,onEdit:function(){return l(s)}})},{key:"fifo_index",value:(0,Qt.jsx)(k.Bj.FormattedValue,{value:r.fifo_index,format:"Number"})},{key:"fair_share",value:T(r.fair_share_ratio)},{key:"usage",value:T(r.usage_ratio)},{key:"demand",value:T(r.demand_ratio)}],[{key:"dominant_resource",value:S.A.format.Readable(r.dominant_resource)},{key:"Starvation status",value:(0,Qt.jsx)(nn,{progress:r})},{key:"scheduling_status",value:S.A.format.Readable(r.scheduling_status)},{key:"gang",value:d}].concat((0,A.A)(d?[{key:"scheduling_segment",value:S.A.format.Readable(r.scheduling_segment)}]:[]),[{key:"partitions",value:(null===(t=r.partitions)||void 0===t?void 0:t.completed)+" / "+(null===(n=r.partitions)||void 0===n?void 0:n.total),visible:Boolean(r.partitions)}])]})]},i)}},{key:"render",value:function(){var e=this,t=this.props.runtime;return(0,Qt.jsx)("div",{className:tn(),children:f()(t,(function(t){return e.renderTree(t)}))})}}])}(r.Component);const an=(0,u.Ng)(null,{showEditPoolsWeightsModal:Zt})(rn);var on=n(8208),sn=n(11960),ln=n(76426),un=n(78519),cn=n(24893),dn=(0,i.A)("operation-pools-weights"),pn=function(e){return g()(e,(function(e,t){var n=t.pool;return e[t.tree]=n,e}),{})},mn=function(e){return g()(e,(function(e,t){var n=t.weight;return e[t.tree]=String(n),e}),{})},hn=function(e){var t=e.cluster,n=e.operation,i=e.editable,a=e.pools,o=e.weights,u=e.setPools,c=e.setWeights;return f()(n.pools,(function(e){var n=e.tree,d=a[n],p="".concat(d," [").concat(n,"]"),m="/".concat(t,"/").concat(Kt.YW.SCHEDULING,"?tree=").concat(n,"&pool=").concat(d,"&tab=monitor");return(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)("div",{className:dn("pool","elements-form_field"),children:i?(0,Qt.jsx)(cn.k,{value:d,onUpdate:function(e){u((0,l.A)((0,l.A)({},a),{},(0,s.A)({},n,e)))}}):(0,Qt.jsx)("span",{className:"elements-ellipsis",children:(0,Qt.jsx)(ln.A,{url:m,title:p,children:(0,Qt.jsx)("span",{className:dn("pool-link"),children:d})})})}),(0,Qt.jsx)("div",{className:dn("tree","elements-form_field"),children:n}),(0,Qt.jsx)("div",{className:dn("weight","elements-form_field"),children:i?(0,Qt.jsx)(cn.k,{value:o[n],onUpdate:function(e){c((0,l.A)((0,l.A)({},o),{},(0,s.A)({},n,e)))}}):(0,Qt.jsx)("span",{className:"elements-ellipsis",children:o[n]})})]},n)}))},fn={hideEditPoolsWeightsModal:function(){return{type:ot.O8}},setPoolsAndWeights:function(e,t,n){var r=window.location.pathname.split("/"),i=3===r.length&&r[2]===Kt.YW.OPERATIONS,a=e.$value,o=g()(e.pools,(function(e,t){return e[t.tree]=t,e}),{});return function(e){e({type:ot.wn.REQUEST});var r=g()(t,(function(e,r,i){var a=o[i];return n[i]&&a.weight!==Number(n[i])&&(e[i]=Object.assign({},{weight:Number(n[i])})),a.pool!==t[i]&&(e[i]=Object.assign(e[i]||{},{pool:t[i]})),e}),{});return R().v3.updateOperationParameters({operation_id:a,_parameters:{scheduling_options_per_pool_tree:r}}).then((function(){e(i?Ut():at(a)),e({type:ot.wn.SUCCESS}),e({type:ot.O8})})).catch((function(t){t.code===R().codes.CANCELLED?e({type:ot.wn.CANCELLED}):e({type:ot.wn.FAILURE,data:{error:t}})}))}}};const vn=(0,u.Ng)((function(e){var t=e.operations.page.editWeightModal;return{loading:t.loading,loaded:t.loaded,error:t.error,errorData:t.errorData,visible:t.visible,editable:t.editable,operation:t.operation,cluster:(0,Le.dB)(e)}}),fn)((function(e){var t=e.operation,n=e.setPoolsAndWeights,i=(0,r.useState)(pn(t.pools)),a=(0,o.A)(i,2),s=a[0],u=a[1],c=(0,r.useState)(mn(t.pools)),p=(0,o.A)(c,2),h=p[0],f=p[1];(0,r.useEffect)((function(){u(pn(t.pools)),f(mn(t.pools))}),[t.$value]);var v=e.loading,g=e.error,A=e.errorData,b=e.visible,j=e.editable,x=e.hideEditPoolsWeightsModal,y=(0,Qt.jsxs)("div",{className:dn("title"),children:[j?"Edit":"View"," pools and weights"]});return(0,Qt.jsx)(sn.A,{size:"l",title:y,loading:v,visible:b,footer:j,confirmText:"Apply",onConfirm:function(){n(t,s,h)},onCancel:x,isConfirmDisabled:function(){var e={operation:t},n="completed"!==e&&"failed"!==e&&"aborted"!==e,r=d()(m()(h),(function(e){var t=Number(h[e]);return!isNaN(t)&&t>0})),i=d()(m()(s),(function(e){var t=s[e];return Boolean(t)}));return!n||!r||!i},content:(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)("div",{className:dn("name"),children:(0,Qt.jsx)(un.A,{value:t.title||t.$value,inline:!0})}),(0,Qt.jsxs)("div",{className:dn(),children:[(0,Qt.jsx)("div",{className:dn("header"),children:"Pool"}),(0,Qt.jsx)("div",{className:dn("header"),children:"Tree"}),(0,Qt.jsx)("div",{className:dn("header"),children:"Weight"}),hn((0,l.A)((0,l.A)({},e),{},{pools:s,weights:h,setPools:u,setWeights:f}))]}),g&&(0,Qt.jsx)(on.z,{className:dn("error"),error:A})]})})}));var gn=n(18983),An=n.n(gn),bn=n(3659),jn=n(11970),xn=n(53302),yn=(0,i.A)("operation-progress"),_n=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderCounter",value:function(e,t,n){var r=this.props,i=r.cluster,a=r.onLinkClick,o=this.props.operation.$value,s="/".concat(i,"/operations/").concat(o,"/jobs?state=").concat(e),l="View ".concat(e," jobs");return(0,Qt.jsxs)("div",{className:"operation-progress__counter",children:[(0,Qt.jsx)("span",{className:"operation-progress__counter-state",children:(0,Qt.jsx)(ln.A,{theme:"ghost",title:l,url:s,routed:!0,onClick:a?function(){a(e)}:void 0,children:S.A.format.ReadableField(e)})}),(0,Qt.jsxs)("span",{className:"operation-progress__counter-value",children:[S.A.format.Number(t)," / ",S.A.format.Number(n)]})]})}},{key:"renderFailedJobCounters",value:function(){var e=this.props.operation,t=e.failedJobs,n=e.totalFailedJobs;return void 0!==n&&(0,Qt.jsx)("div",{className:"operation-progress__counters",children:this.renderCounter("failed",t,n)})}},{key:"renderJobCounters",value:function(){var e=this.props.operation,t=e.state,n=e.totalJobs,r=e.failedJobs,i=e.completedJobs,a=e.runningJobs;return e.isPreparing()?null:void 0!==n&&(0,Qt.jsxs)("div",{className:"operation-progress__counters",children:[e.inIntermediateState()&&this.renderCounter("running",a,n),"failed"===t&&this.renderCounter("failed",r,n),this.renderCounter("completed",i,n)]})}},{key:"renderState",value:function(){var e=this.props,t=e.showState,n=e.operation,r=n.suspended,i=n.state;return t?(0,Qt.jsx)("div",{className:yn("state"),children:(0,Qt.jsx)(xn.A,{label:r?"suspended":i})}):null}},{key:"renderFailedProgressBar",value:function(){var e=this.props.operation.failedJobsProgress;return(0,Qt.jsxs)("div",{className:"operation-progress__bar",children:[this.renderState(),(0,Qt.jsx)(jn.k,{size:"s",value:e||0,theme:"danger"})]})}},{key:"renderProgressBar",value:function(){var e,t=this.props.operation,n=t.state,r=t.jobsProgress,i=t.completedJobsProgress,a=t.runningJobsProgress;switch(n){case"running":e=t.inIntermediateState()&&(0,Qt.jsx)(jn.k,{size:"s",value:r||0,stack:[{value:i||0,theme:"success"},{value:a||0,theme:"info"}]});break;case"completed":e=(0,Qt.jsx)(jn.k,{size:"s",value:100,theme:"success"});break;case"failed":e=(0,Qt.jsx)(jn.k,{size:"s",value:100,theme:"danger"});break;case"aborted":e=(0,Qt.jsx)(jn.k,{size:"s",value:100,theme:"default"});break;default:e=(0,Qt.jsx)(jn.k,{size:"s",value:0})}return(0,Qt.jsxs)("div",{className:"operation-progress__bar",children:[this.renderState(),e]})}},{key:"render",value:function(){var e=this.props.type;return(0,Qt.jsxs)("div",{className:"operation-progress",children:["running"===e?this.renderProgressBar():this.renderFailedProgressBar(),"running"===e?this.renderJobCounters():this.renderFailedJobCounters()]})}}])}(r.Component);_n.defaultProps={type:"running"};const wn=(0,u.Ng)((function(e){return{cluster:(0,Le.dB)(e)}}))(_n);var kn=n(44131),Nn=n(11394),Sn=n(95664),Tn=n(58299),Cn=n(88787),Rn=n(19410),En=n(7313),In=n(64772),Pn=n(56765),On=["table","count"],zn=(0,i.A)("yt-operations-list-path-item");function Mn(e){var t=e.caption,n=e.item,i=e.transaction_id,a=e.user_transaction_id,s=n.table,u=n.count,c=(0,je.A)(n,On),d=r.useState(),p=(0,o.A)(d,2),m=p[0],h=p[1];return r.useEffect((function(){var e=N.A.getValue(s,"/@transaction_id");return(0,Ie.AY)(e)?h(e):(0,Ie.AY)(i)?h(i):void(0,Ie.QB)(a).then((function(){return h(a)}))}),[s,a,i]),(0,Qt.jsxs)("div",{className:zn(null,"elements-meta-item"),children:[(0,Qt.jsx)("div",{className:"elements-meta-item__key",children:In.A.ReadableField(t)}),(0,Qt.jsx)("div",{className:"elements-meta-item__value",children:(0,Qt.jsxs)("span",{className:zn("item-io"),children:[(0,Qt.jsx)("span",{className:zn("item-count"),children:u}),(0,Qt.jsx)(Pn.A,(0,l.A)((0,l.A)({path:N.A.getValue(s)},c),{},{transaction:m,theme:"ghost",className:zn("item-io-table")}))]})})]},t)}var Vn=(0,i.A)("operations-list");function Fn(e,t){var n=function(e){return void 0!==e.title?e.title:e.$value}(e);return(0,Qt.jsx)(ln.A,{routed:!0,className:"elements-ellipsis",url:"".concat(An()(t,"/"),"/").concat(e.$value),theme:"primary",children:(0,Qt.jsx)("span",{children:bn.A.decode(n)})})}function Dn(e){return(0,Qt.jsx)(kn.A,{text:e.$value,view:"flat-secondary",size:"s",title:"Copy operation id",className:Vn("item-title-copy")})}function Ln(e){var t=e.awesomeIcon,n=e.children,r=e.title;return(0,Qt.jsxs)("div",{className:Vn("user-pool-item"),children:[(0,Qt.jsx)("div",{className:Vn("user-pool-item-icon"),children:(0,Qt.jsx)(Rn.m,{content:r,to:"left",allowUnmounted:!0,children:(0,Qt.jsx)(Cn.A,{face:"solid",awesome:t})})}),(0,Qt.jsx)("div",{className:Vn("user-pool-item-name"),children:n})]})}var Bn=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(e=(0,x.A)(this,t,[].concat(i))).renderTitle=function(t){var n=e.props.match.url,r="running"===N.A.getValue(t,"/@state"),i=r?N.A.getValue(t,"/@brief_spec/input_transaction_id"):void 0,a=r?N.A.getValue(t,"/@brief_spec/output_transaction_id"):void 0,o=r?N.A.getValue(t,"/@brief_spec/user_transaction_id"):void 0;return(0,Qt.jsxs)("div",{children:[(0,Qt.jsxs)("div",{className:Vn("item-title"),children:[Dn(t),Fn(t,n)]}),(0,Qt.jsxs)("div",{className:Vn("item-io"),children:[t.input.count>0&&(0,Qt.jsx)(Mn,{caption:"in",item:t.input,user_transaction_id:o,transaction:i}),t.output.count>0&&(0,Qt.jsx)(Mn,{caption:"out",item:t.output,user_transaction_id:o,transaction:a})]})]})},e.renderUserPool=function(t){var n=e.props,i=n.showEditPoolsWeightsModal,a=n.cluster,o=t.pools,s=t.user,l=t.state,u=(null==o?void 0:o.length)>1||!1;return(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)(Ln,{awesomeIcon:"user",title:"User",children:(0,Qt.jsx)(Sn.R,{name:s})}),(0,Qt.jsx)(Ln,{awesomeIcon:"poll-people",title:"Pool",children:u?e.renderMultiplePools(t):(0,Qt.jsx)(k.CD,{onEdit:function(){return i(t)},cluster:a,pools:o,state:l,compact:!0,allowDetachEditBtn:!0})}),!u&&(0,Qt.jsx)(Ln,{awesomeIcon:"weight-hanging",title:"Weight",children:(0,Qt.jsx)(k.tJ,{onEdit:function(){return i(t)},operation:t,pool:o[0]})})]})},e.renderActions=function(t){var n=e.props.promptAction,r=(0,Ie.pj)(t);return(0,Qt.jsx)("div",{className:Vn("actions"),children:r.map((function(r){var i=r.icon,a=r.name,o=r.$value,s=S.A.format.Readable(a),u=r.message||(0,Qt.jsxs)("span",{children:["Are you sure you want to ",(0,Qt.jsx)("strong",{children:r.name})," the operation"," ",o,"?"]}),c=function(n){var i=n.currentOption;return(0,Ie.wF)((0,l.A)((0,l.A)({},r),{},{operation:t,currentOption:i})).then((function(){e.props.updateOperationsList()}))};return(0,Qt.jsx)(Tn.A,{withTooltip:!0,size:"m",view:"flat-secondary",tooltipProps:{placement:"bottom",content:s},onClick:function(){return n((0,l.A)((0,l.A)({},r),{},{message:u,handler:c}))},children:(0,Qt.jsx)(Cn.A,{awesome:i})},a)}))})},e.settings={css:"operations-list",theme:"light",striped:!1,virtualType:"simple",getItemLink:function(t){return"".concat(e.props.match.url,"/").concat(t.$value)},computeKey:function(e){return e.$value},columns:{sets:{default:{items:["title","type","user_pool","start_time","progress","actions"]}},mode:"default",items:{title:{name:"title",sort:!1,align:"left"},type:{name:"type",sort:!1,align:"left"},user:{name:"user",sort:!1,align:"left"},pool:{name:"pool",sort:!1,align:"left"},user_pool:{name:"user_pool",sort:!1,caption:"User / Pool",align:"left"},start_time:{name:"start_time",sort:!1,align:"left"},progress:{name:"progress",sort:!1,align:"left",caption:"State / Progress"},actions:{name:"actions",caption:"",sort:!1,align:"right"}}},templates:{title:e.renderTitle,user_pool:e.renderUserPool,type:t.renderType,start_time:t.renderStartTime,progress:t.renderProgress,actions:e.renderActions}},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderMultiplePools",value:function(e){var t=this.props.showEditPoolsWeightsModal;return(0,Qt.jsxs)("span",{className:Vn("multiply-pools"),children:[e.pools.length,(0,Qt.jsxs)(Tn.A,{size:"s",view:"flat-secondary",title:"Show pools and weights",className:Vn("view-button"),onClick:function(){return t(e,!1)},children:[(0,Qt.jsx)(Cn.A,{awesome:"eye"})," View"]}),(0,Qt.jsx)(Tn.A,{size:"s",view:"flat-secondary",title:"Edit pools and weights",className:Vn("edit-button"),onClick:function(){return t(e)},children:(0,Qt.jsx)(Cn.A,{awesome:"pencil"})})]})}},{key:"render",value:function(){var e=this.props,t=e.operations,n=e.initialLoading;return(0,Qt.jsx)(Nn.A,(0,l.A)({emptyDataDescription:"Please, change your filtering settings to see search results",isLoading:n,items:t},this.settings))}}],[{key:"renderType",value:function(e){return(0,Qt.jsx)("span",{className:Vn("item-type"),children:S.A.format.ReadableField(e.type)})}},{key:"renderStartTime",value:function(e){return(0,Qt.jsxs)("div",{className:Vn("item-start-time"),children:[(0,Qt.jsx)("div",{className:Vn("item-start-time-human"),children:S.A.format.DateTime(e.startTime,{format:"human"})}),(0,Qt.jsx)("div",{className:Vn("item-start-time-default"),children:S.A.format.DateTime(e.startTime)}),(0,Qt.jsx)("div",{className:Vn("item-duration"),title:"Duration",children:S.A.format.TimeDuration(e.duration)})]})}},{key:"renderProgress",value:function(e){return(0,Qt.jsx)(wn,{operation:e,showState:!0})}}])}(r.Component),Jn={showEditPoolsWeightsModal:Zt,promptAction:En.Jm,updateOperationsList:Ut};const Un=(0,a.y)((0,u.Ng)((function(e){var t=e.operations,n=e.global,r=t.list,i=r.isLoading,a=r.hasLoaded;return{initialLoading:i&&!a,cluster:n.cluster,operations:t.list.operations}}),Jn)(Bn));var Hn=n(82931),$n=n(84162),Wn=(0,i.A)("operations-list"),qn=(0,i.A)("elements-toolbar"),Yn=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).state={transition:!1,value:""},e.gotoDetails=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.props.filter.value;Me(t)&&e.setState({transition:!0,value:t})},e.handleKeyDown=function(t){"Enter"===t.key&&e.gotoDetails(t.target.value)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"value",get:function(){var e=this.state.value,t=this.props.filter.value;return e||t}},{key:"render",value:function(){var e=this,t=this.props,n=t.match,r=t.updateFilter,i=t.activePreset,o=t.filter.value;return this.state.transition?(0,Qt.jsx)(a.rd,{to:"".concat(n.url,"/").concat(this.value)}):(0,Qt.jsxs)("div",{className:Wn("toolbar-text-filter",qn("component")),children:[(0,Qt.jsx)($n.A,{placeholder:"Filter operations...",size:"m",value:this.value,onChange:function(e){return r("text",e)},debounce:500,onKeyDown:this.handleKeyDown,pin:"round-brick"},i),(0,Qt.jsx)(Tn.A,{view:"action",pin:"brick-round",onClick:function(){return e.gotoDetails(o)},disabled:!Me(this.value),children:"Go to operation"})]})}}])}(r.Component),Gn={updateFilter:Wt};const Kn=(0,a.y)((0,u.Ng)((function(e){var t=e.operations;return{filter:t.list.filters.text,activePreset:t.list.activePreset}}),Gn)(Yn));var Zn=n(36146),Xn=n.n(Zn),Qn=n(30002),er=n.n(Qn),tr=n(6542),nr=(0,i.A)("elements-form"),rr=(0,i.A)("timepicker"),ir="HH:mm",ar=(w().shape({_isAMomentObject:w().oneOf([!0])}),function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).state={time:"",date:""},e.handleTimeChange=function(t){var n=e.props.onChange,r=e._checkInputTimeValidity(t);e.setState({time:t}),r&&n(e._prepareOutputDate(t))},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"_checkInputTimeValidity",value:function(e){return new RegExp("[0-9]{2}:[0-9]{2}").test(e)&&ye()(e,ir).isValid()}},{key:"_checkDateValidity",value:function(e){var t=this.props.minDate,n=ye()(e).unix();return!t||n>ye()(t).unix()}},{key:"_prepareOutputDate",value:function(e){var t=this.state.date,n=ye()(t),r=ye()(e,ir);return r.year(n.year()),r.month(n.month()),r.date(n.date()),r.toISOString()}},{key:"renderIcon",value:function(e){return(0,Qt.jsx)(Cn.A,{awesome:e})}},{key:"render",value:function(){var e=this.state.time,t=this.props.disabled,n=this._prepareOutputDate(e),r=this._checkInputTimeValidity(e),i=this._checkDateValidity(n),a=r&&i,o=a?"":"Time should be specified as HH:MM.\nEstimated start time should be less than estimated finish time.";return(0,Qt.jsx)("div",{className:nr("field",{theme:a?"valid":"invalid"},rr()),children:(0,Qt.jsx)(cn.k,{theme:"normal",size:"s",value:e,disabled:t,onUpdate:this.handleTimeChange,iconRight:this.renderIcon("clock"),controlAttrs:{maxLength:5,title:o},className:rr("control"),placeholder:"HH:mm"})})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.date!==t.date?{time:ye()(e.date).format(ir),date:e.date}:null}}])}(r.Component));ar.defaultProps={minDate:null,disabled:!1};var or=n(87604),sr=n(15672),lr=(0,i.A)("operations-list"),ur=(0,i.A)("elements-toolbar"),cr=(0,i.A)("elements-form"),dr={range:!1,controlSize:"s",format:"dd-MM-yyyy",outputFormat:"datetime",className:"operations-datepicker-control",popupClassName:"operations-datepicker-popup"},pr={custom:{text:"custom",value:"custom"},twoHours:{text:"last 2 hours",value:"twoHours",hours:2},day:{text:"last day",value:"day",hours:24},week:{text:"last week",value:"week",hours:168}};function mr(){var e=(0,u.d4)((function(e){return e.operations.list})),t=e.dataMode,n=e.timeRange,i=n.from,a=n.to,s=(0,u.wA)(),c=(0,r.useState)({modalVisible:!1,activeTypeValue:pr.custom.value,from:i||ye()().subtract(6,"hours").toISOString(),to:a||ye()().toISOString()}),d=(0,o.A)(c,2),p=d[0],m=d[1],h=(0,r.useCallback)((function(){m((0,l.A)((0,l.A)({},p),{},{modalVisible:!0}))}),[p]),f=(0,r.useCallback)((function(){m((0,l.A)((0,l.A)({},p),{},{modalVisible:!1}))}),[p]),v=(0,r.useCallback)((function(){f(),s((function(e){e({type:ot.vk,data:{dataMode:ot.Uu.CURRENT}}),e($t())}))}),[s,f]),g=(0,r.useCallback)((function(){f(),"custom"===p.activeTypeValue?s(Yt(p.from,p.to)):s(Yt(ye()().subtract(pr[p.activeTypeValue].hours,"hours").toISOString(),ye()().toISOString()))}),[s,f,p]),A=(0,r.useCallback)((function(){if(t===ot.Uu.CURRENT)return"Current operations";var e="DD-MM-YYYY HH:mm";return ye()(i).format(e)+" — "+ye()(a).format(e)}),[t,i,a]),b=(0,r.useCallback)((function(e){var t=Xn()(e,(function(e,t){if(e){var n=ye()(p[t]).toObject(),r=n.hours,i=n.minutes;return ye()(e).add({hours:r,minutes:i}).toISOString()}return e}));m((0,l.A)((0,l.A)({},p),t))}),[p]),j=(0,r.useCallback)((function(e){return m((0,l.A)((0,l.A)({},p),e))}),[p]),x=(0,r.useCallback)((function(e){var t=e.target.value;m((0,l.A)((0,l.A)({},p),{},{activeTypeValue:t},"custom"!==t&&{from:ye()().subtract(pr[t].hours,"hours").toISOString(),to:ye()().toISOString()}))}),[p]),y=A(),_=t===ot.Uu.ARCHIVE,w=p.activeTypeValue!==pr.custom.value;return(0,Qt.jsxs)("div",{className:lr("archive-range",ur("component")),children:[(0,Qt.jsx)(sn.A,{title:"Choose range",size:"s",confirmText:"Apply",cancelText:"Show current",cl:cr("time-modal"),visible:p.modalVisible,content:(0,Qt.jsxs)("div",{className:cr(null,"operations-archive-filter"),children:[(0,Qt.jsx)("div",{className:cr("button-group"),children:(0,Qt.jsx)(or.A,{name:"time-range",items:er()(pr),value:p.activeTypeValue,onChange:x})}),(0,Qt.jsxs)("div",{children:[(0,Qt.jsx)("div",{className:cr("label"),children:"From"}),(0,Qt.jsxs)("div",{className:cr("field-group"),children:[(0,Qt.jsx)("span",{className:cr("field"),children:(0,Qt.jsx)(sr.t1,(0,l.A)((0,l.A)({},dr),{},{disabled:w,from:p.from,onUpdate:function(e){var t=e.from;return t&&b({from:t})}}))}),(0,Qt.jsx)("span",{className:cr("field"),children:p.from&&(0,Qt.jsx)(ar,{disabled:w,date:p.from,onChange:function(e){return j({from:e})}})})]}),(0,Qt.jsx)("div",{className:cr("label"),children:"To"}),(0,Qt.jsxs)("div",{className:cr("field-group"),children:[(0,Qt.jsx)("span",{className:cr("field"),children:(0,Qt.jsx)(sr.t1,(0,l.A)((0,l.A)({},dr),{},{disabled:w,to:p.to,onUpdate:function(e){var t=e.from;return t&&b({to:t})}}))}),(0,Qt.jsx)("span",{className:cr("field"),children:p.to&&(0,Qt.jsx)(ar,{disabled:w,date:p.to,onChange:function(e){return j({to:e})}})})]})]})]}),renderCustomCancel:function(e){return(0,Qt.jsx)(tr.$,{title:"Show current",className:e,onClick:v,children:"Show current"})},onCancel:f,onConfirm:g}),(0,Qt.jsxs)(Tn.J,{type:"submit",selected:_,title:y,onClick:h,children:[y,(0,Qt.jsx)(Cn.A,{awesome:"calendar-alt"})]})]})}var hr=n(67270),fr=n(87319),vr=["name","value","type","placeholder"],gr=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).onRadioChange=function(t){return e.props.updateFilter(e.props.name,t)},e.onCheckChange=function(t){return e.props.updateFilter(e.props.name,t)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"items",get:function(){var e=this.props,t=e.value,n=e.states,r=e.counters,i=e.withCounters,a=!1,o=f()(n,(function(e){var n="string"==typeof e?e:e.name,o=r&&(r[n]||0);return n===t&&(a=!0),{value:n,text:e.caption||S.A.format.ReadableField(n),count:i?o:void 0}}));return"string"!=typeof t||a||o.push({value:t,text:S.A.format.ReadableField(t)}),o}},{key:"render",value:function(){var e=this.props,t=e.name,n=e.value,r=e.type,i=e.placeholder,a=(0,je.A)(e,vr),o=this.props.multiple,s="function"==typeof i?i(n):i,u="radio"===r?this.onRadioChange:this.onCheckChange;return(0,Qt.jsx)(hr.A,(0,l.A)((0,l.A)({hideFilter:!0},a),{},{placeholder:s,value:Array.isArray(n)?n:[n],type:r,items:this.items,onUpdate:function(e){return u(o?e:e[0])},label:S.A.format.FirstUppercase(t)+":"}))}}])}(r.Component);gr.defaultProps={withCounters:!0,type:"radio"};const Ar=(0,u.Ng)((function(e,t){var n=e.operations.list.filters,r=t.name,i=t.states,a=n[r],o=a.defaultValue,s=a.value,l=function(e,t,n){var r=N.A.getValue(n,"/".concat(e,"_counts"));return S.A.filter.countCategoriesNG({items:f()(r,(function(e,t){return{count:e,value:t}})),categories:S.A.filter.flattenCategoriesNG(t,"name"),custom:function(e,t){t[e.value]+=e.count,t.all+=e.count}})}(r,i,a.counters);return{value:Ce(s,o),defaultValue:o,counters:l}}),{updateFilter:Wt})(gr);var br=n(59188),jr=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).gotoFirstPage=function(){e.props.gotoOperationsPage(ot.b4.FIRST)},e.gotoLastPage=function(){e.props.gotoOperationsPage(ot.b4.LAST)},e.gotoNextPage=function(){e.props.gotoOperationsPage(ot.b4.NEXT)},e.gotoPrevPage=function(){e.props.gotoOperationsPage(ot.b4.PREV)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"render",value:function(){var e=this.props,t=e.firstPageReached,n=e.lastPageReached;return(0,Qt.jsx)(br.A,{size:"s",first:{handler:this.gotoFirstPage,disabled:t},previous:{handler:this.gotoPrevPage,hotkeyHandler:this.gotoPrevPage,hotkeyScope:"all",hotkey:"ctrl+left, command+left"},next:{handler:this.gotoNextPage,hotkeyHandler:this.gotoNextPage,hotkeyScope:"all",hotkey:"ctrl+right, command+right"},last:{handler:this.gotoLastPage,disabled:n}})}}])}(r.Component),xr={gotoOperationsPage:function(e){return function(t,n){var r=n().operations.list,i=r.dataMode,a=r.timeRange,o=r.cursor,s=r.operations;switch(e){case ot.b4.FIRST:t($t()),i===ot.Uu.CURRENT&&t(qt());break;case ot.b4.LAST:i===ot.Uu.CURRENT&&t(qt()),t(Jt({timestamp:a.from,direction:ot.Iv.FUTURE,firstPageReached:!1,lastPageReached:!0}));break;case ot.b4.NEXT:o.lastPageReached||(i===ot.Uu.CURRENT&&t(qt()),t(Jt({timestamp:N.A.getValue(s[s.length-1],"/@start_time"),direction:ot.Iv.PAST,firstPageReached:!1})));break;case ot.b4.PREV:o.firstPageReached||(i===ot.Uu.CURRENT&&t(qt()),t(Jt({timestamp:N.A.getValue(s[0],"/@start_time"),direction:ot.Iv.FUTURE,lastPageReached:!1})))}}}};const yr=(0,u.Ng)((function(e){var t=e.operations.list.cursor;return{firstPageReached:t.firstPageReached,lastPageReached:t.lastPageReached}}),xr)(jr);var _r=n(28325),wr=n(91071),kr=n(79329),Nr=n(66026),Sr=n(21594),Tr=(0,_e.Mz)([function(e){return e.operations.list.isLoading},function(e){return e.operations.list.hasLoaded},function(e){return e.operations.list.hasError}],(function(e,t,n){var r=(0,Oe.Ts)(e,t,n);return(0,Oe.RP)(r)})),Cr=(0,_e.Mz)([Nr.Cq,Le.ID],(function(e,t){var n=W()(Object.keys(e),(function(e){return e.startsWith(Ft.dK.OPERATION_PRESETS.value)}));return(0,l.A)((0,l.A)({},function(e){return(0,s.A)((0,s.A)({},wr.Kp,{name:"My/Running",preconfigured:!0,filters:(0,l.A)((0,l.A)({},wr.E4),{},{user:e,state:"running"})}),"failed",{name:"My/Failed",preconfigured:!0,filters:(0,l.A)((0,l.A)({},wr.E4),{},{user:e,state:"failed"})})}(t)),g()(n,(function(t,n){return t[n.slice((Ft.dK.OPERATION_PRESETS.value+Sr.yV).length)]=(0,l.A)({},e[n]),t}),{}))})),Rr=(0,_e.Mz)([mt,Cr],(function(e,t){return g()(t,(function(t,n,r){var i=n.filters;return d()(i,(function(t,n){var r,i=n;return dt()(null===(r=e[i])||void 0===r?void 0:r.value,t)}))&&t.add(r),t}),new Set)})),Er="toolbar-presets",Ir=(0,i.A)("operations-list"),Pr=(0,i.A)("elements-toolbar"),Or=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).state={presetName:"",isPresetDefault:!1},e.onConfirm=function(){var t=e.props,n=t.saveFilterPreset,r=t.toggleSaveFilterPresetDialog,i=e.state;n(i.presetName,i.isPresetDefault).then((function(){e.setState({presetName:"",isPresetDefault:!1}),r()}))},e.makeRemoveHandler=function(t){return function(n){n.stopPropagation(),e.props.removeFilterPreset(t)}},e.isPresetNameEmpty=function(){return!e.state.presetName},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.applyFilterPreset,n=e.defaultPreset,r=e.presets;e.location.search.length<=1&&t(r[n],!1)}},{key:"renderSavePresetDialog",value:function(){var e=this,t=this.props,n=t.dialog,a=t.toggleSaveFilterPresetDialog,o=this.state,s=o.presetName,l=o.isPresetDefault,u=(0,i.A)("elements-form"),c="save-preset-filter";return(0,Qt.jsx)(sn.A,{title:"Save filter",confirmText:"Save",visible:n.isSaving,onCancel:a,onConfirm:this.onConfirm,isConfirmDisabled:this.isPresetNameEmpty,content:(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsxs)("div",{className:u("field"),children:[(0,Qt.jsx)("label",{htmlFor:c,className:u("label"),title:"Filter name",children:"Filter name"}),(0,Qt.jsx)(cn.k,{id:c,value:s,onUpdate:function(t){return e.setState({presetName:t})},autoFocus:!0})]}),(0,Qt.jsx)("div",{className:u("field"),children:(0,Qt.jsx)(_r.S,{checked:l,onChange:function(t){return e.setState({isPresetDefault:t})},children:"Default filter"})})]})})}},{key:"render",value:function(){var e=this,t=this.props,n=t.defaultPreset,r=t.presets,i=t.applyFilterPreset,a=t.activePresets;return(0,Qt.jsxs)("div",{className:Ir(Er,Pr("container")),children:[this.renderSavePresetDialog(),f()(r,(function(t,r){var o=a.has(r);return(0,Qt.jsx)("div",{className:Ir(Er,Pr("component")),children:(0,Qt.jsx)(tr.$,{className:Ir("preset",{active:o}),onClick:function(){return i(t)},role:"button",selected:o,children:(0,Qt.jsxs)("span",{className:Ir("preset-content"),children:[(0,Qt.jsxs)("span",{className:Ir("preset-name"),children:[n===r&&(0,Qt.jsx)(Cn.A,{awesome:"star-alt"})," ",t.name]}),!t.preconfigured&&(0,Qt.jsx)("span",{className:Ir("preset-remove"),onClick:e.makeRemoveHandler(r),children:(0,Qt.jsx)(Cn.A,{face:"solid",awesome:"times"})})]})})},r)}))]})}}])}(r.Component),zr={applyFilterPreset:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){n({type:ot.a6,data:{preset:e}}),t&&n($t())}},removeFilterPreset:function(e){return function(t){t((0,st.dH)(e,Ft.dK.OPERATION_PRESETS))}},saveFilterPreset:function(e,t){return function(n,r){var i=Promise.resolve(),a=S.A.guid();return t&&(i=n((0,st.ZC)(ot.Pc,Ft.dK.OPERATION,a))),i.then((function(){var t,i;n((0,st.ZC)(a,Ft.dK.OPERATION_PRESETS,{name:e,filters:(t=r(),i=t.operations.list.filters,g()(i,(function(e,t,n){var r=t.value;return(0,l.A)((0,l.A)({},e),{},(0,s.A)({},n,r))}),{}))}))}))}},toggleSaveFilterPresetDialog:Gt};const Mr=(0,a.y)((0,u.Ng)((function(e){var t=e.operations,n=(0,kr.th)(e)(ot.Pc,Ft.dK.OPERATION),r=Cr(e);return r[n]||(n=wr.Kp),{presets:r,activePresets:Rr(e),defaultPreset:n,dialog:t.list.savePresetDialog}}),zr)(Or));var Vr=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"render",value:function(){var e=this.props,n=e.states,r=e.name,i=e.placeholder,a=e.updateFilter,o=e.value,s=e.defaultValue,l=e.pin;return(0,Qt.jsx)(fr.A,{apply:function(e){return a(r,e||s)},filter:t.simpleSuggestLoader,text:o!==s?o:"",items:n,placeholder:i,zIndexGroupLevel:1,clear:function(){return a(r,s)},pin:l},o)}}],[{key:"simpleSuggestLoader",value:function(e,t){return t=t.toLowerCase(),W()(e,(function(e){var n="string"==typeof e?e:e.value;return!t||-1!==n.toLowerCase().indexOf(t)}))}}])}(r.Component),Fr=function(e,t){var n=mt(e)[t],r=n.defaultValue;return{name:t,value:Ce(n.value,r),defaultValue:r}},Dr=(0,u.Ng)((function(e){return(0,l.A)((0,l.A)({},Fr(e,"poolTree")),{},{states:bt(e),placeholder:"Pool tree..."})}),{updateFilter:Wt})(Vr),Lr=(0,u.Ng)((function(e){return(0,l.A)((0,l.A)({},Fr(e,"pool")),{},{states:yt(e),placeholder:"Filter pool..."})}),{updateFilter:Wt})(Vr),Br=(0,u.Ng)((function(e){var t=Pt(e);return(0,l.A)((0,l.A)({},Fr(e,"user")),{},{states:kt(e),placeholder:t||"Started by..."})}),{updateFilter:Wt})(Vr);function Jr(){var e=(0,u.wA)(),t=(0,u.d4)(mt).subject.value;return(0,Qt.jsx)("div",{children:q.Ay.renderUserSuggest({value:"string"==typeof t&&t?[t]:[],onUpdate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=(0,o.A)(t,1)[0];e(Wt("subject",n))},width:"max",pin:"round-clear",placeholder:"Accessible for...",hasClear:!0})})}var Ur=r.memo(Jr),Hr=n(74069),$r=(0,i.A)("operations-list"),Wr=(0,i.A)("elements-toolbar"),qr=Wr("component"),Yr=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"preparePermissionsPlaceholder",value:function(e){return 0===e.length?"Select...":f()(e,(function(e){return e[0].toUpperCase()})).join(", ")}},{key:"renderTopSection",value:function(){return(0,Qt.jsxs)("div",{className:Wr("container"),children:[(0,Qt.jsx)(Kn,{}),(0,Qt.jsxs)("div",{className:$r("toolbar-pool-filter",qr),children:[(0,Qt.jsx)(Hr.DG,{}),(0,Qt.jsx)(Dr,{pin:"round-clear"}),(0,Qt.jsx)(Lr,{pin:"brick-round"})]}),(0,Qt.jsx)(mr,{}),(0,Qt.jsx)("div",{className:$r("toolbar-pagination",qr),children:(0,Qt.jsx)(yr,{})})]})}},{key:"renderBottomSection",value:function(){var e=this.props,t=e.failedJobsFilter,n=e.updateFilter,r=e.toggleSaveFilterPresetDialog;return(0,Qt.jsxs)("div",{className:Wr("container"),children:[(0,Qt.jsx)("div",{className:$r("toolbar-user-filter",qr),children:(0,Qt.jsx)(Br,{})}),(0,Qt.jsxs)("div",{className:$r("toolbar-access-filters",qr),children:[(0,Qt.jsx)(Ur,{pin:"round-clear"}),(0,Qt.jsx)(Ar,{type:"check",name:"permissions",withCounters:!1,placeholder:this.preparePermissionsPlaceholder,states:[{name:"read",show:!0},{name:"manage",show:!0}],width:170,multiple:!0,pin:"brick-round"})]}),(0,Qt.jsx)("div",{className:$r("toolbar-state-filter",qr),children:(0,Qt.jsx)(Ar,{name:"state",states:[{name:"all",caption:"All states",show:!0},{name:"pending",show:!0},{name:"running",show:!0},{name:"completed",show:!0},{name:"failed",show:!0},{name:"aborted",show:!0}],width:200})}),(0,Qt.jsx)("div",{className:$r("toolbar-type-filter",qr),children:(0,Qt.jsx)(Ar,{name:"type",states:[{name:"all",caption:"All types",show:!0},{name:"map",show:!0},{name:"reduce",show:!0},{name:"map_reduce",show:!0},{name:"join_reduce",show:!0},{name:"merge",show:!0},{name:"sort",show:!0},{name:"erase",show:!0},{name:"remote_copy",show:!0},{name:"vanilla",show:!0}],width:200})}),(0,Qt.jsx)("div",{className:$r("failed-jobs",qr),children:(0,Qt.jsxs)(Tn.J,{selected:t.value,onClick:function(){return n("failedJobs",!t.value)},children:["Only ops with failed jobs:"," ",(0,Qt.jsx)("span",{className:$r("only-jobs-with-failed-counter"),children:t.counter})]})}),(0,Qt.jsx)("div",{className:$r("toolbar-save-preset",qr),children:(0,Qt.jsxs)(Tn.A,{title:"Save filter",onClick:r,className:$r("save-preset"),children:[(0,Qt.jsx)(Cn.A,{awesome:"save",face:"regular"})," Save filter"]})})]})}},{key:"renderWarning_uiissue_2838",value:function(){return(0,Qt.jsxs)("div",{className:$r("ytfront-2838"),children:["At the moment there is the unresolved performance issue with getting unfiltered list of operations from archive,",(0,Qt.jsx)("br",{}),'as a temporary solution UI adds current username to "Started by" filter if there are no any other filters specified.']})}},{key:"render",value:function(){var e=this,t=this.props,n=t.fixedStartedByFilter,i=t.children;return(0,Qt.jsx)(Hn.X,{hideShadow:!0,keepWidth:!0,children:function(t){var a=t.stickyTop,o=t.stickyTopClassName;return(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsxs)("div",{className:$r("toolbar",{sticky:a},[Wr(),o]),children:[e.renderTopSection(),e.renderBottomSection(),n&&e.renderWarning_uiissue_2838(),(0,Qt.jsx)(Mr,{})]}),i]})}})}}])}(r.PureComponent);function Gr(e){var t=e.children,n=(0,u.d4)(Le.Le),i=((0,u.d4)((function(e){return e.operations.list.filters}))||{}).failedJobs,a=(0,u.d4)(Pt),o=(0,u.wA)(),s=r.useCallback((function(){o(Wt.apply(void 0,arguments))}),[o]),l=r.useCallback((function(){o(Gt.apply(void 0,arguments))}),[o]);return(0,Qt.jsx)(Yr,{subjects:n,failedJobsFilter:i,fixedStartedByFilter:a,updateFilter:s,toggleSaveFilterPresetDialog:l,children:t})}const Kr=r.memo(Gr);var Zr=n(13685),Xr=n(46357),Qr=n(22636),ei=(0,i.A)("operations-list");function ti(e){var t=e.timeRange,n=(0,u.wA)(),i=(0,u.d4)(Le.dB),a=(0,u.d4)(Vt),o=(0,Zr.rN)(i,a),s=r.useCallback((function(){n(Ht.apply(void 0,(0,A.A)(o)))}),[n,o]);return(0,Zr.Tt)(s,{onlyOnce:ni(t)}),null}function ni(e){var t=e.from,n=e.to;if("string"==typeof t&&"string"==typeof n){var r=ye()(t),i=ye()(n).diff(r);return ye().duration(i).asDays()>=1}return!1}var ri=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"isTimeRangeChanged",value:function(e){var t=this.props.timeRange;return t.from!==e.from||t.to!==e.to}},{key:"renderError",value:function(){var e=this.props.error,t=e.message,n=e.details;return(0,Qt.jsx)(on.z,{message:t,error:n})}},{key:"firstTimeError",value:function(){var e=this.props,t=e.hasLoaded;return e.hasError&&!t}},{key:"render",value:function(){var e=this.props,t=e.hasError,n=e.inDashboard,r=e.timeRange;return(0,Qt.jsxs)("div",{className:ei(),children:[(0,Qt.jsx)(ti,{timeRange:r}),n&&(0,Qt.jsx)("div",{className:(0,i.A)("elements-heading")({size:"l"}),children:"Operations"}),(0,Qt.jsxs)(Kr,{children:[t&&this.renderError(),!this.firstTimeError()&&(0,Qt.jsx)(Un,{})]})]})}}])}(r.Component);ri.defaultProps={inDashboard:!1};var ii=(0,u.Ng)((function(e){var t=e.operations.list,n=t.isLoading,r=t.hasLoaded,i=t.hasError,a=t.error;return{timeRange:t.timeRange,isLoading:n,hasLoaded:r,hasError:i,error:a}}))(ri);function ai(){var e=(0,u.d4)(Tr);return(0,Xr.v)({type:Dt.c.OPERATIONS_LIST,startDeps:[e],allowStart:function(e){return!(0,o.A)(e,1)[0]}}),(0,Qr.ol)({type:Dt.c.OPERATIONS_LIST,stopDeps:[e],allowStop:function(e){return(0,o.A)(e,1)[0]}}),(0,Qt.jsx)(ii,{})}const oi=r.memo(ai);var si=n(71217),li=n(5865),ui=n(56950),ci=n(90200),di=(0,i.A)("yt-histogram");function pi(e){var t=e.className,n=e.data,i=e.xLabel,a=e.yLabel,s=e.yLogarithmic,u=e.yMin,c=e.xFormat,d=void 0===c?In.A.Number:c,p=e.yFormat,m=void 0===p?In.A.Number:p,h=e.renderTooltip,f=void 0===h?hi:h,v=r.useMemo((function(){var e=function(e){var t=e.min,n=e.max,r=e.count,i=t===n?1:(n-t)/Math.max(r.length,1),a=[void 0].concat((0,A.A)(r)),o=[t-i/2];if(r.length>1)for(var s=0;s<r.length;++s)o.push(t+s*i+i/2);else o.push(t);return o.push(n+i/2),a.push(void 0),{timeline:o,serieData:a,step:t===n?0:i}}(n),t=e.timeline,r=e.serieData,c=e.step;return{data:{timeline:t,graphs:[(0,l.A)({type:"column",data:s?r.map((function(e){return 0===e?NaN:e})):r,color:(0,ci.g)(0),formatter:m},{renderOptions:{size:[1],gap:1}})]},libraryConfig:{axes:{x:{label:i,values:function(e,t){return t.map(d)}},y:{label:a}},scales:{y:{min:u,type:s?"logarithmic":"linear"}},tooltip:{render:function(e){var t,n=e.x,r=(0,o.A)(e.scales,1),i=(0,o.A)(r[0].rows,1)[0].originalValue;return null!==(t=f(m(isNaN(i)?0:i),d(n-c/2),d(n+c/2)))&&void 0!==t?t:"-"}}}}}),[n,i,a,d,m,f,u,s]);return(0,Qt.jsx)("div",{className:di(null,t),children:(0,Qt.jsx)(ci.A,{type:"yagr",data:v})})}const mi=r.memo(pi);var hi=function(e,t,n){return"<b>".concat(e,"</b> for range from <b>").concat(t,"</b> to <b>").concat(n,"</b>")};function fi(e,t){var n=null!=e?e:{},r=n.min,i=n.max;if(r!==i&&void 0!==r&&void 0!==i){var a=r+(i-r)/10;if(t(r)===t(a))for(var o=0;o<5;++o){var s={digits:o+2};if(t(r,s)!==t(a,s))return{digits:o+3}}}}var vi=(0,i.A)("operation-detail-partition-sizes"),gi=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).state={},e.formatX=function(t){var n=e.state.formatSettings;return In.A.Bytes(t,n)},e.renderTooltip=function(e,t,n){return"<b>".concat(e,"</b> jobs have estimated input job size from ").concat(t," to ").concat(n)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"render",value:function(){var e=this.state.data;return e?(0,Qt.jsx)(si.A,{children:(0,Qt.jsx)("div",{className:vi(),children:(0,Qt.jsx)(mi,{className:vi("charts"),data:e,yLabel:"partition count",xLabel:"partition data weight",xFormat:this.formatX,yMin:.5,yLogarithmic:!0,renderTooltip:this.renderTooltip})})}):null}}],[{key:"getDerivedStateFromProps",value:function(e){var t=N.A.getValue(e.operation,"/@progress"),n=t&&N.A.getValue(t,"/partition_size_histogram");return{formatSettings:fi(n,In.A.Bytes),data:n}}}])}(r.Component),Ai=(0,u.Ng)((function(e){return{operation:e.operations.detail.operation,chartKitTheme:(0,Le.O4)(e)}}))(gi);function bi(){var e=(0,u.d4)(Ye);return(0,Xr.v)({type:Dt.c.OPERATION_TAB_PARTITION_SIZES,additionalStartType:Dt.c.OPERATION,startDeps:[e],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Oe.RP)(t)}}),(0,Qr.ol)({type:Dt.c.OPERATION_TAB_PARTITION_SIZES,stopDeps:[e],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Oe.RP)(t)}}),(0,Qt.jsx)(Ai,{})}var ji=n(2735),xi=n(16727),yi=n(24040),_i=n(44458),wi=(0,i.A)("alert-events"),ki=[{name:"Type",render:function(e){var t=e.row;return(0,Qt.jsxs)("span",{children:[In.A.Readable(t.type),Boolean(t.url)&&(0,Qt.jsxs)(ln.A,{url:t.url,theme:"secondary",children:[" ",(0,Qt.jsx)(Cn.A,{awesome:"question-circle"})]})]})}},{name:"Period",render:function(e){var t=e.row,n=t.from,i=t.to;return(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)(xi.Bj.Time,{time:n,settings:{format:"full"},valueFormat:"DateTime"})," - ",i?(0,Qt.jsx)(xi.Bj.Time,{time:i,settings:{format:"full"},valueFormat:"DateTime"}):"..."]})}},{name:"",render:function(e){var t=e.row;return(0,Qt.jsx)(yi.S,{onClick:function(){(0,Oe.eW)(t.error,{type:"alert",hideOopsMsg:!0,helpURL:t.url})},children:"Details"})}}];function Ni(e){var t=e.className,n=e.items,i=r.useState(!1),a=(0,o.A)(i,2),s=a[0],l=a[1],u=r.useMemo((function(){return n.sort((function(e,t){return(0,_i.IP)(e.to,t.to,-1,-1)||(0,_i.IP)(e.from,t.from,-1,1)}))}),[n]),c=r.useMemo((function(){return s?u:u.slice(0,5)}),[s,u]),d=r.useCallback((function(){l(!s)}),[s,l]);return(0,Qt.jsxs)("div",{className:t,children:[(0,Qt.jsx)(ji.Ay,{className:wi(),columns:ki,data:c,settings:{displayIndices:!1,sortable:!1},useThemeYT:!0,disableRightGap:!0,rowClassName:function(e){return wi("row",{current:!e.to})}}),u.length>5?(0,Qt.jsx)(yi.S,{onClick:d,children:s?"Less":"More"}):null]})}const Si=r.memo(Ni);var Ti=n(33832),Ci=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"settings",get:function(){return(0,l.A)((0,l.A)({},bn.A.prepareSettings()),{},{escapeWhitespace:!1})}},{key:"renderAsMap",value:function(e){var t=bn.A.utils.yson,n=t.attributes,r=t.type,i=!Object.hasOwnProperty.call(n(e),"_type_tag");return"object"===r(e)&&i}},{key:"renderAsYSON",value:function(e){return(0,Qt.jsx)(un.A,{settings:this.settings,value:e})}},{key:"renderMetaTable",value:function(e){var t=this,n=N.A.getValue(e),r=m()(n).sort(),i=f()(r,(function(e){return{key:e,value:(0,Qt.jsx)(Ti.A,{settings:t.settings,value:n[e]})}}));return(0,Qt.jsx)(k.Ay,{items:i})}},{key:"render",value:function(){var e=this.props.description;return this.renderAsMap(e)?this.renderMetaTable(e):this.renderAsYSON(e)}}])}(r.Component),Ri=n(98115),Ei=["row_count","compressed_data_size","uncompressed_data_size","data_weight","chunk_count"],Ii={theme:"light",size:"m",striped:!1,virtual:!1},Pi=(0,l.A)((0,l.A)({},Ii),{},{columns:{sets:{default:{items:["name"].concat(Ei)},withActions:{items:["name"].concat(Ei,["actions"])}},items:(0,Pe.TU)({name:{sort:!1,align:"left"},row_count:{sort:!1,align:"right"},compressed_data_size:{sort:!1,align:"right",caption:"Compressed"},uncompressed_data_size:{sort:!1,align:"right",caption:"Uncompressed"},data_weight:{sort:!1,align:"right"},chunk_count:{sort:!1,align:"right",caption:"Slices"},actions:{sort:!1,caption:""}}),mode:"default"}}),Oi=(0,l.A)((0,l.A)({},Ii),{},{columns:{sets:{default:{items:["account","node_count","disk_space","chunk_count"]}},items:(0,Pe.TU)({account:{sort:!1,align:"left"},disk_space:{sort:!1,align:"right"},chunk_count:{sort:!1,align:"right",caption:"Slices"},node_count:{sort:!1,align:"right"}}),mode:"default"},templates:{key:"operations/detail/resources/intermediate"}}),zi=n(14880),Mi=n(9331),Vi=(0,i.A)("resources");function Fi(e,t){return S.A.format.Bytes(e.value[t])}function Di(e,t){return S.A.format.Number(e.value[t])}function Li(e,t){return"".concat(e,"->").concat(t)}function Bi(e,t,n){return{allowExpand:e,resources:e?g()(t,(function(e,t){var r=t.from,i=t.to,a=n[Li(r,i)];if(e.push(t),a){var o=t.job_data_statistics,s=t.teleport_data_statistics;o&&e.push({inner:"processed by jobs",value:o}),s&&e.push({inner:"teleported",value:s})}return e}),[]):t}}w().arrayOf(w().shape({name:w().string,value:w().object,from:w().string,to:w().string})),w().array;var Ji=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).state={prevProps:void 0,expandedTasks:{},resources:[],allowExpand:!1},e.rowClassName=function(e){return e.name?Vi("named-row"):e.inner?Vi("inner-row"):null},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"toggleExpand",value:function(e){var t=(0,l.A)({},this.state.expandedTasks);t[e]?delete t[e]:t[e]=!0;var n=this.state.allowExpand,r=this.props.resources;this.setState((0,l.A)({expandedTasks:t},Bi(n,r,t)))}},{key:"getResourceTemplates",value:function(){var e=this.state,t=e.expandedTasks,n=e.allowExpand,i=this;return{name:function(e){var a=e.name,o=e.from,s=e.to,l=e.inner;if(a)return a;if(l)return(0,Qt.jsx)("span",{className:Vi("inner"),children:l});var u=(0,Qt.jsxs)("span",{children:[o," -> ",s]});if(n){var c=Li(o,s),d=t[c],p=function(){i.toggleExpand(c)};return(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)(Mi.A,{expanded:d,onClick:p,visible:!0}),(0,Qt.jsx)("span",{onClick:p,className:Vi("name"),children:u})]})}return u},chunk_count:function(e,t){return Di.call(this,e,t)},row_count:Di,data_weight:Fi,compressed_data_size:Fi,uncompressed_data_size:Fi,actions:function(e){var t=e.info,n=e.from,r=e.to;return t?(0,Qt.jsx)(zi.A,{title:"Data flow: ".concat(n," -> ").concat(r),attributes:t}):null}}}},{key:"render",value:function(){var e=this.props,t=e.operation,n=e.intermediateResources,r=this.state,i=r.resources,a=r.allowExpand;return(0,Qt.jsxs)("div",{className:Vi(),children:[(0,Qt.jsx)("div",{className:Vi("table","elements-section"),children:(0,Qt.jsx)(Nn.A,(0,l.A)((0,l.A)({},Pi),{},{columnsMode:a?"withActions":void 0,css:Vi(),items:i,templates:this.getResourceTemplates(),rowClassName:this.rowClassName}))}),t.isRunning()&&n&&(0,Qt.jsxs)("div",{className:Vi("table","elements-section"),children:[(0,Qt.jsx)("div",{className:"elements-heading elements-heading_size_s",children:"Uncommitted"}),(0,Qt.jsx)(Nn.A,(0,l.A)((0,l.A)({},Oi),{},{css:Vi(),items:n}))]})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e===t.prevProps)return null;var n=e.operation,r=e.resources,i=U(n);return(0,l.A)({allowExpand:i},Bi(i,r,t.expandedTasks))}}])}(r.Component);const Ui=Ji;var Hi=n(4214),$i=["className","renderToggler"],Wi=(0,i.A)("elements-heading"),qi=(0,i.A)("collapsible-table"),Yi=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderHeading",value:function(){var e=this.props,t=e.heading,n=e.allItemsCount;return(0,Qt.jsxs)("div",{className:Wi({size:"s"}),children:[(0,Qt.jsx)("span",{className:qi("heading"),children:S.A.format.ReadableField(t)}),(0,Qt.jsx)("span",{className:qi("size"),children:n})]})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.renderToggler,r=(0,je.A)(e,$i);return(0,Qt.jsxs)("div",{className:qi(null,t),children:[this.renderHeading(),(0,Qt.jsx)(Nn.A,(0,l.A)({},r)),n()]})}}])}(r.Component);const Gi=(0,Hi.A)(Yi);var Ki={theme:"light",size:"s",striped:!1,virtual:!1,templates:{key:"operations/detail/specification/io",data:{}},columns:{sets:{input:{items:["name","filters","tags"]},output:{items:["name","live_preview","tags"]},stderr:{items:["name","live_preview","tags"]}},items:{name:{sort:!1,align:"left",name:"name"},live_preview:{sort:!1,align:"left",name:"live_preview"},filters:{sort:!1,align:"left",name:"filters"},tags:{sort:!1,align:"left",name:"tags"}}}},Zi=(0,l.A)((0,l.A)({},Ki),{},{columns:(0,l.A)((0,l.A)({},Ki.columns),{},{mode:"input"})}),Xi=(0,l.A)((0,l.A)({},Ki),{},{columns:(0,l.A)((0,l.A)({},Ki.columns),{},{mode:"output"})}),Qi=(0,l.A)((0,l.A)({},Ki),{},{columns:(0,l.A)((0,l.A)({},Ki.columns),{},{mode:"stderr"})}),ea=(0,i.A)("elements-heading"),ta=(0,i.A)("specification"),na=w().shape({type:w().string.isRequired,caption:w().string,command:w().string,className:w().string,jobCount:w().number,files:w().arrayOf(w().shape({path:w().string,name:w().string,executable:w().bool})),environment:w().arrayOf(w().shape({name:w().string,value:w().string}))}),ra=(w().shape({transferTask:w().shape({id:w().string.isRequired,url:w().string}),mode:w().string,remote:w().shape({cluster:w().string.isRequired,network:w().string}),startedBy:w().shape({command:w().arrayOf(w().string).isRequired,fields:w().arrayOf(w().object).isRequired}),intermediate:w().shape({supported:w().bool.isRequired,path:w().string,transaction:w().string}),mapper:na,reducer:na,reduceCombiner:na,tasks:w().arrayOf(na)}),function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderTransferTask",value:function(e){var t=e.id,n=e.url,r=e.mode;return(0,Qt.jsx)(k.Ay,{className:ta("meta"),items:[{key:"mode",value:r,visible:Boolean(r)},{key:"transfer task",value:(0,Qt.jsx)(k.ts,{id:t,url:n}),visible:Boolean(t||n)}]})}},{key:"renderRemote",value:function(e){var t=e.cluster,n=e.network;return(0,Qt.jsxs)("div",{className:ta("remote"),children:[(0,Qt.jsx)("div",{className:ea({size:"s"}),children:"Remote"}),(0,Qt.jsx)(k.Ay,{items:[{key:"cluster",value:t},{key:"network",value:n}]})]})}},{key:"renderStartedBy",value:function(e){var t=e.fields,n=void 0===t?[]:t,r=e.command,i=n.map((function(e){return{key:e.name,value:"object"===(0,be.A)(e.value)?(0,Qt.jsx)(un.A,{value:e.value}):e.value}}));return i.push({key:"command",value:(0,Qt.jsx)(k.qe,{value:r,lineCount:5}),visible:Boolean(null==r?void 0:r.length)}),(0,Qt.jsxs)("div",{className:ta("started-by"),children:[(0,Qt.jsx)("div",{className:ea({size:"s"}),children:"Started by"}),(0,Qt.jsx)(k.Ay,{items:i})]})}},{key:"renderScript",value:function(e){var t=e.type,n=e.caption,r=e.className,i=e.jobCount,a=e.environment,o=e.files,s=e.command,l=e.layerPaths,u=this.props.cluster;return(0,Qt.jsxs)("div",{className:ta("mapper"),children:[(0,Qt.jsx)("div",{className:ea({size:"s"}),children:S.A.format.ReadableField(n||t)}),(0,Qt.jsx)(k.Ay,{items:[{key:"class name",value:r,visible:Boolean(r)},{key:"job count",value:i,visible:Boolean(i)},{key:"environment",value:(0,Qt.jsx)(k.u0,{environments:a}),visible:a.length>0},{key:"files",value:(0,Qt.jsx)(k.AA,{files:o,cluster:u}),visible:o.length>0},{key:"command",value:(0,Qt.jsx)(k.qe,{value:s,lineCount:5}),visible:Boolean(s)},{key:"layer paths",value:(0,Qt.jsx)(k.KI,{paths:l,cluster:u}),visible:Boolean(l)}]})]},"".concat(t,"/").concat(n,"/").concat(r))}},{key:"renderIO",value:function(e,t,n){return(0,Qt.jsx)(Gi,(0,l.A)((0,l.A)({},n),{},{prepareVisibleItems:pe,filterVisibleItems:me,className:ta(e),css:ta("io"),heading:e,items:t}))}},{key:"renderIntermediate",value:function(e,t){var n=this.props.cluster;return(0,Qt.jsxs)("div",{className:ta("intermediate"),children:[(0,Qt.jsx)("div",{className:ea({size:"s"}),children:t}),(0,Qt.jsx)(k.dM,(0,l.A)((0,l.A)({},e),{},{cluster:n}))]})}},{key:"renderTasks",value:function(){var e=this;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return t&&e.renderScript(t)}))}},{key:"render",value:function(){var e=this.props.specification,t=e.mode,n=e.transferTask,r=e.remote,i=e.startedBy,a=e.mapper,o=e.reducer,s=e.reduceCombiner,u=e.input,c=e.intermediate,d=e.output,p=e.stderr,m=e.tasks,h=e.coredumps;return(0,Qt.jsxs)("div",{className:ta(),children:[(n||t)&&this.renderTransferTask((0,l.A)((0,l.A)({},n),{},{mode:t})),r&&this.renderRemote(r),i&&this.renderStartedBy(i),(null==u?void 0:u.length)>0&&this.renderIO("input",u,Zi),c&&this.renderIntermediate(c,"Intermediate"),(null==d?void 0:d.length)>0&&this.renderIO("output",d,Xi),(null==p?void 0:p.length)>0&&this.renderIO("stderr",p,Qi),(null==h?void 0:h.length)>0&&this.renderIO("core",h,Qi),a&&this.renderScript(a),o&&this.renderScript(o),s&&this.renderScript(s),m&&this.renderTasks(m)]})}}])}(r.Component)),ia=n(21952),aa=n(96843),oa=n.n(aa),sa=n(70243),la=n(84806),ua=(0,i.A)("operation-jobs-detailed"),ca=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderSection",value:function(e,t){return(0,Qt.jsxs)("div",{className:"elements-section",children:[(0,Qt.jsx)("div",{className:"elements-heading elements-heading_size_s",children:e}),(0,Qt.jsx)(k.Ay,{items:t})]})}},{key:"renderHelpLink",value:function(e){return(0,fe.fs)((0,Qt.jsx)("div",{className:"elements-section",children:(0,Qt.jsxs)(ln.A,{url:e,children:[(0,Qt.jsx)(Cn.A,{awesome:"book"})," Help"]})}))}},{key:"renderAborted",value:function(e){var t=e.scheduled.counters,n=[{key:"total",value:e.scheduled.total}].concat((0,A.A)(t)),r=e.nonScheduled.counters,i=[{key:"total",value:e.nonScheduled.total}].concat((0,A.A)(r)),a=q.Ay.docsUrls["operations:overview#aborted_jobs"];return(0,Qt.jsxs)("div",{className:"pretty-scroll",children:[this.renderSection("Scheduled",n),this.renderSection("Non scheduled",i),this.renderHelpLink(a)]})}},{key:"renderCompleted",value:function(e){var t=[{key:"total",value:e.nonInterrupted.total}],n=e.interrupted.counters,r=[{key:"total",value:e.interrupted.total}].concat((0,A.A)(n)),i=q.Ay.docsUrls["operations:overview#completed_jobs"];return(0,Qt.jsxs)("div",{className:"pretty-scroll",children:[this.renderSection("Non interrupted",t),this.renderSection("Interrupted",r),this.renderHelpLink(i)]})}},{key:"renderModalContent",value:function(e){var t=this.props.item;return"aborted"===e?this.renderAborted(t.abortedStats):this.renderCompleted(t.completedStats)}},{key:"renderCount",value:function(e,t,n){return"aborted"===e?(0,Qt.jsxs)("span",{children:[S.A.format.Number(t)," (",S.A.format.Number(n),")"]}):(0,Qt.jsx)("span",{children:S.A.format.Number(t+n)})}},{key:"render",value:function(){var e=this.props,t=e.primaryValue,n=e.secondaryValue,r=e.handleClose,i=e.handleShow,a=e.visible,o=e.type,s=e.item,l="".concat(S.A.format.ReadableField(o)," statistics: ").concat(s.caption),u=this.renderModalContent(o);return(0,Qt.jsxs)(sa.s,{className:ua(),gap:1,children:[(0,Qt.jsxs)(ln.A,{theme:"ghost",size:"xs",onClick:i,children:["View"," "]}),this.renderCount(o,t,n),(0,Qt.jsx)(sn.A,{onOutsideClick:r,onCancel:r,content:u,visible:a,footer:!1,title:l})]})}}])}(r.Component);const da=(0,la.A)(ca);function pa(e,t){return S.A.utils.compareVectors(["other"===e.key?1:-1,e.key],["other"===t.key?1:-1,t.key],"asc")}function ma(e,t){if("object"===(0,be.A)(e[t])){var n=g()(e[t],(function(e,t,n){return e.counters.push({value:t,key:n}),e.total+=t,e}),{counters:[],total:0});return n.counters.sort(pa),n}return{total:e[t]}}function ha(e){var t=e.completed;return{interrupted:ma(t,"interrupted"),nonInterrupted:ma(t,"non-interrupted"),total:t.total}}function fa(e){var t=e.aborted;return{scheduled:ma(t,"scheduled"),nonScheduled:ma(t,"non_scheduled"),total:t.total}}function va(e){return{counters:e,abortedStats:fa(e),completedStats:ha(e)}}var ga={theme:"light",striped:!1,virtual:!1,size:"m",columns:function(){var e=["total","pending","running","completed","failed","aborted","lost"],t={job_type:{sort:!1,align:"left",caption:"Task"}};return V()(e,(function(e){t[e]={sort:!1,align:"right"}})),t.actions={name:"actions",sort:"false",caption:""},{items:(0,Pe.TU)(t),sets:{default:{items:["job_type"].concat(e)},withActions:{items:f()(t,(function(e,t){return t}))}},mode:"default"}}(),computeKey:function(e){return e.type}},Aa=n(50432),ba=n(29347),ja=n.n(ba),xa=n(81214),ya=n.n(xa),_a=n(37918),wa=n.n(_a),ka=n(23488),Na=n.n(ka),Sa=n(70969),Ta=n.n(Sa);function Ca(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(t(e))n(r,void 0,e);else{if(!e)return;r.length&&n(r,e,void 0),Object.keys(null!=e?e:{}).forEach((function(i){r.push(i),Ca(e[i],t,n,r),r.pop()}))}}function Ra(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=!0,o={};return Object.keys(e).forEach((function(s){i.push(s);var l=e[s];if(t(l)){if(n(i,void 0,l)){var u=r?r(l):l;void 0!==u&&(o[s]=u,a=!1)}}else if(n(i,l,void 0)){var c=Ra(l,t,n,r,i);void 0!==c&&(o[s]=c,a=!1)}i.pop()})),a?void 0:o}function Ea(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return Object.keys(e).some((function(i){r.push(i);var a=e[i];if(t(a)){if(n(r,void 0,a))return!0}else{if(n(r,a,void 0))return!0;if(Ea(a,t,n,r))return!0}return r.pop(),!1}))}var Ia=n(23860),Pa=["running"],Oa=["running"],za=function(e){return e.operations.detail.operation},Ma=(0,_e.Mz)([za],(function(e){return N.A.getValue(e,"/@progress/job_statistics_v2")}));function Va(e){return Array.isArray(e)}var Fa=(0,_e.Mz)([Ma],(function(e){var t,n,r=null!==(t=null==e||null===(n=e.time)||void 0===n?void 0:n.total)&&void 0!==t?t:[],i=g()(r,(function(e,t){return V()(t.tags,(function(t,n){var r=n;t&&(e[r]||(e[r]=new Set),e[r].add(t))})),e}),{});return g()(i,(function(e,t,n){return e[n]=(0,Aa.A)(Array,(0,A.A)(t.values())),e}),{})})),Da=(0,_e.Mz)([function(e){return e.operations.statistics.jobTypeFilter},function(e){return e.operations.statistics.poolTreeFilter},function(e){return e.operations.statistics.filterText},Fa],(function(e,t,n,r){var i=r.job_type,a=r.pool_tree;return{activeJobType:-1===i.indexOf(e)?Ia.FB:e,activePoolTree:-1===a.indexOf(t)?Ia.FB:t,filterText:n}})),La=function(e){return!oa()(Ma(e))},Ba=(0,_e.Mz)([Da,Ma],(function(e,t){var n=e.activeJobType,r=e.activePoolTree,i=e.filterText;if(!n&&!r&&!i)return t;var a=i.length?function(e){return-1!==e.join("/").indexOf(i)}:function(){return!0};return Ra(null!=t?t:{},Va,(function(e,t){return!!a(e)||t&&Ea(t,Va,a,e.slice())}),(function(e){return W()(e,(function(e){var t=e.tags,i=t.job_type,a=t.pool_tree;return!(n&&i!==n||r&&a!==r)}))}))})),Ja=(0,_e.Mz)([Ba],(function(e){var t=[];return Ca(null!=e?e:{},Va,(function(e,n,r){var i=Boolean(r);t.push({title:e[e.length-1],level:e.length-1,data:r?Ua(r):void 0,isLeafNode:i,name:e.join("/")})})),t}));function Ua(e){var t={};return V()(e,(function(e){var n=e.summary,r=e.tags.job_state;t[r]=function(e,t){if(!t)return e;var n=Ta()([e.count,t.count]),r=Ta()([e.sum,null==t?void 0:t.sum]);return{min:wa()([e.min,t.min]),max:Na()([e.max,t.max]),count:n,sum:r}}(n,t[r])})),t}var Ha=(0,_e.Mz)(Ma,(function(e){var t;return $a(null==e||null===(t=e.time)||void 0===t?void 0:t.total)}));function $a(e){var t=Ua(null!=e?e:[]),n=(t.running,(0,je.A)(t,Pa)),r=ja()(f()(n,"sum"));return r.length?Ta()(r):In.A.NO_VALUE}var Wa=["job_proxy.cpu.user","job_proxy.cpu.system","user_job.cpu.user","user_job.cpu.system"],qa=(0,_e.Mz)([Ma],(function(e){var t=g()(Wa,(function(t,n){var r=ya()(e,n);if(Va(r)){var i=$a(r);void 0!==i&&t.push(i)}return t}),[]);return t.length?Ta()(t):In.A.NO_VALUE})),Ya=(0,_e.Mz)([za,Ma],(function(e,t){var n,r,i,a,o=function(e){if(U(e))return function(e){var t=N.A.getValue(e,"/@progress/tasks"),n=f()(t,(function(e){var t=e.task_name,n=e.job_type,r=e.job_counter;return(0,l.A)((0,l.A)({type:t,caption:t,jobType:n},va(r)),{},{info:e})})),r=N.A.getValue(e,"/@progress/total_job_counter");return n.push((0,l.A)((0,l.A)({type:"total",caption:"total",jobType:"total"},va(r)),{},{info:r,isTotal:!0})),n}(e);var t=N.A.getValue(e,"/@progress/data_flow_graph"),n=N.A.getValue(t,"/topological_ordering"),r=N.A.getValue(t,"/vertices"),i=[];return t&&(n=function(e){return(e=W()(e,(function(e){var t=String(e).toLowerCase();return"source"!==t&&"sink"!==t}))).push("total"),e}(n),n=W()(n,(function(e){return void 0!==r[e]})),i=f()(n,(function(e){return{type:e,jobType:"total"===e?e:r[e].job_type,counters:r[e].job_counter}})),i=f()(i,(function(e){var t=e.type,n=e.counters;return(0,l.A)({type:t,caption:t,jobType:e.jobType},va(n))}))),i}(e),s=Ua(null!==(n=null==t||null===(r=t.time)||void 0===r?void 0:r.total)&&void 0!==n?n:[]),u=(s.running,(0,je.A)(s,Oa)),c=null===(i=u.aborted)||void 0===i?void 0:i.sum,d=null===(a=u.completed)||void 0===a?void 0:a.sum,p=function(e,t){var n;return void 0!==t&&void 0!==e&&(e>0&&t>0?n=e/t*100:e>0?n=100:t>0&&(n=0)),n}(c,d),m=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,a=null!==(t=null===(n=Ua((null==e||null===(r=e.data)||void 0===r||null===(r=r.input)||void 0===r?void 0:r.data_weight)||[]).completed)||void 0===n?void 0:n.sum)&&void 0!==t?t:0;return a>0?a/(i/1e3):void 0}(t||{},d),h=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,a=null!==(t=null===(n=Ua((null==e||null===(r=e.data)||void 0===r||null===(r=r.input)||void 0===r?void 0:r.row_count)||[]).completed)||void 0===n?void 0:n.sum)&&void 0!==t?t:0;return i>0?a/(i/1e3):void 0}(t||{},d);return u||c||d||p||m||m||0!==o.length?{items:o,abortedJobsTime:c,completedJobsTime:d,abortedJobsTimeRatio:p,averageReadDataRate:m,averageReadRowRate:h}:{items:[]}})),Ga=(0,i.A)("jobs");function Ka(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[];return V()(e,(function(e){n.push(e);var r=e.caption;t[r]&&n.push({taskInfo:e.info})})),{items:e,visibleItems:n}}var Za=function(e){function t(e){var n;(0,b.A)(this,t),(n=(0,x.A)(this,t,[e])).state={allowActions:!1,expandedState:{},visibleItems:[],items:[],operation:void 0},n.templates=void 0;var i=n;return n.templates={__default__:function(e,t){return e.counters?(0,Qt.jsx)("span",{children:S.A.format.Number(e.counters[t])}):null},aborted:function(e){if(null==e||!e.abortedStats)return null;var t=e.abortedStats,n=t.scheduled,r=t.nonScheduled;return(0,Qt.jsx)(da,{title:"Aborted statistics: ".concat(e.caption),secondaryValue:r.total,primaryValue:n.total,type:"aborted",item:e})},completed:function(e){if(null==e||!e.completedStats)return null;var t=e.completedStats,n=t.nonInterrupted,r=t.interrupted;return(0,Qt.jsx)(da,{title:"Completed statistics: ".concat(e.caption),secondaryValue:r.total,primaryValue:n.total,type:"completed",item:e})},job_type:function(e){var t=e.caption,n=e.jobType,a=e.taskInfo,o=e.isTotal;if(a)return(0,Qt.jsx)(Xa,(0,l.A)({},a));var s=i.state,u=s.expandedState,c=s.allowActions,d=!o&&c&&t,p=u[t],m=d?function(){return i.toggleExpand(t)}:void 0;return(0,Qt.jsxs)("div",{className:Ga("job-type"),children:[(0,Qt.jsx)("div",{children:Boolean(t)&&(0,Qt.jsx)(Mi.A,{visible:Boolean(m),expanded:Boolean(p),onClick:m})}),(0,Qt.jsxs)("div",{onClick:m,className:Ga("name",{clickable:Boolean(d)}),children:[(0,Qt.jsx)("span",{title:"Task ".concat(t),children:t}),!o&&(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)("br",{}),void 0!==e.jobType&&(0,Qt.jsx)("span",{className:"elements-secondary-text",title:"Job type ".concat(n),children:n})]})]})]})},actions:function(e){var t=e.info,n=e.caption;return t?(0,Qt.jsx)(zi.A,{title:"Tasks: ".concat(n),attributes:t}):null}},n}return(0,y.A)(t,e),(0,j.A)(t,[{key:"toggleExpand",value:function(e){var t=(0,l.A)({},this.state.expandedState);t[e]?delete t[e]:t[e]=!0,this.setState((0,l.A)({expandedState:t},Ka(this.state.items,t)))}},{key:"rowClassName",value:function(e){return e.taskInfo?Ga("row-task-info"):e.isTotal?Ga("row-total"):void 0}},{key:"colSpan",value:function(e,t,n){if(e.taskInfo&&0===n)return 8}},{key:"render",value:function(){var e,t=this.props,n=t.className,r=t.jobs,i=t.collapsibleSize;return null!=r&&null!==(e=r.items)&&void 0!==e&&e.length?(0,Qt.jsx)(Ri.A,{name:"Tasks",className:n,size:i,marginDirection:"bottom",children:this.renderContent()}):null}},{key:"renderContent",value:function(){var e=this.props.jobs,t=e.abortedJobsTimeRatio,n=e.abortedJobsTime,r=e.completedJobsTime,i=e.averageReadDataRate,a=e.averageReadRowRate,o=e.items,s=this.state,u=s.allowActions,c=s.visibleItems;return(0,Qt.jsxs)("div",{className:Ga(),children:[(0,Qt.jsx)(k.Ay,{items:[[{key:"aborted_jobs_time_ratio",value:(0,Qt.jsx)(k.Bj.FormattedValue,{value:t,format:"Percent"})},{key:"aborted_jobs_time",value:(0,Qt.jsx)(k.Bj.FormattedValue,{value:n,format:"TimeDuration"})},{key:"completed_jobs_time",value:(0,Qt.jsx)(k.Bj.FormattedValue,{value:r,format:"TimeDuration"})}],[{key:"average_read_data_rate",value:(0,Qt.jsx)(k.Bj.FormattedValue,{value:i,format:"BytesPerSecond"})},{key:"average_read_row_rate",value:(0,Qt.jsx)(k.Bj.FormattedValue,{value:a,format:function(e){return S.A.format.NumberPerSecond(e,{measure:"rows"})}})}]]}),(0,Qt.jsx)("div",{className:Ga("table-container"),children:o.length>0&&(0,Qt.jsx)(Nn.A,(0,l.A)((0,l.A)({},ga),{},{columnsMode:u?"withActions":void 0,items:c,css:Ga(),templates:this.templates,rowClassName:this.rowClassName,colSpan:this.colSpan}))})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.operation,r=e.jobs.items,i=t.operation,a=t.items,o=t.expandedState,s={};return n!==i&&Object.assign(s,{operation:n,allowActions:U(n)}),r!==a&&Object.assign(s,(0,l.A)({},Ka(r,o))),oa()(s)?null:s}}])}(r.Component);function Xa(e){var t=e.job_type,n=e.has_user_job,r=e.input_finished,i=e.completed,a=e.user_job_memory_reserve_factor,o=e.start_time,s=e.completion_time,l=e.ready_time,u=e.exhaust_time,c=N.A.getValue(l),d=N.A.getValue(u),p=c+d;return(0,Qt.jsx)(k.Ay,{className:Ga("info-meta"),items:[[{key:"job_type",value:(0,Qt.jsx)(k.Bj.Value,{value:N.A.getValue(t)})},{key:"has_user_job",value:(0,Qt.jsx)(k.Bj.Readable,{value:String(N.A.getValue(n))})},{key:"input_finished",value:(0,Qt.jsx)(k.Bj.Readable,{value:String(N.A.getValue(r))})},{key:"completed",value:(0,Qt.jsx)(k.Bj.Readable,{value:String(N.A.getValue(i))})},{key:"user_job_memory_reserve_factor",value:(0,Qt.jsx)(k.Bj.Number,{value:N.A.getValue(a)})},{key:"start_time",value:(0,Qt.jsx)(k.Bj.Time,{time:N.A.getValue(o)})},{key:"completion_time",value:(0,Qt.jsx)(k.Bj.Time,{time:N.A.getValue(s)})}],[{key:"ready_time",value:(0,Qt.jsx)(k.Bj.Time,{time:c,valueFormat:"TimeDuration",settings:{format:"milliseconds"}})},{key:"exhaust_time",value:(0,Qt.jsx)(k.Bj.Time,{time:d,valueFormat:"TimeDuration",settings:{format:"milliseconds"}})},{key:"tail_time_fraction",value:0===p?"n/a":(0,Qt.jsx)(k.Bj.FormattedValue,{value:d/p*100,format:"Percent",settings:{digits:1}})}]]})}const Qa=(0,u.Ng)((function(e){return{jobs:Ya(e),operation:e.operations.detail.operation}}))(Za);var eo=n(62250),to=(0,i.A)("operation-details"),no=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).handleEditClick=function(){var t=e.props,n=t.operation;(0,t.showEditPoolsWeightsModal)(n)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderDescription",value:function(){var e=this.props.operation,t=e.description,n=e.collapsibleSize;return t&&(0,Qt.jsx)(Ri.A,{name:"Description",className:to("description"),size:n,marginDirection:"bottom",children:(0,Qt.jsx)(Ci,{description:t})})}},{key:"renderSpecification",value:function(){var e=this.props,t=e.specification,n=e.cluster,r=e.collapsibleSize;return(0,Qt.jsx)(Ri.A,{name:"Specification",className:to("specification"),size:r,marginDirection:"bottom",children:(0,Qt.jsx)(ra,{specification:t,cluster:n})})}},{key:"renderAlerts",value:function(){var e=this.props,t=e.alertEvents,n=e.collapsibleSize;return null!=t&&t.length?(0,Qt.jsx)(Ri.A,{name:"Alerts",size:n,marginDirection:"bottom",children:(0,Qt.jsx)(Si,{items:t})}):null}},{key:"renderError",value:function(){var e=this.props.error;return e&&(0,Qt.jsx)("div",{className:to("result"),children:(0,Qt.jsx)(on.z,(0,l.A)((0,l.A)({},e),{},{disableLogger:!0}))})}},{key:"renderRuntimeOverview",value:function(){return(0,Qt.jsxs)(Tn.A,{size:"s",onClick:this.handleEditClick,title:"Edit pools and weights",className:to("edit-button"),children:[(0,Qt.jsx)(Cn.A,{awesome:"pencil"})," Edit"]})}},{key:"renderRuntime",value:function(){var e=this.props,t=e.runtime,n=e.operation,r=e.cluster,i=e.collapsibleSize;return(null==t?void 0:t.length)>0&&(0,Qt.jsx)(Ri.A,{name:"Runtime",className:to("runtime"),overview:this.renderRuntimeOverview(),size:i,marginDirection:"bottom",children:(0,Qt.jsx)(an,{runtime:t,operation:n,cluster:r})})}},{key:"renderJobs",value:function(){var e=this.props.collapsibleSize;return(0,Qt.jsx)(Qa,{className:to("jobs"),size:e})}},{key:"renderResources",value:function(){var e=this.props,t=e.resources,n=e.intermediateResources,r=e.operation,i=e.collapsibleSize;return t&&"vanilla"!==r.type&&(0,Qt.jsx)(Ri.A,{name:"Data flow",className:to("resources"),size:i,marginDirection:"bottom",children:(0,Qt.jsx)(Ui,{operation:r,resources:t,intermediateResources:n})})}},{key:"renderEvents",value:function(){var e=this.props,t=e.events,n=e.collapsibleSize;return t&&(0,Qt.jsx)(Ri.A,{name:"Events",className:to("events"),size:n,marginDirection:"bottom",children:(0,Qt.jsx)(ia.A,{events:t})})}},{key:"render",value:function(){return(0,Qt.jsxs)("div",{className:to(),children:[(0,Qt.jsxs)("div",{className:to("section"),children:[this.renderDescription(),this.renderSpecification()]}),(0,Qt.jsxs)("div",{className:to("section"),children:[this.renderAlerts(),this.renderError(),this.renderRuntime(),this.renderJobs(),this.renderResources(),this.renderEvents()]})]})}}])}(r.Component),ro={showEditPoolsWeightsModal:Zt},io=(0,u.Ng)((function(e){var t=e.operations,n=e.global.cluster,r=t.detail.operation;return(0,l.A)((0,l.A)({cluster:n,operation:r},t.detail.details),{},{collapsibleSize:eo.Y1,alertEvents:Ue(e)})}),ro)(no);function ao(){var e=(0,u.d4)(Ye);return(0,Xr.v)({type:Dt.c.OPERATION_TAB_DETAILS,additionalStartType:Dt.c.OPERATION,startDeps:[e],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Oe.RP)(t)}}),(0,Qr.ol)({type:Dt.c.OPERATION_TAB_DETAILS,stopDeps:[e],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Oe.RP)(t)}}),(0,Qt.jsx)(io,{})}var oo=n(31680),so=n.n(oo),lo=n(38756),uo=n(31229),co=["id","emptyContent"];function po(e){var t=e.id,n=e.emptyContent,r=void 0===n?null:n,i=(0,je.A)(e,co),a=uo.mH.trackerBaseUrl,o="".concat(a,"/").concat(t);return t?(0,Qt.jsx)(ln.A,(0,l.A)((0,l.A)({},i),{},{url:a?o:void 0,children:t})):(0,Qt.jsx)(Qt.Fragment,{children:r})}const mo=r.memo(po);var ho=n(4386),fo=n(88358),vo=["fraction"],go=(0,i.A)("experiment-assignments");const Ao=r.memo(jo);var bo=r.memo(xo);function jo(e){var t=e.className,n=(0,u.d4)(Ze),i=(0,u.d4)($e),a=r.useState(!0),s=(0,o.A)(a,2),l=s[0],c=s[1],d=r.useCallback((function(){c(!l)}),[l,c]);return null!=n&&n.length?(0,Qt.jsx)(Ri.O,{className:go(null,t),name:"Experiments",onToggle:d,collapsed:l,size:eo.Y1,marginDirection:"bottom",children:f()(n,(function(e,t){return(0,Qt.jsx)(bo,{data:e,operationId:i},t)}))}):null}function xo(e){var t=e.data,n=e.operationId,i=r.useState(!1),a=(0,o.A)(i,2),s=a[0],l=a[1],c=N.A.getValue(t,"/effect"),d=(c.fraction,(0,je.A)(c,vo)),p=(0,u.d4)(ho.MZ),m=r.useCallback((function(){l(!s),window.dispatchEvent(new Event("resize"))}),[s,l]);return(0,Qt.jsxs)("div",{children:[(0,Qt.jsx)(k.Ay,{items:[[{key:"Experiment",value:N.A.getValue(t,"/experiment")},{key:"Group",value:N.A.getValue(t,"/group")}],[{key:"Ticket",value:(0,Qt.jsx)(mo,{id:N.A.getValue(t,"/ticket")})},{key:"Dimension",value:N.A.getValue(t,"/dimension")}],[{key:"Effect",value:(0,Qt.jsx)(yi.S,{onClick:m,children:s?"Hide":"Show"})}]]}),s&&(0,Qt.jsx)(un.A,{value:d,settings:p,folding:!0,virtualized:!0,extraTools:(0,Qt.jsx)(fo.O,{value:d,settings:p,name:"experiment_assignments_".concat(n)})})]})}var yo=(0,i.A)("operation-specification"),_o=so()((function(){window.dispatchEvent(new Event("resize"))}),100,{leading:!1}),wo=(0,u.Ng)((function(e){return{operation:e.operations.detail.operation,operationId:$e(e)}}))((function(e){var t=e.operation,n=e.operationId,i=q.Ay.docsUrls["operations:operations_options"],a=t.typedProvidedSpec||t.typedSpec,s=t.typedUnrecognizedSpec||{},l=t.typedFullSpec,u=m()(s).length>0,c=r.useState({provided:u,unrecognized:!1,resulting:!0}),d=(0,o.A)(c,2),p=d[0],h=d[1],f=r.useCallback((function(e){h({unrecognized:!0,resulting:!0,provided:e}),_o()})),v=r.useCallback((function(e){h({unrecognized:e,provided:!0,resulting:!0}),_o()})),g=r.useCallback((function(e){h({unrecognized:!0,resulting:e,provided:!0}),_o()}));return(0,Qt.jsx)(si.A,{children:(0,Qt.jsxs)("div",{className:yo(),children:[(0,fe.fs)((0,Qt.jsx)("div",{className:yo("help","elements-section"),children:(0,Qt.jsx)(lo.A,{url:i})})),(0,Qt.jsx)(Ri.O,{name:"Provided specification",onToggle:f,collapsed:p.provided,size:eo.Y1,marginDirection:"bottom",children:(0,Qt.jsx)(un.A,{value:a,settings:bn.A.prepareSettings(),folding:!0,virtualized:!0,extraTools:(0,Qt.jsx)(fo.O,{value:a,settings:bn.A.prepareSettings(),name:"provider_specification_".concat(n)})})}),(0,Qt.jsx)(Ao,{}),u&&(0,Qt.jsx)(Ri.O,{name:"Unrecognized specification",onToggle:v,collapsed:p.unrecognized,size:eo.Y1,marginDirection:"bottom",children:(0,Qt.jsx)(un.A,{value:s,settings:bn.A.prepareSettings(),folding:!0,virtualized:!0,extraTools:(0,Qt.jsx)(fo.O,{value:s,settings:bn.A.prepareSettings(),name:"unrecognized_specification_".concat(n)})})}),l&&(0,Qt.jsx)(Ri.O,{name:"Resulting specification",onToggle:g,collapsed:p.resulting,size:eo.Y1,marginDirection:"bottom",children:(0,Qt.jsx)(un.A,{value:l,settings:bn.A.prepareSettings(),folding:!0,virtualized:!0,extraTools:(0,Qt.jsx)(fo.O,{value:l,settings:bn.A.prepareSettings(),name:"resulting_specification_".concat(n)})})})]})})}));function ko(){var e=(0,u.d4)(Ye);return(0,Xr.v)({type:Dt.c.OPERATION_TAB_SPECIFICATION,additionalStartType:Dt.c.OPERATION,startDeps:[e],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Oe.RP)(t)}}),(0,Qr.ol)({type:Dt.c.OPERATION_TAB_SPECIFICATION,stopDeps:[e],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Oe.RP)(t)}}),(0,Qt.jsx)(wo,{})}var No=n(5675),So=n(33023),To=n(44543),Co=(0,i.A)("operation-detail-job-sizes"),Ro=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).state={showEstimated:!1},e.formatX=function(t){var n=e.state.formatSettings;return In.A.Bytes(t,n)},e.renderTooltip=function(e,t,n){return"<b>".concat(e,"</b> jobs have estimated input job size from <b>").concat(t,"</b> to <b>").concat(n,"</b>")},e.toggleEstimated=function(){var t=e.state.showEstimated;e.setState({showEstimated:!t})},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"render",value:function(){var e=this.props.className;return(0,Qt.jsx)(No.Ay,{className:e,content:this.renderContent(),toolbar:(0,Qt.jsx)(So.M,{itemsToWrap:[{name:"showEstimated",node:(0,Qt.jsx)(_r.S,{size:"l",onUpdate:this.toggleEstimated,checked:this.state.showEstimated,children:"Show estimated"})}]})})}},{key:"prepareJobSizes",value:function(){var e=this.props.operation,t=N.A.getValue(e,"/@progress");return t?{estimatedJobSizeHistogram:N.A.getValue(t,"/estimated_input_data_size_histogram"),jobSizeHistogram:N.A.getValue(t,"/input_data_size_histogram")}:{}}},{key:"renderChart",value:function(e,t){return e?(0,Qt.jsxs)("div",{className:Co("chart-section"),children:[(0,Qt.jsx)("div",{className:"elements-heading elements-heading_size_m",children:t}),(0,Qt.jsx)(mi,{className:Co("charts"),data:e,yLabel:"job count",xLabel:"job input data weight",xFormat:this.formatX,yMin:.5,yLogarithmic:!0,renderTooltip:this.renderTooltip})]}):null}},{key:"renderPerTaskCharts",value:function(e){var t=this,n=this.state.showEstimated;return f()(e,(function(e){var r=e.task_name,i=e.estimated_input_data_weight_histogram,a=e.input_data_weight_histogram;return(0,Qt.jsxs)("div",{className:Co("task-cell",{"per-task":!0}),children:[t.renderChart(a,'Task "'.concat(r,'" actual data weight')),n&&t.renderChart(i,'Task "'.concat(r,'" estimated data weight'))]},r)}))}},{key:"renderCommon",value:function(){var e=this.state.showEstimated,t=this.prepareJobSizes(),n=t.jobSizeHistogram,r=t.estimatedJobSizeHistogram;return(0,Qt.jsxs)("div",{className:Co("task-cell"),children:[this.renderChart(n,"Input"),e&&this.renderChart(r,"Estimated input")]})}},{key:"renderContent",value:function(){var e=this.props.operation,t=N.A.getValue(this.props.operation,"/@progress/tasks");return(0,Qt.jsx)(si.A,{children:(0,Qt.jsx)("div",{className:Co(),children:(0,To.H)(e)?this.renderPerTaskCharts(t):this.renderCommon()})})}}],[{key:"getDerivedStateFromProps",value:function(e){var t=N.A.getValue(e.operation,"/@progress"),n=t&&N.A.getValue(t,"/partition_size_histogram");return{formatSettings:fi(n,In.A.Bytes),data:n}}}])}(r.Component),Eo=(0,u.Ng)((function(e){return{operation:e.operations.detail.operation,chartKitTheme:(0,Le.O4)(e)}}))(Ro);function Io(e){var t=(0,u.d4)(Ye);return(0,Xr.v)({type:Dt.c.OPERATION_TAB_JOB_SIZES,additionalStartType:Dt.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Oe.RP)(t)}}),(0,Qr.ol)({type:Dt.c.OPERATION_TAB_JOB_SIZES,stopDeps:[t],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Oe.RP)(t)}}),(0,Qt.jsx)(Eo,(0,l.A)({},e))}var Po=n(16883),Oo={completed:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Completed jobs — those which have finished successfully (i.e. consumed entire input and exited with zero exit code). Please note that due to hardware failures some jobs may be run more than once."}},aborted:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Aborted jobs — those with soft failure (i.e. resource overdraft or preemption). Please note that some of aborted jobs may be excluded from statistics."}},failed:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Failed jobs — those with hard failure (i.e. exited with non-zero exit code). Please note that some of failed jobs may be excluded from statistics."}},lost:{sort:!1,align:"right",tooltipProps:{placement:"bottom",content:"Lost jobs — those which have finished successfully but whose results were lost (typically due to hardware failures)."}}},zo={theme:"light",size:"s",striped:!1,computeKey:function(e){return"<Root>/".concat(e.name)},tree:!0,columns:{sets:{default:{items:["metric"].concat(Object.keys(Oo))}},items:(0,l.A)((0,l.A)({},Oo),{},{metric:{sort:!1,align:"left"}}),mode:"default"}},Mo=n(80016),Vo=n(16455),Fo=n(10795);function Do(e){return(0,(0,u.d4)(Vo.jS).getStatisticInfo)(e)}function Lo(e){var t=e.name,n=e.title,r=Do(t);return(0,Qt.jsx)(Fo.Ye,{title:n,info:r})}function Bo(e){var t=e.name,n=e.settings,r=e.value,i=Do(t),a=(0,Fo.Dz)(r,null==i?void 0:i.unit,n),o=In.A.Number(r,n);return void 0!==a?(0,Qt.jsx)(Rn.m,{placement:["right","left"],content:(0,Qt.jsxs)(sa.s,{gap:1,children:[(0,Qt.jsxs)("span",{children:[" ",o]}),!isNaN(r)&&(0,Qt.jsx)(kn.A,{text:"".concat(r),inlineMargins:!0,view:"flat-outlined"})]}),children:a}):o}var Jo=r.memo(Bo),Uo=r.memo(Lo),Ho=(0,i.A)("operation-statistics"),$o=(0,i.A)("elements-toolbar"),Wo=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).collapseTable=function(){return e.props.setTreeState(Ia.VN.COLLAPSED)},e.expandTable=function(){return e.props.setTreeState(Ia.VN.EXPANDED)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"componentWillUnmount",value:function(){this.expandTable()}},{key:"template",get:function(){var e=this.props,t=e.setTreeState,n=e.activeAggregation,r=void 0===n?"avg":n;return{metric:function(e,n,r,i){var a={paddingLeft:40*e.level};if(e.isLeafNode)return(0,Qt.jsxs)("span",{className:Ho("metric"),style:a,children:[(0,Qt.jsx)(Cn.A,{className:Ho("metric-icon"),awesome:"chart-line"}),(0,Qt.jsx)(Uo,{name:e.name,title:e.title})]});var o=i.collapsed||i.empty?"angle-down":"angle-up",s=i.collapsed||i.empty?"folder":"folder-open";return(0,Qt.jsxs)("span",{className:Ho("group"),style:a,onClick:function(){i.empty||(r.apply(void 0,arguments),t("mixed"))},children:[(0,Qt.jsx)(Cn.A,{className:Ho("group-icon-toggler"),awesome:o}),(0,Qt.jsx)(Cn.A,{className:Ho("group-icon"),awesome:s}),(0,Qt.jsx)("span",{children:e.title})]})},__default__:function(e,t){if(e.isLeafNode){var n,i,a,o=null===(n=e.data)||void 0===n?void 0:n[t];return"avg"===r?(i=o&&o.count&&o.sum/o.count)<1&&(a={significantDigits:6}):i=o&&o[r],"count"===r?In.A.Number(i,a):(0,Qt.jsx)(Jo,{value:i,settings:a,name:e.name})}return null}}}},{key:"renderToolbar",value:function(){var e=this.props,t=e.filterText,n=e.activeAggregation,r=e.jobTypes,i=e.poolTrees,a=e.activeJobType,o=e.activePoolTree;return(0,Qt.jsx)("div",{className:$o(null,Ho("toolbar")),children:(0,Qt.jsxs)("div",{className:$o("container"),children:[(0,Qt.jsx)("div",{className:$o("component",Ho("filter")),children:(0,Qt.jsx)($n.A,{size:"m",value:t,debounce:Ia.Op,onChange:this.props.changeFilterText})}),i.length>1&&(0,Qt.jsx)("div",{className:$o("component"),children:(0,Qt.jsx)(or.A,{size:"m",value:null!=o?o:"",onUpdate:this.props.changePoolTreeFilter,items:(0,Pe.SA)(i,""),name:"operation-statistics-pool-tree"})}),r.length>1&&(0,Qt.jsx)("div",{className:$o("component"),children:(0,Qt.jsx)(or.A,{size:"m",value:null!=a?a:"",onUpdate:this.props.changeJobType,items:(0,Pe.SA)(r,""),name:"operation-statistics-job-type"})}),(0,Qt.jsx)("div",{className:$o("component"),children:(0,Qt.jsx)(or.A,{size:"m",value:n,onChange:this.props.changeAggregation,items:Ia.ne,name:"operation-statistics-aggregator"})}),(0,Qt.jsxs)("div",{className:$o("component",Ho("expand-collapse")),children:[(0,Qt.jsx)("span",{className:Ho("expand-metrics"),children:(0,Qt.jsx)(Tn.A,{size:"m",title:"Expand All",onClick:this.expandTable,children:(0,Qt.jsx)(Cn.A,{awesome:"arrow-to-bottom"})})}),(0,Qt.jsx)("span",{className:Ho("collapse-metrics"),children:(0,Qt.jsx)(Tn.A,{size:"m",title:"Collapse All",onClick:this.collapseTable,children:(0,Qt.jsx)(Cn.A,{awesome:"arrow-to-top"})})})]}),(0,fe.fs)((0,Qt.jsx)("div",{className:$o("component",Ho("help")),children:(0,Qt.jsx)(lo.A,{url:q.Ay.docsUrls["problems:jobstatistics"]})}))]})})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.treeState,r=e.items;return(0,Qt.jsx)(si.A,{children:(0,Qt.jsxs)("div",{className:Ho(null,t),children:[this.renderToolbar(),(0,Qt.jsx)(Mo.w,{children:(0,Qt.jsx)(Nn.A,(0,l.A)((0,l.A)({},zo),{},{templates:this.template,css:Ho(),treeState:n,items:r}))})]})})}}])}(r.Component),qo={setTreeState:function(e){return{type:Ia.aj,data:{treeState:e}}},changeFilterText:function(e){return{type:Ia.yh,data:{filterText:e}}},changeAggregation:function(e){var t=e.target;return{type:Ia.Wc,data:{activeAggregation:t.value}}},changeJobType:function(e){return function(t,n){t({type:Ia.U8,data:{jobTypeFilter:e}});var r=n(),i=He(r).type,a=(0,Nr.$_)(r);a&&a[i]!==e&&t((0,Po.tX)((0,l.A)((0,l.A)({},a),{},(0,s.A)({},i,e))))}},changePoolTreeFilter:function(e){return function(t){t({type:Ia.U8,data:{poolTreeFilter:e}})}}},Yo=(0,u.Ng)((function(e){var t=e.operations.statistics,n=t.treeState,r=t.activeAggregation,i=Fa(e),a=i.job_type,o=i.pool_tree;return(0,l.A)({items:Ja(e),treeState:n,activeAggregation:r,jobTypes:a,poolTrees:o},Da(e))}),qo)(Wo);function Go(e){var t=(0,u.d4)(Ye);return(0,Xr.v)({type:Dt.c.OPERATION_TAB_STATISTICS,additionalStartType:Dt.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Oe.RP)(t)}}),(0,Qr.ol)({type:Dt.c.OPERATION_TAB_STATISTICS,stopDeps:[t],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Oe.RP)(t)}}),(0,Qt.jsx)(Yo,(0,l.A)({},e))}var Ko=n(85907),Zo=n(33951),Xo=function(e){return e.operations.jobs.jobsErrors},Qo=function(e){return e.operations.jobsOperationIncarnations.filter},es=function(e){return e.operations.jobsOperationIncarnations.availableValues},ts=n(31285),ns=n.n(ts),rs=n(82942),is=new Ve.A,as=new Ve.A,os=function(e){return e.operations.detail.operation};function ss(){return function(e,t){var n=t(),r=(0,Le.Si)(n);return as.removeAllRequests(),De.X8.getJob({parameters:ls(n),cancellation:as.saveCancelToken}).then((function(t){e({type:Ko.dL.SUCCESS,data:{job:t,clusterConfig:r,operationId:os(n).$value}}),e(us())})).catch((function(t){t.code===R().codes.CANCELLED?e({type:Ko.dL.CANCELLED}):e({type:Ko.dL.FAILURE,data:{error:t}})}))}}function ls(e){var t=e.operations.detail.operation,n=e.operations.jobs.filters;return{operation_id:t.$value,job_id:n.jobId.value}}function us(){return function(e,t){var n=t(),r=(0,Le.Si)(n);return De.X8.listJobs({parameters:ds(n),cancellation:as.removeAllAndSave}).then((function(t){var i=t.jobs;e({type:Ko.u2.SUCCESS,data:{jobs:i,clusterConfig:r,operationId:os(n).$value}})})).catch((function(t){t.code===R().codes.CANCELLED?e({type:Ko.u2.CANCELLED}):e({type:Ko.u2.FAILURE,data:{error:t}})}))}}function cs(e){var t,n,r,i=e.operations.detail.operation,a=e.operations.jobs,o=a.filters,s=a.pagination,u=e.tables[Ko.MV],c=Qo(e);return(0,l.A)((0,l.A)((0,l.A)({operation_id:i.$value},function(e,t){var n=e.filterBy.value||e.filterBy.defaultValue;return{state:ps(e,"state"),type:ps(e,"type"),address:"address"===n?ps(e,"address"):void 0,with_stderr:ps(e,"withStderr"),with_monitoring_descriptor:ps(e,"withMonitoringDescriptor"),with_fail_context:ps(e,"withFailContext"),with_spec:ps(e,"withSpec"),with_competitors:ps(e,"withCompetitors"),sort_field:t.field||"none",sort_order:t.asc?"ascending":"descending",task_name:ps(e,"taskName")}}(o,u)),(n=(t=s).offset,r=t.limit,{offset:Math.max(0,n),limit:r+Ko.Ym})),{},{operation_incarnation:c||void 0})}function ds(e){var t=e.operations.detail.operation,n=e.operations.jobs.job,r=e.tables[Ko.MV];return{operation_id:t.$value,job_competition_id:null==n?void 0:n.attributes.job_competition_id,sort_field:r.field||"none",sort_order:r.asc?"ascending":"descending"}}function ps(e,t){var n=e[t];return n.value===n.defaultValue?void 0:n.value}var ms=new Ve.A;function hs(){return function(e,t){var n=t(),r=Ee(n),i=os(n);if(e(function(e){return function(t){return is.removeAllRequests(),t(rs.wd.onRequest({operationId:e.id})),"vanilla"!==e.type?t(rs.wd.onReset()):De.Qq.listJobs(De.Vu.jobsOperationIncarnations,{parameters:{operation_id:e.id,limit:1e3},cancellation:is.removeAllAndSave}).then((function(e){t(rs.wd.onSuccess({availableValues:ns()(ja()(e.jobs.map((function(e){return e.operation_incarnation}))))}))}))}}({id:i.id,type:i.type})),r)return e(ss());e({type:Ko.kf.REQUEST});var a=[{command:"list_jobs",parameters:cs(n)}],s=(0,Le.Si)(n);return De.Qq.executeBatch(De.Vu.operationGetJobs,{parameters:{requests:a},cancellation:ms.removeAllAndSave}).then((function(t){var n=(0,o.A)(t,1)[0];if(n.error)return Promise.reject(n.error);var r=n.output,a=r.jobs,l=r.errors,u=r.state_counts,c=r.type_counts;e({type:Ko.kf.SUCCESS,data:{jobs:a,jobsErrors:l,operationId:i.id,clusterConfig:s}}),e({type:Ko.bZ,data:{stateCounters:u,typeCounters:c}})})).catch((function(t){(0,Ve.m)(t)||e({type:Ko.kf.FAILURE,data:{error:t}})}))}}function fs(e){return{type:Ko.Sd,data:e}}function vs(e){return function(t){var n=e.name,r=e.value,i="state"===n;!i||"completed"!==r&&"failed"!==r&&"aborted"!==r?i&&("all"===r||"running"===r)&&t((0,Zo.V)({tableId:Ko.MV,columnName:"start_time",asc:!0})):t((0,Zo.V)({tableId:Ko.MV,columnName:"finish_time",asc:!1})),"jobId"!==n||r||t({type:Ko.Ru}),t(fs(e)),t(As(wr.b4.FIRST))}}function gs(e){return function(t){var n=e.id;t({type:Ko.qE.REQUEST}),De.X8.getJobInputPaths({job_id:n,output_format:Kt.r$}).then((function(e){t({type:Ko.qE.SUCCESS,data:e})})).catch((function(e){e.code!==R().codes.CANCELLED&&t({type:Ko.qE.FAILURE,data:{error:e}})}))}}function As(e){return function(t,n){var r=n().operations.jobs.pagination,i=r.limit,a=r.offset,o=null;switch(e){case wr.b4.FIRST:o=0;break;case wr.b4.NEXT:o=a+i;break;case wr.b4.PREV:if((o=Math.max(0,a-i))===a)return;break;default:return}t({type:Ko.GN,data:o}),t(hs())}}var bs=n(63588),js=n(32235),xs=n(80999),ys=n(63366),_s=n(42324),ws=n(57614),ks=n(62911);var Ns=n(33497),Ss=n(40860);function Ts(){}Ts.Error=function(e){var t=e.error,n=(0,u.wA)();return(0,Qt.jsx)("div",{children:(0,Qt.jsx)(xi.Bj.Error,{error:t,onClick:function(){return n((0,En.Hm)(t))}})})},Ts.InputPaths=function(e){var t=e.job,n=(0,u.wA)();return(0,Qt.jsx)(ln.A,{theme:"ghost",onClick:function(){return n(gs(t))},children:"View"})},Ts.DebugInfo=function(e){var t=e.type,n=e.job.getDebugInfo(t),r=n.size,i=n.url;return(0,Qt.jsx)(xi.Bj.DownloadLink,{url:i,size:r})},Ts.Progress=function(e){var t=e.state,n=e.progress;switch(t){case"running":return(0,Qt.jsx)(jn.k,{size:"s",value:100*n,theme:"info"});case"completed":return(0,Qt.jsx)(jn.k,{size:"s",value:100,theme:"success"});case"failed":return(0,Qt.jsx)(jn.k,{size:"s",value:100,theme:"danger"});case"aborted":return(0,Qt.jsx)(jn.k,{size:"s",value:100,theme:"default"});default:return(0,Qt.jsx)(jn.k,{size:"s",value:0})}};var Cs=n(79703),Rs=function(e){return f()(N.A.getValue(e),(function(e,t){var n=S.A.format.Number(e);return t.endsWith("_data_size")||t.endsWith("_data_weight")?n=S.A.format.Bytes(e):t.endsWith("_time")&&(n=S.A.format.TimeDuration(e,{format:"milliseconds"})),{key:S.A.format.Readable(t),value:(0,Qt.jsx)("div",{style:{textAlign:"right"},children:n})}}))},Es=function(e){var t=e.statistics,n=e.type;if(!t||"vanilla"===n)return null;var r=N.A.getValues(t,["/processed_input_row_count","/processed_input_uncompressed_data_size"]),i=(0,o.A)(r,2),a=i[0],s=i[1];return a||s?(0,Qt.jsx)(Rn.m,{content:(0,Qt.jsx)(k.Ay,{items:Rs(t)}),children:(0,Qt.jsxs)(sa.s,{gap:2,alignItems:"center",wrap:!0,children:[(0,Qt.jsx)("span",{children:S.A.format.Number(a)}),(0,Qt.jsxs)("span",{children:["(",S.A.format.Bytes(s),")"]}),(0,Qt.jsx)(js.I,{data:Cs.A,size:16})]})}):null};const Is=function(e){return(0,Qt.jsx)("svg",(0,l.A)((0,l.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,Qt.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M9.5 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m5 0a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0",clipRule:"evenodd"})}))};var Ps=n(46747),Os=n(73384),zs=n(20410),Ms=n(75299),Vs=(0,i.A)("yt-job-status-info"),Fs=function(e){var t=e.state,n=e.info,i=(0,Ms.A)(!1),a=(0,o.A)(i,2),s=a[0],l=a[1],u=(0,r.useRef)(null),c=S.A.format.ReadableField((null==n?void 0:n.preemption_reason)||(null==n?void 0:n.interruption_reason));return(0,Qt.jsxs)(sa.s,{alignItems:"center",gap:1,className:Vs(),children:[S.A.format.ReadableField(t),Boolean(c)&&(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("div",{onMouseEnter:l,children:(0,Qt.jsx)(Ps.J,{theme:"warning",ref:u,children:"Interrupted"})}),(0,Qt.jsx)(Os.z,{open:s,hasArrow:!0,anchorRef:u,onMouseLeave:l,children:(0,Qt.jsxs)("div",{className:Vs("popup"),children:[(0,Qt.jsx)("div",{children:c}),(0,Qt.jsx)(zs.b,{title:"Copy reason",view:"flat-secondary",size:"s",text:c})]})})]})]})},Ds=["text"],Ls=(0,i.A)("operation-detail-jobs"),Bs=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return(e=(0,x.A)(this,t,[].concat(i))).actions=[{name:"abort",modalKey:"job_abort",successMessage:"Successfully aborted the job.",errorMessage:"Could not abort the job.",text:"Abort",message:"Aborting job will cause losing its progress, are you sure you want to proceed?",confirmationText:Ns.e},{name:"abandon",modalKey:"job_abandon",successMessage:"Successfully abandoned the job.",errorMessage:"Could not abandon the job.",text:"Abandon",message:"Abandoning job will cause losing its progress, are you sure you want to proceed?",confirmationText:Ns.e},{name:"input_context",modalKey:"job_input_context",message:(0,Qt.jsxs)("span",{children:["You are about to ",(0,Qt.jsx)("strong",{children:"dump input context"})," of the job"]}),text:"Dump input context",successMessageTemplate:function(t){var n="/".concat(e.props.cluster,"/navigation?path=").concat(t);return(0,Qt.jsxs)("span",{children:["Successfully dumped the job input context ",(0,Qt.jsx)(ln.A,{url:n,children:"here"})]})},errorMessage:"Could not dump the job input context."}],e.prepareJobAction=function(t){var n=t.text,r=(0,je.A)(t,Ds),i=e.props,a=i.login,o=i.promptAction,s=r.message||(0,Qt.jsxs)("span",{children:["You are about to ",(0,Qt.jsx)("strong",{children:r.name})," a job."]});return{text:n,action:function(e){return o((0,l.A)((0,l.A)({},r),{},{message:s,handler:function(t){var n=t.currentOption;return function(e){var t,n=e.login,r=e.name,i={job_id:e.item.id};switch((0,ks.m)().countEvent("operation_detail_running-jobs_action",r),r){case"abort":t=R().v3.abortJob(i);break;case"abandon":t=R().v3.abandonJob(i);break;case"input_context":t=function(e){var t="//tmp/ui/"+e;return R().v3.create({path:t,type:"map_node",recursive:!0,ignore_existing:!0}).then((function(){var e="/input_context_"+S.A.format.toBase26(ye()().unix());return t+e}))}(n).then((function(e){return R().v3.dumpJobContext(Object.assign({},i,{path:e})).then((function(){return e}))}));break;case"input":t=Promise.resolve("foo")}return t}((0,l.A)((0,l.A)({},e),{},{name:r.name,currentOption:n,login:a}))}}))}}},e.preparedActions=f()(e.actions,e.prepareJobAction),e.renderIdAddress=function(t){var n=e.props.cluster,i=t.id,a=t.address,o=t.job_competition_id,s=t.operationId,l=t.is_stale,u=t.attributes,c=S.A.format.Address(a),d=N.A.getValue(u,"/start_time"),p=N.A.getValue(u,"/finish_time"),m=N.A.getValue(u,"/monitoring_descriptor"),h=o&&o!==i;return(0,Qt.jsxs)("div",{children:[(0,Qt.jsxs)("div",{className:Ls("id","elements-monospace"),children:[(0,Qt.jsx)(kn.A,{text:i,view:"flat-secondary",size:"s",title:"Copy job id"}),(0,Qt.jsx)(ln.A,{className:Ls("id-job-link"),routed:!0,url:"/".concat(n,"/job/").concat(s,"/").concat(i),theme:"primary",children:i}),l&&(0,Qt.jsx)(Ss.q,{})]}),(0,Qt.jsxs)("div",{className:Ls("host","elements-monospace"),children:[(0,Qt.jsxs)("span",{className:Ls("host-name"),children:[(0,Qt.jsx)(kn.A,{text:c,view:"flat-secondary",size:"s",title:"Copy host"}),c]}),(0,Qt.jsx)("span",{className:Ls("host-chart-link"),children:(0,Qt.jsx)(_s.A,{url:q.Ay.makeUrlForMonitoringDescriptor(n,{from:d,to:p},m)})})]}),h&&(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)("br",{}),(0,Qt.jsxs)("span",{className:Ls("speculative-job-label","elements-monospace elements-ellipsis"),children:["Speculative job for ",o]})]})]})},e.renderErrorAndDebug=function(e){var t=[{key:"error",value:(0,Qt.jsx)(Ts.Error,{error:e.error}),visible:Boolean(e.error)},{key:"input_paths",value:(0,Qt.jsx)(Ts.InputPaths,{job:e}),visible:e.areInputPathsPresent()},{key:"stderr",value:(0,Qt.jsx)(Ts.DebugInfo,{job:e,type:"stderr"}),visible:e.getDebugInfo("stderr").size>0},{key:"fail_context",value:(0,Qt.jsx)(Ts.DebugInfo,{job:e,type:"fail_context"}),visible:e.getDebugInfo("fail_context").size>0},{key:"full_input",value:(0,Qt.jsx)(Ts.DebugInfo,{job:e,type:"full_input"}),visible:Boolean(e.has_spec)}];return(0,Qt.jsx)(k.Ay,{items:t})},e.renderActions=function(t){var n=e.props.openAttributesModal,r=(0,Qt.jsx)(tr.$,{view:"flat-secondary",title:"Show actions",children:(0,Qt.jsx)(js.I,{data:Is,size:16})}),i=f()(e.preparedActions,(function(e){var n=e.action;return{text:e.text,action:function(){return n({item:t})}}})),a=[{text:"Show attributes",action:function(){return n({title:t.id,attributes:t.attributes})}}];return"running"===t.state?(0,Qt.jsx)(xs.r,{switcher:r,items:[i,a]}):(0,Qt.jsx)(xs.r,{switcher:r,items:a})},e.settings={css:Ls(),theme:"light",size:"s",striped:!1,virtual:!1,tableId:Ko.MV,computeKey:function(e){return e.id},columns:{items:{id_address:{name:"id_address",align:"left",caption:"Id / Address",sort:!1},task_name:{name:"task_name",align:"left",caption:"Task name",sort:!0},start_time:{name:"start_time",align:"left",caption:"Start time",sort:!0},finish_time:{name:"finish_time",align:"left",caption:"Finish time",sort:!0},duration:{get:function(e){return e.duration},sort:!0,name:"duration",align:"left"},error:{name:"error",align:"left",caption:"Error / Debug",get:function(e){return e.error}},type:{name:"type",align:"left",sort:!0},progress:{name:"progress",align:"left",sort:!0},actions:{name:"actions",align:"right",caption:"",sort:!1}},sets:{default:{items:["id_address","type","progress","error","start_time","finish_time","duration","actions"]},withTaskName:{items:["id_address","type","progress","error","task_name","start_time","finish_time","duration","actions"]}},mode:e.props.taskNamesNumber>1?"withTaskName":"default"},templates:{id_address:e.renderIdAddress,type:e.renderType,progress:e.renderProgress,error:e.renderErrorAndDebug,start_time:e.renderStartTime,finish_time:e.renderFinishTime,duration:e.renderDuration,actions:e.renderActions,task_name:e.renderTaskName}},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderTaskName",value:function(e){return(0,Qt.jsx)("div",{className:Ls("task-name","elements-ellipsis"),children:e.task_name})}},{key:"renderProgress",value:function(e){var t=e.state,n=e.progress,r=e.brief_statistics,i=e.type,a=e.interruption_info;return(0,Qt.jsxs)("div",{className:Ls("state"),children:[(0,Qt.jsx)("div",{className:Ls("state-section","elements-ellipsis"),children:(0,Qt.jsx)(Fs,{info:a,state:t})}),(0,Qt.jsx)("div",{className:Ls("state-section"),children:(0,Qt.jsx)(Ts.Progress,{state:t,progress:n})}),(0,Qt.jsx)(Es,{statistics:r,type:i})]})}},{key:"renderStartTime",value:function(e){return(0,Qt.jsx)("span",{className:Ls("start-time","elements-ellipsis"),children:S.A.format.DateTime(e.startTime)})}},{key:"renderFinishTime",value:function(e){return"running"===e.state?(0,Qt.jsx)("span",{className:Ls("in-progress","elements-ellipsis elements-secondary-text"),children:"In progress..."}):(0,Qt.jsx)("span",{className:Ls("finish-time elements-ellipsis"),children:S.A.format.DateTime(e.finishTime)})}},{key:"renderDuration",value:function(e){return(0,Qt.jsx)("span",{className:"elements-ellipsis",children:S.A.format.TimeDuration(e.duration)})}},{key:"renderType",value:function(e){return(0,Qt.jsx)("span",{children:S.A.format.ReadableField(e.type)})}},{key:"renderInputPathsModal",value:function(){var e=this.props,t=e.inputPaths,n=t.paths,r=t.status,i=t.error,a=e.hideInputPaths;if(r===Kt.EG.UNINITIALIZED)return null;var o=bn.A.prepareSettings(),s=r===Kt.EG.ERROR?(0,Qt.jsx)(on.z,(0,l.A)({},i)):(0,Qt.jsx)(un.A,{value:n,settings:o});return(0,Qt.jsx)(ys.A,{visible:!0,onCancel:a,loading:r===Kt.EG.LOADING,onOutsideClick:a,title:"Input paths",children:s})}},{key:"render",value:function(){var e=this.props,t=e.jobs,n=e.showCompetitiveJobs,i=e.getJobs,a=e.isLoading,o=e.collapsibleSize;if(n){var s=this.props,u=s.job,c=s.competitiveJobs,d=s.getCompetitiveJobs;return(0,Qt.jsxs)(r.Fragment,{children:[this.renderInputPathsModal(),(0,Qt.jsx)(Nn.A,(0,l.A)((0,l.A)({},this.settings),{},{items:[u].filter(Boolean),onSort:d,isLoading:a})),c.length>0&&(0,Qt.jsx)(Ri.A,{name:"All competitive jobs",className:Ls("competitive-jobs"),collapsed:!0,size:o,children:(0,Qt.jsx)(Nn.A,(0,l.A)((0,l.A)({},this.settings),{},{items:c,onSort:d,isLoading:a}))})]})}return(0,Qt.jsxs)(r.Fragment,{children:[this.renderInputPathsModal(),(0,Qt.jsx)(Nn.A,(0,l.A)((0,l.A)({},this.settings),{},{items:t,onSort:i,isLoading:a}))]})}}])}(r.Component),Js={openAttributesModal:ws.V6,showInputPaths:gs,hideInputPaths:function(){return{type:Ko.PN}},showErrorModal:En.Hm,promptAction:En.Jm,getJobs:hs,getCompetitiveJobs:us};const Us=(0,u.Ng)((function(e,t){var n,r=e.operations,i=e.global,a=i.cluster,o=i.login,s=Ee(e),l=null===(n=qe(e))||void 0===n?void 0:n.length,u=function(e){return e.operations.jobs.operationId}(e),c=$e(e),d=r.jobs,p=d.jobs;return{jobs:c!==u?[]:p,job:d.job,competitiveJobs:d.competitiveJobs,showCompetitiveJobs:s,inputPaths:d.inputPaths,cluster:a,login:o,collapsibleSize:eo.Y1,isLoading:t.isLoading||c!==u,taskNamesNumber:l}}),Js)(Bs),Hs=(0,u.Ng)((function(e,t){var n=e.operations,r=n.jobs.filters,i=t.name,a=t.states,o=t.statesProvider,s=r[i],l=s.defaultValue,u=s.value,c=s.counters,d="function"==typeof o?o(n):a;return{value:Ce(u,l),states:d,counters:c}}),{updateFilter:function(e,t){return vs({name:e,value:t})}})(gr);var $s=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).gotoFirstPage=function(){return e.props.gotoJobsPage(ot.b4.FIRST)},e.gotoNextPage=function(){return e.props.gotoJobsPage(ot.b4.NEXT)},e.gotoPrevPage=function(){return e.props.gotoJobsPage(ot.b4.PREV)},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"render",value:function(){var e=this.props,t=e.firstPageReached,n=e.lastPageReached,r=e.disabled;return(0,Qt.jsx)(br.A,{size:"s",first:{handler:this.gotoFirstPage,disabled:r||t},previous:{handler:this.gotoPrevPage,hotkeyHandler:this.gotoPrevPage,disabled:r||t,hotkeyScope:"all",hotkey:"ctrl+left, command+left"},next:{handler:this.gotoNextPage,hotkeyHandler:this.gotoNextPage,disabled:r||n,hotkeyScope:"all",hotkey:"ctrl+right, command+right"},last:{disabled:!0}})}}])}(r.Component);const Ws=(0,u.Ng)((function(e){var t=e.operations.jobs.pagination;return{firstPageReached:t.firstPageReached,lastPageReached:t.lastPageReached,limit:t.limit,offset:t.offset}}),{gotoJobsPage:As})($s);var qs=n(1686),Ys=n.n(qs);const Gs=(0,u.Ng)((function(e,t){var n=e.operations.jobs.filters,r=t.statesProvider,i=t.name,a=n[i],o=a.defaultValue,s=a.value,l=r(a.data);return{value:Ce(s,o),states:l,defaultValue:o,placeholder:"Filter ".concat(i,"...")}}),{updateFilter:function(e,t){return vs({name:e,value:t})}})(Vr);var Ks=(0,i.A)("operation-detail-jobs");function Zs(e){var t=e.pin,n=(0,u.d4)(Re("jobId")),i=(0,u.wA)(),a=(0,r.useCallback)((function(e){i(vs({name:"jobId",value:e}))}),[]);return(0,Qt.jsx)($n.A,{size:"m",placeholder:"Filter id...",onChange:a,value:null!=n?n:"",pin:t})}const Xs=function(){var e=(0,u.d4)(Re("filterBy")),t=(0,u.wA)(),n=(0,r.useCallback)((function(e){t(vs({name:"filterBy",value:e}))}),[]);return(0,Qt.jsxs)(r.Fragment,{children:[(0,Qt.jsx)("div",{className:Ks("toolbar-filter-by-select"),children:(0,Qt.jsx)(hr.A,{value:e?[e]:[],items:f()(["address","id"],(function(e){return{value:e}})),onUpdate:function(e){return n(e[0])},pin:"round-clear",width:"max",hideFilter:!0})}),(0,Qt.jsxs)("div",{className:Ks("toolbar-filter-by-value"),children:["address"===e&&(0,Qt.jsx)(Gs,{name:"address",statesProvider:Ys(),pin:"brick-round"}),"id"===e&&(0,Qt.jsx)(Zs,{pin:"brick-round"})]})]})},Qs=function(e){var t,n=(0,u.d4)((t=Ct,function(e){return t.filter((function(t){return Re(t)(e)}))})),i=(0,u.wA)(),a=(0,r.useCallback)((function(e){var t,n;i((t=Ct,n=e,function(e){t.forEach((function(t){var r=-1!==n.indexOf(t);e(fs({name:t,value:r}))})),e(As(wr.b4.FIRST))}))}),[]);return(0,Qt.jsx)(hr.A,(0,l.A)((0,l.A)({},e),{},{multiple:!0,value:n,label:"Attributes:",filterable:!0,items:Tt,onUpdate:a}))};var el=(0,i.A)("yt-jobs-incarnation-filter");function tl(e){var t=e.disabled,n=e.wrap,r=(0,u.wA)(),i=(0,u.d4)(Qo),a=(0,u.d4)(es);return null!=a&&a.length?n((0,Qt.jsx)(gr,{name:"incarnation",states:a.map((function(e){return{name:e,caption:e}})),disabled:t,width:"auto",value:i,updateFilter:function(e,t){r(function(e){return function(t){t(rs.wd.setFilter({filter:e})),t(hs())}}(t))},hideClear:!1,hideFilter:!1,popupClassName:el("popup")})):null}var nl=(0,i.A)("operation-detail-jobs"),rl=(0,i.A)("elements-toolbar");function il(e){var t=e.jobs.filters.type.counters;return S.A.utils.sortInPredefinedOrder(["all"],m()(t))}var al=rl("component");function ol(){var e=(0,u.d4)(Ee),t=(0,u.d4)(qe),n=r.useMemo((function(){return[""].concat((0,A.A)(t.map((function(e){return{name:e,caption:e}}))))}),[t]);return(0,Qt.jsx)("div",{className:nl("toolbar"),children:(0,Qt.jsx)("div",{className:rl(),children:(0,Qt.jsxs)("div",{className:rl("container"),children:[(0,Qt.jsx)("div",{className:nl("toolbar-filter-by",al),children:(0,Qt.jsx)(Xs,{})}),(0,Qt.jsx)("div",{className:nl("toolbar-filter-by",al),children:(0,Qt.jsx)(Hs,{name:"taskName",states:n,width:"max"})}),(0,Qt.jsx)("div",{className:nl("toolbar-state",al),children:(0,Qt.jsx)(Hs,{name:"type",statesProvider:il,disabled:e,width:200})}),(0,Qt.jsx)("div",{className:nl("toolbar-state",al),children:(0,Qt.jsx)(Hs,{name:"state",states:["all","running","completed","failed","aborted"],disabled:e,width:200})}),(0,Qt.jsx)("div",{className:nl("toolbar-attributes",al),children:(0,Qt.jsx)(Qs,{disabled:e,width:200})}),(0,Qt.jsx)(tl,{disabled:e,wrap:function(e){return(0,Qt.jsxs)("div",{className:nl("toolbar-state",al),children:[e," "]})}}),(0,Qt.jsx)("div",{className:nl("toolbar-pagination",al),children:(0,Qt.jsx)(Ws,{disabled:e})})]})})})}var sl=(0,i.A)("operation-jobs-errors");function ll(){var e=(0,u.d4)(Xo);return(0,Qt.jsx)("div",{className:sl(),children:f()(e,(function(e,t){return(0,Qt.jsx)(on.z,{error:e},t)}))})}const ul=r.memo(ll);function cl(e){var t=e.className,n=(0,u.wA)(),i=(0,u.d4)((function(e){return e.operations.jobs.loading})),a=(0,u.d4)((function(e){return e.operations.jobs.loaded})),o=(0,u.d4)((function(e){return e.operations.jobs.error})),s=(0,u.d4)((function(e){return e.operations.jobs.errorData})),l=r.useCallback((function(){n(hs())}),[n]);(0,Zr.Tt)(l,{timeout:15e3});var c=i&&!a;return(0,Qt.jsx)(si.A,{children:(0,Qt.jsxs)("div",{className:"operation-detail-jobs ".concat(t),children:[(0,Qt.jsx)(ol,{}),(0,Qt.jsxs)(bs.A,{loaded:a,loading:i,error:o,errorData:s,alwaysShowError:!0,children:[(0,Qt.jsx)(ul,{}),(0,Qt.jsx)(Us,{isLoading:c})]})]})})}function dl(e){var t=(0,u.d4)(Ke),n=(0,u.d4)(Ye);return(0,Xr.v)({type:Dt.c.OPERATION_TAB_JOBS,additionalStartType:Dt.c.OPERATION,startDeps:[t,n],allowStart:function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return!(0,Oe.RP)(n)||!(0,Oe.RP)(r)}}),(0,Qr.ol)({type:Dt.c.OPERATION_TAB_JOBS,stopDeps:[t,n],allowStop:function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return(0,Oe.RP)(n)&&(0,Oe.RP)(r)}}),(0,Qt.jsx)(cl,(0,l.A)({},e))}var pl=n(84549),ml=n(60192),hl=function(e){return e.operations.jobsMonitor.error},fl=function(e){return e.operations.jobsMonitor.loading},vl=function(e){return e.operations.jobsMonitor.loaded},gl=(0,_e.Mz)([function(e){return e.operations.jobsMonitor.jobs}],(function(e){return W()(e,(function(e){var t=e.monitoring_descriptor;return Boolean(t)}))})),Al=(0,_e.Mz)([gl],(function(e){var t,n;return V()(e,(function(e){var r=e.start_time,i=e.finish_time;if(r){var a=ye()(r).valueOf();t=wa()([a,t])}if(i){var o=ye()(i).valueOf();n=Na()([o,n])}})),{from:t,to:n}})),bl=(0,_e.Mz)([gl],(function(e){return f()(e,"monitoring_descriptor").join("|")})),jl=(0,_e.Mz)([$e,function(e){return e.operations.jobsMonitor.operation_id},bl,hl],(function(e,t,n,r){return e===t&&(!oa()(r)||Boolean(n))}));function xl(){var e=(0,u.d4)(Le.dB),t=(0,u.d4)(bl),n=(0,u.d4)(Al),r=n.from,i=n.to,a=(0,u.d4)(hl),o=(0,u.d4)(vl),s=(0,u.d4)(fl);if(!o&&s)return(0,Qt.jsx)(pl.A,{visible:!0,centered:!0});if(!t&&!a)return(0,Qt.jsx)(ml.R,{warning:'There are no jobs with "monitoring_descriptor"'});var l=q.Ay.getMonitorComponentForJob();return(0,Qt.jsxs)(si.A,{children:[a&&(0,Qt.jsx)(on.z,{error:a}),(0,Qt.jsx)(l,{cluster:e,job_descriptor:t,from:r,to:i})]})}const yl=r.memo(xl);function _l(e){var t,n=e.className,r=(0,u.d4)(Ge),i=(0,u.d4)(ho.VK),a=(0,u.d4)($e);return t=(0,u.d4)(Ye),(0,Xr.v)({type:Dt.c.OPERATION_TAB_ATTRIBUTES,additionalStartType:Dt.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Oe.RP)(t)}}),(0,Qr.ol)({type:Dt.c.OPERATION_TAB_ATTRIBUTES,stopDeps:[t],allowStop:function(e){var t=(0,o.A)(e,1)[0];return(0,Oe.RP)(t)}}),(0,Qt.jsx)(un.A,{className:n,value:r,settings:i,extraTools:(0,Qt.jsx)(fo.O,{value:r,settings:i,name:"operation_attributes_".concat(a)}),folding:!0})}const wl=r.memo(_l);var kl=n(36161);function Nl(e){var t=e.component,n=(0,u.d4)(He),r=(0,u.d4)(Le.dB);return(0,Qt.jsx)(si.A,{children:(0,Qt.jsx)(t,{cluster:r,operation:n})})}const Sl=r.memo(Nl);var Tl=n(23133),Cl=n(11687),Rl=function(e){return e.operations.jobsTimeline.jobs},El=function(e){return e.operations.jobsTimeline.isLoading},Il=function(e){return e.operations.jobsTimeline.interval},Pl=function(e){return e.operations.jobsTimeline.filter},Ol=function(e){return e.operations.jobsTimeline.selectedJob},zl=function(e){return e.operations.jobsTimeline.jobsCountError},Ml=function(e){return e.operations.jobsTimeline.error},Vl=function(e){var t=e.operations.jobsTimeline.eventsInterval;return isFinite(t.from)?t:void 0},Fl=(0,_e.Mz)([Rl,El],(function(e,t){return 0===e.length&&!t})),Dl=(0,_e.Mz)([Rl],(function(e){return e.reduce((function(e,t){return t.groupName in e?e[t.groupName].push(t):e[t.groupName]=[t],e}),{})})),Ll=(0,_e.Mz)([Rl],(function(e){return e.reduce((function(e,t){return t.groupName in e?e[t.groupName]++:e[t.groupName]=1,e}),{})})),Bl=(0,_e.Mz)([Rl,Ol],(function(e,t){return e.find((function(e){var n=e.id;return t.id===n}))||null})),Jl=(0,_e.Mz)([Il,Vl],(function(e,t){return!(!e||!t||e.from!==t.from||e.to!==t.to)||!e&&!t})),Ul=n(3131),Hl=n(7059),$l=n.n(Hl),Wl=new Ve.A,ql=function(e){return function(){var t=(0,I.A)((0,E.A)().mark((function t(n,r){var i,a,o,s,l,u,c,d,p,m;return(0,E.A)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r(),a=$e(i),o=Jl(i),e&&n((0,Ul.r1)(!0)),t.prev=4,n((0,Ul.Nh)(void 0)),t.next=8,De.Qq.listJobs(De.Vu.operationGetJobs,{operation_id:a,cancellation:Wl.removeAllAndSave});case 8:if(s=t.sent,!((l=s.jobs).length>1e4)){t.next=13;break}return n((0,Ul.Er)(!0)),t.abrupt("return");case 13:return u=l.map((function(e){var t=e.id;return{command:"get_job",parameters:{operation_id:a,job_id:t}}})),t.next=16,De.Qq.executeBatch(De.Vu.operationGetJobs,{parameters:{requests:u},cancellation:Wl.removeAllAndSave});case 16:if(c=t.sent,!(d=(0,Oe.$7)(c,"Get operation jobs error"))){t.next=20;break}throw d;case 20:p=c.reduce((function(e,t){var n=t.output;if(null==n||!n.events||!n.events.length)return e;for(var r=n.events,i="running"===n.state,a=i?Date.now():$l()(r.at(-1).time).valueOf(),o=$l()(r[0].time).valueOf(),s=(a-o)/100,l={id:n.job_id,cookieId:n.job_cookie,allocationId:n.allocation_id,groupName:n.task_name||"",events:[],start_time:n.start_time,finish_time:n.finish_time,address:n.address},u=r.length,c=0,d=0;d<u;d++){var p=r[d],m=$l()(p.time).valueOf(),h=l.events[c];p.state?(l.events.push({state:p.state,startTime:m,endTime:0,phases:[],percent:0}),c=l.events.length-1):l.events[c].phases.push({phase:p.phase,startTime:m}),h&&(h.endTime=m,h.percent=(m-h.startTime)/s)}if(i){var f=l.events.length-1,v=l.events[f].startTime;l.events[f].endTime=Date.now(),l.events[f].percent=(Date.now()-v)/s}return e.jobs.push(l),e.eventsInterval={from:Math.min(e.eventsInterval.from,o),to:Math.max(e.eventsInterval.to,a)},e}),{jobs:[],eventsInterval:{from:1/0,to:0}}),n((0,Ul.t9)(p)),(e||o)&&n((0,Ul.yb)(p.eventsInterval)),t.next=31;break;case 25:if(t.prev=25,t.t0=t.catch(4),m=t.t0,!(0,Ve.m)(m)){t.next=30;break}return t.abrupt("return");case 30:n((0,Ul.Nh)(m));case 31:return t.prev=31,e&&n((0,Ul.r1)(!1)),t.finish(31);case 34:case"end":return t.stop()}}),t,null,[[4,25,31,34]])})));return function(e,n){return t.apply(this,arguments)}}()},Yl=n(26116),Gl=n(62238);const Kl=function(e){return(0,Qt.jsx)("svg",(0,l.A)((0,l.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,Qt.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.5 2.75a.75.75 0 0 0-1.5 0v10.5a.75.75 0 0 0 1.5 0zm14.5 0a.75.75 0 0 0-1.5 0v10.5a.75.75 0 0 0 1.5 0zM6.53 4.97a.75.75 0 0 1 0 1.06L4.56 8l1.97 1.97a.75.75 0 1 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1 0-1.06l2.5-2.5a.75.75 0 0 1 1.06 0m2.94 1.06a.75.75 0 0 1 1.06-1.06l2.5 2.5a.75.75 0 0 1 0 1.06l-2.5 2.5a.75.75 0 1 1-1.06-1.06L11.44 8z",clipRule:"evenodd"})}))};var Zl=(0,i.A)("yt-timeline-header"),Xl=function(e){var t=e.className,n=(0,u.wA)(),r=(0,u.d4)(Pl),i=(0,u.d4)(Il);return i?(0,Qt.jsxs)("div",{className:Zl(null,t),children:[(0,Qt.jsx)(cn.k,{defaultValue:r,placeholder:"Search by job ID",onUpdate:function(e){n((0,Ul.R6)(e))},hasClear:!0}),(0,Qt.jsxs)(sa.s,{children:[(0,Qt.jsx)(tr.$,{view:"outlined",pin:"brick-brick",onClick:function(){n((function(e,t){var n=Vl(t());n&&e((0,Ul.yb)(n))}))},title:"Reset interval",children:(0,Qt.jsx)(js.I,{data:Kl,size:16})}),(0,Qt.jsx)(Gl.K6,{className:Zl("range-selector"),value:{start:(0,Yl.bQ)(i.from),end:(0,Yl.bQ)(i.to)},displayNow:!0,hasScaleButtons:!0,onUpdate:function(e){var t=e.start,r=e.end;n((0,Ul.yb)({from:t.valueOf(),to:r.valueOf()}))}})]})]}):null},Ql=n(63657),eu=n(89648),tu=n(30469),nu=n(63082),ru=function(e,t){return t&&"running"===e.toLowerCase()&&"running"!==t.toLowerCase()?"running-prev":e},iu=(0,i.A)("yt-events-table"),au=function(e){var t=e.state,n=e.phase;return(0,Qt.jsxs)("div",{className:iu("row",{state:ru(t,n)}),children:[S.A.format.ReadableField(t),": ",S.A.format.ReadableField(n)]})},ou=function(e){return S.A.format.DateTime(new Date(e).toString())},su=function(e){var t=e.events,n=(0,r.useMemo)((function(){return t.reduce((function(e,t){e.push({phase:(0,Qt.jsx)(au,{state:t.state,phase:"—"}),duration:S.A.format.TimeDuration(t.endTime-t.startTime,{format:"milliseconds"}),startTime:ou(t.startTime)});var n=t.startTime;return t.phases.forEach((function(r){e.push({phase:(0,Qt.jsx)(au,{state:t.state,phase:r.phase}),duration:S.A.format.TimeDuration(r.startTime-n,{format:"milliseconds"}),startTime:ou(r.startTime)}),n=r.startTime})),e}),[])}),[t]);return(0,Qt.jsx)(nu.X,{className:iu(),width:"max",columns:[{id:"phase",name:"State: Phase"},{id:"duration",name:"Duration"},{id:"startTime",name:"Start time"}],data:n})},lu=n(25820),uu=n.n(lu),cu=n(69461),du=n.n(cu);$l().extend(du()),$l().extend(uu());var pu=(0,i.A)("yt-event-timeline-meta"),mu=function(e){var t,n=e.meta,r=e.showCopyButton,i=e.className;if(n.endTime&&n.startTime){var a=$l()(n.startTime),o=$l()(n.endTime).diff(a);t=$l().duration(o)}return(0,Qt.jsxs)("div",{className:pu(null,i),children:[n.allocationId&&(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)(eu.E,{color:"secondary",children:"AllocationId:"})," ",(0,Qt.jsx)("span",{children:n.allocationId})]}),(0,Qt.jsx)(eu.E,{color:"secondary",children:"Address:"})," ",(0,Qt.jsxs)("span",{children:[S.A.format.Address(n.address)," ",r&&(0,Qt.jsx)(kn.A,{view:"flat-secondary",text:n.address,size:"s"})]}),(0,Qt.jsx)(eu.E,{color:"secondary",children:"Start:"})," ",(0,Qt.jsx)("span",{children:S.A.format.DateTime(n.startTime)}),(0,Qt.jsx)(eu.E,{color:"secondary",children:"End:"})," ",(0,Qt.jsx)("span",{children:n.endTime?S.A.format.DateTime(n.endTime):"—"}),t&&(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)(eu.E,{color:"secondary",children:"Duration:"})," ",(0,Qt.jsx)("span",{children:S.A.format.TimeDuration(t.asMilliseconds())})]})]})},hu=(0,i.A)("yt-events-side-panel"),fu=function(e){var t=e.onClose,n=e.onOutsideClick,i=(0,u.d4)(Ol).id,a=(0,u.d4)(Bl),o=(0,u.d4)(Le.dB),s=(0,u.d4)($e),l=(0,r.useRef)(null),c=(0,r.useCallback)((function(e){l.current&&!l.current.contains(e.target)&&(null==n||n(e))}),[n]);return(0,r.useEffect)((function(){return document.addEventListener("click",c),function(){document.removeEventListener("click",c)}}),[c]),i&&a?(0,Qt.jsxs)("div",{ref:l,className:hu(),children:[(0,Qt.jsxs)(sa.s,{alignItems:"center",justifyContent:"space-between",children:[(0,Qt.jsx)(sa.s,{alignItems:"center",justifyContent:"center",gap:1,children:(0,Qt.jsxs)(eu.E,{variant:"subheader-3",children:["Job id:"," ",(0,Qt.jsx)(ln.A,{theme:"primary",url:"/".concat(o,"/job/").concat(s,"/").concat(i),target:"_blank",children:i})]})}),(0,Qt.jsx)(tr.$,{view:"flat",onClick:t,children:(0,Qt.jsx)(js.I,{data:tu.A,size:16})})]}),(0,Qt.jsx)(mu,{className:hu("meta"),meta:{startTime:a.start_time,endTime:a.finish_time,address:a.address,allocationId:a.allocationId},showCopyButton:!0}),(0,Qt.jsx)("div",{className:hu("separator")}),(0,Qt.jsx)(su,{events:a.events})]}):null},vu=n(60150),gu=function(e){switch(e){case"waiting":return(0,vu.LB)("--default-color");case"running":return(0,vu.LB)("--info-color");case"aborting":case"aborted":return(0,vu.LB)("--g-color-base-misc-heavy");case"completed":return(0,vu.LB)("--success-color");case"failed":return(0,vu.LB)("--danger-color");case"lost":return(0,vu.LB)("--warning-color");default:return(0,vu.LB)("--g-progress-filled-background-color")}},Au=function(e){return e.Selected="selected",e.SelectedFound="selectedFound",e.Found="found",e.Transparent="transparent",e.Default="default",e}({}),bu=function(e){var t=e.jobId,n=e.timeLineId,r=e.filter,i=void 0===r?"":r,a=e.selectedJob,o=void 0===a?[]:a,s=Boolean(i),l=o&&Boolean(o[0]),u=s&&t.includes(i),c=o[0]===n;return u&&c?Au.SelectedFound:u?Au.Found:c?Au.Selected:s||l?Au.Transparent:Au.Default},ju=n(77941),xu=n(7704),yu=function(e,t){if(t<0||t>1)throw new Error("Opacity must be between 0 and 1");var n=0,r=0,i=0,a=t,o=e.replace(/\s+/g,"").toLowerCase();if(o.startsWith("#")){var s=o.substring(1);if(3===s.length)n=parseInt(s[0]+s[0],16),r=parseInt(s[1]+s[1],16),i=parseInt(s[2]+s[2],16);else{if(6!==s.length)throw new Error("Invalid HEX color format");n=parseInt(s.substring(0,2),16),r=parseInt(s.substring(2,4),16),i=parseInt(s.substring(4,6),16)}}else{if(!o.startsWith("rgb(")&&!o.startsWith("rgba("))throw new Error("Unsupported color format");var l=o.match(/rgba?\((\d+),(\d+),(\d+)(?:,([\d.]+))?\)/i);if(!l)throw new Error("Invalid RGB/RGBA color format");n=parseInt(l[1],10),r=parseInt(l[2],10),i=parseInt(l[3],10),l[4]&&(a=parseFloat(l[4])*t)}if([n,r,i].some((function(e){return e<0||e>255})))throw new Error("Invalid color values (must be 0-255)");return"rgba(".concat(n,", ").concat(r,", ").concat(i,", ").concat(a,")")},_u="#333",wu=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"render",value:function(e,t,n,r,i,a,o,s){var l=t.displayMode,u=t.parts,c=a-xu.eZ.LINE_HEIGHT/2,d=this.getFixedXCoordinates(r,i),p=d.x1,m=d.x0,h=l===Au.Transparent,f=(p-m)/100;l===Au.Found&&this.renderFilterBackground(e,m,p,c);var v=m;u.forEach((function(t){var n=t.color,r=t.percentage,i=t.state,a=t.phases,o=t.interval,l=r*f;if("running"===i.toLowerCase())for(var u=a.length,d=0;d<u;d++){var p,m=s(a[d].startTime),g=s(d===u-1?o.to:a[d+1].startTime),A="running"===(null===(p=a[d].phase)||void 0===p?void 0:p.toLowerCase())?n:(0,vu.LB)("--purple-color");e.beginPath(),e.fillStyle=yu(A||_u,h?.4:.7),e.rect(m,c,g-m,xu.eZ.LINE_HEIGHT),e.fill()}else e.beginPath(),e.fillStyle=yu(n||_u,h?.4:.7),e.rect(v,c,l,xu.eZ.LINE_HEIGHT),e.fill();v+=l})),e.beginPath(),e.moveTo(m,c),e.lineTo(m+8,c+xu.eZ.LINE_HEIGHT/2),e.lineTo(m,c+xu.eZ.LINE_HEIGHT),e.closePath(),e.fillStyle="rgba(0, 0, 0, 0.25)",e.fill(),e.beginPath(),e.moveTo(p,c),e.lineTo(p-8,c+xu.eZ.LINE_HEIGHT/2),e.lineTo(p,c+xu.eZ.LINE_HEIGHT),e.closePath(),e.fillStyle="rgba(0, 0, 0, 0.25)",e.fill(),n&&this.renderSelectedBorder(e,m,p,c,l)}},{key:"renderFilterBackground",value:function(e,t,n,r){var i=xu.eZ.SELECTION_OUTLINE_THICKNESS;e.beginPath(),e.rect(t-i,r-i,n-t+2*i,xu.eZ.LINE_HEIGHT+2*i),e.fillStyle="rgba(255, 219, 77)",e.fill()}},{key:"renderSelectedBorder",value:function(e,t,n,r,i){var a=xu.eZ.SELECTION_OUTLINE_THICKNESS,o=xu.eZ.resolveCssValue(xu.eZ.SELECTION_OUTLINE_COLOR),s=xu.eZ.resolveCssValue(xu.eZ.PRIMARY_BACKGROUND_COLOR),l=t+a/2,u=n-t-a,c=r-a,d=xu.eZ.LINE_HEIGHT+2*a;e.beginPath(),e.rect(l,c,u,d),e.strokeStyle=o,e.lineWidth=a,e.stroke();var p=l+1,m=r-1,h=u-2,f=xu.eZ.LINE_HEIGHT+2;e.beginPath(),e.rect(p,m,h,f),e.strokeStyle=i===Au.SelectedFound?"rgba(255, 219, 77)":s,e.lineWidth=1,e.stroke()}},{key:"getHitbox",value:function(e,t,n){var r=this.getFixedXCoordinates(t,n),i=r.x0,a=r.x1;return this.hitboxResult.left=i,this.hitboxResult.right=a,this.hitboxResult}},{key:"getFixedXCoordinates",value:function(e,t){return t-e<8?{x0:e,x1:e+8}:{x0:e,x1:t}}}])}(ju.O),ku=function(e){function t(){return(0,b.A)(this,t),(0,x.A)(this,t,arguments)}return(0,y.A)(t,e),(0,j.A)(t,[{key:"render",value:function(e,t,n,r,i,a){var o=a-xu.eZ.LINE_HEIGHT/2;e.beginPath(),e.fillStyle="rgba(107, 132, 153, 0.3)",e.rect(r,o,i-r,xu.eZ.LINE_HEIGHT),e.fill()}},{key:"getHitbox",value:function(e,t,n){var r=this.getFixedXCoordinates(t,n),i=r.x0,a=r.x1;return this.hitboxResult.left=i,this.hitboxResult.right=a,this.hitboxResult}},{key:"getFixedXCoordinates",value:function(e,t){return t-e<8?{x0:e,x1:e+8}:{x0:e,x1:t}}}])}(n(36339).OT),Nu=(0,i.A)("yt-event-timeline-tooltip"),Su=function(e){var t=e.children,n=e.offset,i=(0,r.useRef)(null);return(0,Qt.jsxs)("div",{className:Nu(),style:{top:n.y,left:n.x},children:[(0,Qt.jsx)("div",{ref:i,className:Nu("anchor")}),(0,Qt.jsx)(Os.z,{anchorRef:i,open:!0,disablePortal:!0,children:t})]})},Tu=(0,i.A)("yt-event-timeline-tooltip-content-row"),Cu=function(e){var t=e.state,n=e.phase,r=e.duration;return(0,Qt.jsxs)(sa.s,{justifyContent:"space-between",gap:2,className:Tu(),children:[(0,Qt.jsxs)("div",{className:Tu("title",{state:ru(t,n)}),children:[S.A.format.ReadableField(t),":"," ",n?S.A.format.ReadableField(n):(0,Qt.jsx)(Qt.Fragment,{children:"—"})]}),(0,Qt.jsx)("div",{children:S.A.format.TimeDuration(r,{format:"milliseconds"})})]})},Ru=(0,i.A)("yt-event-timeline-tooltip-content"),Eu=function(e){var t=e.events,n=e.jobId,i=e.metaData,a=(0,r.useMemo)((function(){return t?t.reduce((function(e,t){var n=t.state,r=t.phases,i=t.interval,a=i.to-i.from,o=r.reduce((function(e,t,r,a){var o=t.phase,s=t.startTime,l=r>0?s-a[r-1].startTime:s-i.from;return e.push((0,Qt.jsx)(Cu,{phase:o,state:n,duration:l},"text_".concat(o,"_").concat(s))),e}),[]);return[].concat((0,A.A)(e),[(0,Qt.jsx)(Cu,{state:n,duration:a},"text_all")],(0,A.A)(o))}),[]):[]}),[t]);return a.length?(0,Qt.jsxs)(sa.s,{direction:"column",gap:3,className:Ru(),children:[(0,Qt.jsxs)(eu.E,{variant:"subheader-2",children:["Job id: ",n]}),(0,Qt.jsx)(mu,{meta:i}),(0,Qt.jsx)(sa.s,{direction:"column",gap:1,className:Ru("phases"),children:a})]}):null},Iu=n(1609),Pu=n(57711),Ou=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).renderersList=[],e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"renderers",set:function(e){this.renderersList=e,this.scheduleTimelineRender()}},{key:"events",set:function(e){this.getComponent(xu.$r).then((function(t){null==t||t.setEvents(e)}))}},{key:"axes",set:function(e){this.getComponent(xu.$r).then((function(t){t&&(t.axes=e)}))}},{key:"selectedEvents",set:function(e){this.getComponent(xu.$r).then((function(t){t&&t.setSelectedEvents(e)}))}},{key:"theme",set:function(e){this.setTimelineConfig(),this.scheduleTimelineRender()}},{key:"updateCanvasSize",value:function(){return this.offsetHeight?(0,Iu.A)(t,"updateCanvasSize",this,3)([]):function(){}}},{key:"createComponents",value:function(){this.setTimelineConfig();var e=new xu.sV(this);return this.renderersList.forEach((function(t){var n=t.id,r=t.renderer;e.registerRenderer(n,r)})),[new xu.xA(this),new xu.Y5(this),e,new xu.$r(this)]}},{key:"setTimelineConfig",value:function(){xu.eZ.OVERLAPPING_THRESHOLD=0,xu.eZ.SKIP_OVERLAPPING=!0,xu.eZ.PRIMARY_BACKGROUND_COLOR=(0,vu.kd)("--g-color-base-background"),xu.eZ.SELECTION_OUTLINE_THICKNESS=2,xu.eZ.TRACK_HEIGHT=30,xu.eZ.LINE_HEIGHT=12}}])}(xu.Un);customElements.define("events-timeline-canvas",Ou);var zu=(0,Pu.T)("events-timeline-canvas"),Mu=n(59994),Vu=n(24503),Fu=n.n(Vu),Du=(0,i.A)("yt-events-timeline"),Lu=function(e){var t=e.axes,n=e.timelines,i=e.selectedJob,a=e.interval,s=e.rowHeight,l=e.tooltip,u=e.onTimelineClick,c=e.onBoundsChanged,d=e.renderers,p=(0,Mu.i)(),m=(0,r.useState)(),h=(0,o.A)(m,2),f=h[0],v=h[1],g=(0,r.useMemo)((function(){return Fu()((function(e){v(e)}),50)}),[]),A=(0,r.useCallback)((function(){g(void 0)}),[g]),b=(0,r.useCallback)((function(e){g(e)}),[g]),j=(0,r.useCallback)((function(e){var t=e.detail.events;t.length?u(t):u([])}),[u]),x=(0,r.useCallback)((function(e){var t=e.detail;c({from:t.start,to:t.end})}),[c]);return(0,Qt.jsxs)("div",{className:Du(),onMouseLeave:A,style:{height:"".concat(t.length*(s||30),"px")},children:[l(f),(0,Qt.jsx)(zu,{theme:p,start:a.from,end:a.to,axes:t,selectedEvents:i,events:n,eventsSelected:j,hoverEvent:b,leftEvent:A,isZoomAllowed:!0,boundsChanged:x,renderers:d})]})},Bu=n(57660),Ju=(0,i.A)("yt-timeline-table"),Uu=function(e){var t=e.items,n=e.rowHeight,r=e.className;return(0,Qt.jsx)(sa.s,{direction:"column",className:Ju(null,r),children:t.map((function(e){var t=e.id,r=e.content;return(0,Qt.jsxs)(sa.s,{alignItems:"center",gap:1,className:Ju("item"),style:{height:"".concat(n,"px")},children:[(0,Qt.jsx)(js.I,{data:Bu.A,size:16}),(0,Qt.jsx)(eu.E,{variant:"body-1",ellipsis:!0,children:r})]},t)}))})},Hu=n(51188),$u=(0,i.A)("yt-timeline-group-collapse"),Wu=function(e){var t=e.children,n=e.title,r=e.open,i=void 0===r||r,a=(0,Ms.A)(i),s=(0,o.A)(a,2),l=s[0],u=s[1];return(0,Qt.jsxs)("div",{className:$u(),children:[(0,Qt.jsxs)(sa.s,{alignItems:"center",gap:2,onClick:u,className:$u("head"),children:[(0,Qt.jsx)(js.I,{data:Hu.A,className:$u("icon",{open:l})}),n]}),l&&(0,Qt.jsx)("div",{className:$u("content"),children:t})]})},qu=function(e){var t=e.children,n=e.collapse;return n?(0,Qt.jsx)(Wu,(0,l.A)((0,l.A)({},n),{},{children:t})):(0,Qt.jsx)(r.Fragment,{children:t})},Yu=function(e){var t=e.className,n=e.timelines,r=e.axes,i=e.rowHeight,a=e.selectedJob,o=e.interval,s=e.tableItems,l=e.collapse,u=e.tooltip,c=e.renderers,d=e.onTimelineClick,p=e.onBoundsChanged;return(0,Qt.jsx)(qu,{collapse:l,children:(0,Qt.jsxs)("div",{className:t,children:[(0,Qt.jsx)(Uu,{items:s,rowHeight:i}),(0,Qt.jsx)(Lu,{timelines:n,axes:r,selectedJob:a,interval:o,rowHeight:i,onTimelineClick:d,onBoundsChanged:p,tooltip:u,renderers:c})]})})},Gu=(0,i.A)("yt-timeline-event-group"),Ku=function(){var e=(0,u.wA)(),t=(0,u.d4)(Dl),n=(0,u.d4)(Ll),i=(0,u.d4)(Il),a=(0,u.d4)(Ol).timelineId,s=(0,u.d4)(Pl),l=(0,r.useCallback)((function(t){var n=t.find((function(e){return"jobLine"===e.renderType}));n&&e((0,Ul.DR)({id:n.jobId,timelineId:"jobLine:".concat(n.axisId,":").concat(n.from,"-").concat(n.to)}))}),[e]),c=(0,r.useCallback)((function(t){e((0,Ul.yb)(t))}),[e]),d=(0,r.useCallback)((function(t){return function(){e((0,Ul.DR)({id:"",timelineId:""})),t()}}),[e]),p=(0,r.useCallback)((function(t){return function(n){n.target instanceof Element&&"events-timeline-canvas"!==n.target.localName&&(e((0,Ul.DR)({id:"",timelineId:""})),t())}}),[e]),m=(0,Ql.p)("JobsTimeline",{renderContent:function(e){var t=e.onClose;return(0,Qt.jsx)(fu,{onClose:d(t),onOutsideClick:p(t)})}}),h=m.openWidget,f=m.closeWidget,v=m.widgetContent;(0,r.useEffect)((function(){(a?h:f)()}),[f,h,a]);var g=(0,r.useMemo)((function(){return i?Object.keys(t).sort().map((function(e){var r=t[e].sort((function(e,t){return Number(e.cookieId)-Number(t.cookieId)})),u=S.A.format.ReadableField(e),d="".concat(u," (").concat(r.length," / ").concat(n[e],")"),p=r.reduce((function(e,t){return void 0===t.cookieId||(e[t.cookieId]={id:"".concat(t.cookieId,": ").concat(t.start_time,"-").concat(t.finish_time),content:"".concat(u," ").concat(t.cookieId)}),e}),{}),m=function(e){var t,n=e.jobs,r=e.selectedJob,i=void 0===r?[]:r,a=e.filter,s=void 0===a?"":a,l=e.axesRowHeight,u=void 0===l?0:l,c=new Map,d=n.filter((function(e){return void 0!==e.cookieId})),p=(0,H.A)(d);try{for(p.s();!(t=p.n()).done;){var m=t.value;if(m.allocationId){var h=m.events[0],f=m.events[m.events.length-1],v=h.startTime,g=f.endTime,b=m.cookieId.toString(),j=c.get(m.allocationId);j?(j.from=Math.min(j.from,v),j.to=Math.max(j.to,g)):c.set(m.allocationId,{from:v,to:g,cookieId:b})}}}catch(e){p.e(e)}finally{p.f()}var x,y=Array.from(c.entries()).map((function(e){var t=(0,o.A)(e,2),n=t[0],r=t[1];return{renderType:"allocationLine",allocationId:n,axisId:r.cookieId,eventsCount:1,trackIndex:0,from:r.from,to:r.to}})),_=new Set,w=[],k=(0,H.A)(d);try{for(k.s();!(x=k.n()).done;){var N=x.value,S=N.cookieId.toString();_.add(S);var T=N.events,C=T[0],R=T[T.length-1],E=T.map((function(e){return{percentage:e.percent,color:gu(e.state),state:e.state,interval:{from:e.startTime,to:e.endTime},phases:e.phases}}));w.push({renderType:"jobLine",axisId:S,eventsCount:T.length,trackIndex:0,from:C.startTime,to:R.endTime,jobId:N.id,parts:E,displayMode:bu({jobId:N.id,timeLineId:"jobLine:".concat(S,":").concat(C.startTime,"-").concat(R.endTime),filter:s,selectedJob:i}),meta:{startTime:N.start_time,endTime:N.finish_time,address:N.address,allocationId:N.allocationId}})}}catch(e){k.e(e)}finally{k.f()}return{axes:Array.from(_).map((function(e,t){return{id:e,top:u*t,height:u,tracksCount:1}})),timelines:[].concat(w,(0,A.A)(y))}}({jobs:r,selectedJob:[a],filter:s,axesRowHeight:30}),h=m.timelines,f=m.axes;return(0,Qt.jsx)(Yu,{className:Gu(),collapse:{title:d},tableItems:Object.values(p),timelines:h,axes:f,selectedJob:[a],interval:i,rowHeight:30,onTimelineClick:l,onBoundsChanged:c,tooltip:function(e){if(e){var t=e.detail,n=t.offset,r=t.events.find((function(e){return"jobLine"===e.renderType}));if(!r)return null;var i=r;return(0,Qt.jsx)(Su,{offset:n,children:(0,Qt.jsx)(Eu,{events:i.parts,jobId:i.jobId,metaData:i.meta})})}},renderers:[{id:"jobLine",renderer:new wu},{id:"allocationLine",renderer:new ku}]},e)})):[]}),[s,n,c,l,i,t,a]);return(0,Qt.jsxs)(Qt.Fragment,{children:[(0,Qt.jsx)("div",{className:Gu("wrap"),children:g}),(0,Qt.jsx)(Qt.Fragment,{children:v})]})},Zu=(0,i.A)("yt-jobs-timeline"),Xu=function(){var e=(0,u.wA)(),t=(0,r.useRef)(!0),n=(0,u.d4)(Vl),i=(0,u.d4)(zl),a=(0,u.d4)(Fl),o=(0,u.d4)(El),s=(0,u.d4)(Il),l=(0,u.d4)(Ml),c=(0,r.useCallback)((0,I.A)((0,E.A)().mark((function n(){return(0,E.A)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e(ql(t.current));case 2:t.current=!1;case 3:case"end":return n.stop()}}),n)}))),[e]);return(0,Zr.Tt)(c),l?(0,Qt.jsx)(on.z,{error:l}):i?(0,Qt.jsx)(Cl.F,{theme:"info",message:"Too many jobs to display. Max number ".concat(1e4)}):a?(0,Qt.jsx)(Cl.F,{theme:"info",message:"No jobs to display"}):o?(0,Qt.jsx)(sa.s,{justifyContent:"center",children:(0,Qt.jsx)(li.a,{})}):s&&n?(0,Qt.jsx)(No.Ay,{toolbar:(0,Qt.jsx)(Xl,{}),content:(0,Qt.jsx)(Ku,{}),className:Zu(),padding:"skip-horizontal"}):null},Qu=(0,i.A)("operation-detail"),ec=(0,i.A)("elements-heading");function tc(e){var t=e.operationId,n=(0,u.wA)(),i=r.useCallback((function(){n(at(t))}),[n,t]);return(0,Zr.Tt)(i,{timeout:15e3}),null}function nc(e){var t=e.type;return(0,Qt.jsx)(Rn.m,{content:"jobs"===t?"Operation scheduling has started, but not all jobs have been scheduled yet. If the problem persists, contact cluster administrators.":"Not enough resources to start operation scheduling. This may happen if the pool has too many operations in the queue or too low resource guarantees.",children:(0,Qt.jsx)(xn.A,{state:"running",iconState:"running",text:"Waiting for ".concat(t),renderPlaque:!0})})}var rc=function(e){function t(){var e;(0,b.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,x.A)(this,t,[].concat(r))).handlePoolsEditClick=function(){var t=e.props,n=t.operation;(0,t.showEditPoolsWeightsModal)(n)},e.renderAction=function(t){var n=e.props,r=n.promptAction,i=n.operation,a=t.message||(0,Qt.jsxs)("span",{children:["Are you sure you want to ",(0,Qt.jsx)("strong",{children:t.name})," the operation?"]}),o=function(n){var r=n.currentOption;return(0,Ie.wF)((0,l.A)((0,l.A)({},t),{},{operation:i,currentOption:r})).then((function(){return e.props.getOperation(i.$value)}))};return(0,Qt.jsxs)(Tn.A,{view:t.theme,className:Qu("action"),title:S.A.format.ReadableField(t.name),onClick:function(){return r((0,l.A)((0,l.A)({},t),{},{message:a,handler:o}))},children:[(0,Qt.jsx)(Cn.A,{awesome:t.icon})," ",S.A.format.ReadableField(t.name)]},t.name)},e.onProgressLinkClick=function(t){(0,e.props.updateListJobsFilter)({name:"state",value:t})},e}return(0,y.A)(t,e),(0,j.A)(t,[{key:"settings",get:function(){return bn.A.prepareSettings()}},{key:"renderHeader",value:function(){var e=this.props,t=e.actions,n=void 0===t?[]:t,r=e.runtime,i=e.operation,a=e.isGpuOperation,o=i.type,s=i.user,u=void 0===s?"":s,c=i.state,d=i.suspended,p=i.pools,m=i.title,h=i.$value,f=function(e,t,n,r,i){var a,o,s,l=null==n||null===(a=n[0])||void 0===a||null===(a=a.progress)||void 0===a?void 0:a.fair_share_ratio,u=null==n||null===(o=n[0])||void 0===o||null===(o=o.progress)||void 0===o?void 0:o.usage_ratio,c=null==n||null===(s=n[0])||void 0===s||null===(s=s.progress)||void 0===s?void 0:s.demand_ratio,d=1===new Set(null==e?void 0:e.map((function(e){return null==e?void 0:e.tree}))).size,p="vanilla"===r&&d&&"running"===t&&i;return{isWaitingForResources:p&&l===u&&0===l,isWaitingForJobs:p&&l===c&&void 0!==u&&void 0!==l&&u<l}}(p,c,r,o,a),v=f.isWaitingForJobs,g=f.isWaitingForResources,A=v||g?{state:"unknown",iconState:"running",text:"Running"}:{label:d?"suspended":c};return(0,Qt.jsxs)("div",{className:Qu("header","elements-section"),children:[(0,Qt.jsxs)("div",{className:Qu("header-heading",ec({size:"l"})),children:[S.A.format.ReadableField(o)," operation by ",(0,Qt.jsx)(Sn.R,{name:u})," ",(0,Qt.jsx)(xn.A,(0,l.A)((0,l.A)({},A),{},{renderPlaque:!0}))," ",v&&(0,Qt.jsx)(nc,{type:"jobs"}),g&&(0,Qt.jsx)(nc,{type:"resources"})]}),(0,Qt.jsx)("div",{className:Qu("header-title"),children:(0,Qt.jsx)(un.A,{value:m||h,inline:!0})}),(0,Qt.jsx)("div",{className:Qu("actions"),children:n.map(this.renderAction)})]})}},{key:"renderOverview",value:function(){var e=this.props,t=e.operation,n=e.cluster,r=e.totalJobWallTime,i=e.cpuTimeSpent,a=e.erasedTrees,o=e.isGpuOperation,s=t.$value,l=t.user,u=void 0===l?"":l,c=t.type,d=t.startTime,p=t.finishTime,m=t.duration,h=t.pools,f=t.state,v=o&&"vanilla"===c,g=[[{key:"id",value:(0,Qt.jsx)(k.Bj.Id,{id:s})},{key:"user",value:(0,Qt.jsx)(Sn.R,{name:u})},{key:"pools",value:(0,Qt.jsx)(k.CD,{onEdit:this.handlePoolsEditClick,cluster:n,pools:h,operationRefId:s,state:f,erasedTrees:a})},{key:"type",value:(0,Qt.jsx)(k.Bj.Readable,{value:c})}],[{key:"started",value:(0,Qt.jsx)(k.Bj.Time,{time:d,valueFormat:"DateTime"})},{key:"finished",value:(0,Qt.jsx)(k.Bj.Time,{time:p,valueFormat:"DateTime"})},{key:"duration",value:(0,Qt.jsx)(k.Bj.Time,{time:m,valueFormat:"TimeDuration"})},{key:"total job wall time",value:(0,Qt.jsx)(k.Bj.Time,{time:r,valueFormat:"TimeDuration"}),visible:!v},{key:"total cpu time spent",value:(0,Qt.jsx)(k.Bj.Time,{time:i,valueFormat:"TimeDuration"}),visible:!v}]];return(0,Qt.jsxs)("div",{className:Qu("overview"),children:[(0,Qt.jsx)("div",{className:Qu("general"),children:(0,Qt.jsx)(k.Ay,{items:g})}),(0,Qt.jsxs)("div",{className:Qu("progress-wrapper"),children:[(0,Qt.jsx)(wn,{operation:t,onLinkClick:this.onProgressLinkClick}),"failed"!==t.state&&(0,Qt.jsx)(wn,{operation:t,type:"failed",onLinkClick:this.onProgressLinkClick})]})]})}},{key:"renderTabs",value:function(){var e=this.props,t=e.match.params,n=t.operationId,r=t.tab,i=e.cluster,a=e.operation,o=e.hasStatististicsTab,u=e.jobsMonitorVisible,c=e.monitorTabVisible,d=e.monitorTabTitle,p=e.monitorTabUrlTemplate,m=e.timelineTabVisible,h=e.operationPerformanceUrlTemplate,f="/".concat(i,"/").concat(Kt.YW.OPERATIONS,"/").concat(n),v=(0,l.A)((0,l.A)({},(0,Ie.h9)(a)),{},(0,s.A)((0,s.A)((0,s.A)((0,s.A)((0,s.A)({},Ae.oz.STATISTICS,{show:o}),Ae.oz.JOBS_MONITOR,{show:u||r===Ae.oz.JOBS_MONITOR}),Ae.oz.MONITOR,{show:c}),Ae.oz.JOBS_TIMELINE,{show:m}),Ae.oz.PERFORMANCE,{show:Boolean(h),external:!0,url:null==h?void 0:h.url,title:null==h?void 0:h.title,routed:!1}));if(p){var g,A=v[Ae.oz.MONITOR];A.routed=!1,A.external=!0;var b=(null===(g=a.pools)||void 0===g?void 0:g[0])||{};A.url=(0,Ie.tG)((0,l.A)((0,l.A)({cluster:i,operation:a},b),{},{urlTemplate:p}))}var j=(0,Pe._4)(f,Ae.oz,v,void 0,(0,s.A)({},Ae.oz.MONITOR,null!=d?d:"Monitoring"));return(0,Qt.jsx)("div",{className:Qu("tabs"),children:(0,Qt.jsx)(ui.A,(0,l.A)((0,l.A)({},j),{},{active:r,routed:!0,routedPreserveLocation:!0,size:eo.jr}))})}},{key:"renderMain",value:function(){var e=this.props,t=e.match,n=e.cluster,r=e.monitorTabVisible,i=e.jobsMonitorIsSupported,o=e.monitoringComponent,s=e.timelineTabVisible,l=t.url,u=t.params.operationId,c="/".concat(n,"/").concat(Kt.YW.OPERATIONS,"/").concat(u);return ze(u)?(0,Qt.jsx)("div",{className:Qu("main"),children:(0,Qt.jsxs)(a.dO,{children:[(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.ATTRIBUTES),render:function(){return(0,Qt.jsx)(wl,{className:Qu("attributes")})}}),(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.DETAILS),component:ao}),(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.SPECIFICATION),component:ko}),(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.STATISTICS),render:function(){return(0,Qt.jsx)(Go,{className:Qu("statistics")})}}),(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.JOBS),render:function(){return(0,Qt.jsx)(dl,{className:Qu("jobs")})}}),s&&(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.JOBS_TIMELINE),render:function(){return(0,Qt.jsx)(Xu,{})}}),(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.JOB_SIZES),render:function(){return(0,Qt.jsx)(Io,{className:Qu("job-sizes")})}}),(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.PARTITION_SIZES),component:bi}),r&&o&&(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.MONITOR),render:function(){return(0,Qt.jsx)(Sl,{component:o})}}),i&&(0,Qt.jsx)(a.qh,{path:"".concat(c,"/").concat(Ae.oz.JOBS_MONITOR),component:yl}),(0,Qt.jsx)(a.qh,{path:"".concat(c,"/:tab"),component:kl.A}),(0,Qt.jsx)(a.rd,{from:l,to:"".concat(c,"/").concat(Ae._N)})]})}):this.renderAlias()}},{key:"renderAlias",value:function(){var e=this.props,t=e.match,n=e.cluster,r=e.operation,i=t.url,o=t.params,s=o.operationId,l=o.tab;if(s!==N.A.getValue(r,"/@spec/alias"))return null;var u="/".concat(n,"/").concat(Kt.YW.OPERATIONS,"/").concat(r.$value).concat(l?"/"+l:"");return(0,Qt.jsx)(a.rd,{from:i,to:u})}},{key:"renderContent",value:function(e){return e?(0,Qt.jsx)(li.a,{}):(0,Qt.jsxs)(r.Fragment,{children:[this.renderHeader(),this.renderOverview(),this.renderTabs(),this.renderMain()]})}},{key:"renderError",value:function(){var e=this.props.errorData;return(0,Qt.jsx)(on.z,{message:e.message,error:e.details})}},{key:"render",value:function(){var e=this.props,t=e.error,n=e.loading,r=e.loaded,i=e.match.params.operationId,a=n&&!r;return(0,Qt.jsxs)(si.A,{children:[(0,Qt.jsx)(tc,{operationId:i}),(0,Qt.jsx)("div",{className:Qu({loading:a}),children:t&&!r?this.renderError():this.renderContent(a)})]})}}])}(r.Component),ic={promptAction:En.Jm,getOperation:at,showEditPoolsWeightsModal:Zt,updateListJobsFilter:vs},ac=(0,u.Ng)((function(e){var t=e.operations.detail,n=t.operation,r=t.errorData,i=t.loading,a=t.loaded,o=t.error,s=t.actions,l=t.details,u=Ha(e),c=qa(e),d=Je(e),p=l.runtime,m=q.Ay.getMonitoringForOperation(n)||{},h=m.component,f=m.urlTemplate,v=m.title,g=Boolean(h)||Boolean(f);return{cluster:(0,Tl.KF)(e),operation:n,errorData:r,loading:i,loaded:a,error:o,actions:s,runtime:p,totalJobWallTime:u,cpuTimeSpent:c,erasedTrees:d,monitorTabVisible:g,monitorTabTitle:v,monitorTabUrlTemplate:f,monitoringComponent:h,timelineTabVisible:(0,Nr.SR)(e),jobsMonitorIsSupported:Boolean(q.Ay.getMonitorComponentForJob()),jobsMonitorVisible:jl(e),hasStatististicsTab:La(e),isGpuOperation:et(e),operationPerformanceUrlTemplate:tt(e)}}),ic),oc=ac(rc);function sc(e){var t=(0,u.d4)(Ye);return(0,Xr.v)({type:Dt.c.OPERATION,startDeps:[t],allowStart:function(e){var t=(0,o.A)(e,1)[0];return!(0,Oe.RP)(t)}}),(0,Qt.jsx)(oc,(0,l.A)({},e))}var lc=(0,i.A)("operations");const uc=(0,a.y)((function(e){var t=e.match,n=e.viewContext!==Kt.PB?"elements-main-section":"";return(0,Qt.jsxs)("div",{className:lc(null,n),children:[(0,Qt.jsx)(vn,{}),(0,Qt.jsxs)(a.dO,{children:[(0,Qt.jsx)(a.qh,{path:t.path,exact:!0,render:function(){return(0,Qt.jsx)(oi,{})}}),(0,Qt.jsx)(a.qh,{path:"".concat(t.path,"/:operationId/:tab?"),component:sc})]})]})}))},32286:(e,t,n)=>{"use strict";n.d(t,{R:()=>i,iY:()=>r});const r={NO_DATA:"ERR.CK.NO_DATA",INVALID_DATA:"ERR.CK.INVALID_DATA",UNKNOWN:"ERR.CK.UNKNOWN_ERROR",UNKNOWN_PLUGIN:"ERR.CK.UNKNOWN_PLUGIN",TOO_MANY_LINES:"ERR.CK.TOO_MANY_LINES"};class i extends Error{constructor({originalError:e,message:t,code:n=r.UNKNOWN}={}){super(t),this.isCustomError=!0,this.code=n,e&&(this.name=e.name,this.stack=e.stack)}}},36161:(e,t,n)=>{"use strict";n.d(t,{A:()=>l}),n(77810);var r=n(76872),i=n(64965),a=n(73822),o=n(64922),s=(0,r.A)("elements-message");function l(){var e=(0,i.W5)().params.tab;return(0,o.jsx)("div",{className:s({theme:"warning"}),children:(0,o.jsx)("p",{className:s("paragraph"),children:e?'Viewer for tab "'.concat(a.A.format.ReadableField(e),'" is not implemented.'):"Viewer for this tab is not implemented."})})}},40860:(e,t,n)=>{"use strict";n.d(t,{q:()=>a}),n(77810);var r=n(70915),i=n(64922);function a(e){var t=e.className;return(0,i.jsx)(r.A,{className:t,hoverContent:"The job is stale, the information may be obsolete"})}},41652:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(40319),i=n(29121),a=n(12937),o=n(66134),s=n(10785),l=n(77810),u=n(15647),c=n(5992),d=n(76872),p=n(89067),m=n(33951),h=n(53332),f=n(92736),v=n(26264),g=(n(9909),n(64922)),A={toggleColumnSortOrder:m.z};const b=(0,c.Zz)((0,u.Ng)((function(e){return{sortState:e.tables}}),A),(function(e){var t;return t=function(t){function n(){return(0,i.A)(this,n),(0,o.A)(this,n,arguments)}return(0,s.A)(n,t),(0,a.A)(n,[{key:"renderStickyHead",value:function(){var e=this.props.top,t=(0,d.A)("elements-table-wrapper")({sticky:"top"});return(0,g.jsx)("div",{className:t,style:{top:e},children:(0,g.jsx)("table",{className:(0,f.xV)(this.props),children:(0,g.jsx)(p.A,(0,r.A)({},this.props))})})}},{key:"render",value:function(){return(0,g.jsxs)(l.Fragment,{children:[this.renderStickyHead(),(0,g.jsx)(e,(0,r.A)({},this.props))]})}}])}(l.Component),t.displayName="WithStickyHead(".concat((0,h.Mn)(e),")"),t.defaultProps={templates:{},size:"m",theme:"bordered",padded:!1,striped:!0,top:v.uF},t}))},42324:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(77810),i=n(76426),a=n(88787),o=n(64922);function s(e){var t=e.className,n=e.url,s=e.title,l=e.theme,u=e.children,c=e.hideIcon,d=e.face,p=e.wrapContent;if(!n)return null;var m=c?null:(0,o.jsx)(a.A,{awesome:"chart-bar",face:d}),h=u?(0,o.jsxs)(r.Fragment,{children:[m,u]}):m;return(0,o.jsx)(i.A,{className:t,target:"_blank",theme:l,url:n,title:null!=s?s:"View",children:p?p(h):h})}const l=r.memo(s)},46357:(e,t,n)=>{"use strict";n.d(t,{v:()=>s});var r=n(40319),i=n(22636),a=n(15647),o=n(52797);function s(e){var t=(0,a.d4)(o.dB);(0,i.gj)((0,r.A)((0,r.A)({},e),{},{subPage:e.subPage||"ui.".concat(t)}))}},49133:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(40319),i=n(29121),a=n(12937),o=n(66134),s=n(10785),l=n(77810),u=n(76872),c=n(17036),d=n(92736),p=(n(9909),n(64922)),m=function(e){function t(e){var n;return(0,i.A)(this,t),(n=(0,o.A)(this,t,[e])).state={},n}return(0,s.A)(t,e),(0,a.A)(t,[{key:"renderRow",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.props,i=r.css,a=r.itemHeight,o=r.templates,s=r.itemMods,l=r.selectedIndex,u=r.computeKey,d=r.cssHover,m=this.state,h=m.columnSet,f=m.columnItems,v=l===t,g="function"==typeof u?u(e):n;return(0,p.jsx)(c.A,{columnSet:h,columnItems:f,item:e,itemHeight:a,css:i,templates:o,selected:v,index:t,itemMods:s,cssHover:d},g)}},{key:"render",value:function(){var e=(0,u.A)(d.R9)("footer"),t=this.props.footer;return(0,p.jsx)("tfoot",{className:e,children:this.renderRow(t,0)})}}],[{key:"getDerivedStateFromProps",value:function(e){var t=e.columns,n=(0,d.PM)(t);return{columnItems:n.items,columnSet:n.set}}}])}(l.Component);m.defaultProps={templates:{},cssHover:!1};var h=n(53332);const f=function(e){var t;return t=function(t){function n(){return(0,i.A)(this,n),(0,o.A)(this,n,arguments)}return(0,s.A)(n,t),(0,a.A)(n,[{key:"renderStickyFooter",value:function(){var e=(0,u.A)("elements-table-wrapper")({sticky:"bottom"}),t=this.props.footer;return(0,p.jsx)("div",{className:e,children:(0,p.jsx)("table",{className:(0,d.xV)(this.props),children:(0,p.jsx)(m,(0,r.A)((0,r.A)({},this.props),{},{footer:t}))})})}},{key:"render",value:function(){return(0,p.jsxs)(l.Fragment,{children:[(0,p.jsx)(e,(0,r.A)({},this.props)),this.props.footer&&this.renderStickyFooter()]})}}])}(l.Component),t.displayName="WithStickyFooter(".concat((0,h.Mn)(e),")"),t.defaultProps={size:"m"},t}},50256:(e,t,n)=>{"use strict";n.d(t,{R:()=>s,J:()=>o});var r=n(50326);const i=JSON.parse('{"common":{"tooltip-sum":"Sum","tooltip-rest":"Rest"},"chartkit":{"error":"Error","legend-series-hide":"Hide all lines","legend-series-show":"Show all lines","tooltip-point-format-size":"Size","tooltip-sum":"Sum","tooltip-rest":"Rest","error-incorrect-key-value-intro":"Incorrect notation of an object passed to","error-incorrect-key":", object keys must be convertible to integer","error-incorrect-value":", object values must be a string or a function which returns a string"},"chartkit-table":{"message-no-data":"No data","paginator-rows":"Rows"},"chartkit-ymap-legend":{"label-more":"Show more {{count}}","label-hide":"Hide","label-heatmap":"Heatmap"},"error":{"label_no-data":"No data","label_unknown-plugin":"Unknown plugin type \\"{{type}}\\"","label_unknown-error":"Unknown error","label_invalid-axis-category-data-point":"It seems you are trying to use inappropriate data type for \\"{{key}}\\" value in series \\"{{seriesName}}\\" for axis with type \\"category\\". Strings and numbers are allowed.","label_invalid-axis-datetime-data-point":"It seems you are trying to use inappropriate data type for \\"{{key}}\\" value in series \\"{{seriesName}}\\" for axis with type \\"datetime\\". Only numbers are allowed.","label_invalid-axis-linear-data-point":"It seems you are trying to use inappropriate data type for \\"{{key}}\\" value in series \\"{{seriesName}}\\" for axis with type \\"linear\\". Numbers and nulls are allowed.","label_invalid-pie-data-value":"It seems you are trying to use inappropriate data type for \\"value\\" value. Only numbers are allowed.","label_invalid-series-type":"It seems you haven\'t defined \\"series.type\\" property, or defined it incorrectly. Available values: [{{types}}].","label_invalid-series-property":"It seems you are trying to use inappropriate value for \\"{{key}}\\", or defined it incorrectly. Available values: [{{values}}].","label_invalid-treemap-redundant-value":"It seems you are trying to set \\"value\\" for container node. Check node with this properties: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-treemap-missing-value":"It seems you are trying to use node without \\"value\\". Check node with this properties: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-y-axis-index":"It seems you are trying to use inappropriate index for Y axis: \\"{{index}}\\""},"highcharts":{"reset-zoom-title":"Reset zoom","decimal-point":".","thousands-sep":" ","Mon":"Mon","Tue":"Tue","Wed":"Wed","Thu":"Thu","Fri":"Fri","Sat":"Sat","Sun":"Sun","Jan":"Jan","January":"January","Feb":"Feb","February":"February","Mar":"Mar","March":"March","Apr":"Apr","April":"April","May":"May","Jun":"Jun","June":"June","Jul":"Jul","July":"July","Aug":"Aug","August":"August","Sep":"Sep","September":"September","Oct":"Oct","October":"October","Nov":"Nov","November":"November","Dec":"Dec","December":"December"}}'),a=JSON.parse('{"common":{"tooltip-sum":"Сумма","tooltip-rest":"Остальные"},"chartkit":{"error":"Ошибка","legend-series-hide":"Скрыть все линии","legend-series-show":"Показать все линии","loading":"Загрузка","tooltip-point-format-size":"Размер","tooltip-sum":"Сумма","tooltip-rest":"Остальные","error-incorrect-key-value-intro":"Некорректный формат объекта переданного как значение в","error-incorrect-key":", ключи объекта должны быть преобразуемы в целое число","error-incorrect-value":", значением объекта может быть либо строка, либо функция возвращающая строку"},"chartkit-table":{"message-no-data":"Нет данных","paginator-rows":"Строки"},"chartkit-ymap-legend":{"label-more":"Показать ещё {{count}}","label-hide":"Свернуть","label-heatmap":"Тепловая карта"},"error":{"label_no-data":"Нет данных","label_unknown-plugin":"Неизвестный тип плагина \\"{{type}}\\"","label_unknown-error":"Неизвестная ошибка","label_invalid-axis-category-data-point":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"{{key}}\\" в серии \\"{{seriesName}}\\" для оси с типом \\"category\\". Допускается использование строк и чисел.","label_invalid-axis-datetime-data-point":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"{{key}}\\" в серии \\"{{seriesName}}\\" для оси с типом \\"datetime\\". Допускается только использование чисел.","label_invalid-axis-linear-data-point":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"{{key}}\\" в серии \\"{{seriesName}}\\" для оси с типом \\"linear\\". Допускается использование чисел и значений null.","label_invalid-pie-data-value":"Похоже, что вы пытаетесь использовать недопустимый тип данных для значения \\"value\\". Допускается только использование чисел.","label_invalid-series-type":"Похоже, что вы не указали значение \\"series.type\\" или указали его неверно. Доступные значения: [{{types}}].","label_invalid-series-property":"Похоже, что вы пытаетесь использовать недопустимое значение для \\"{{key}}\\", или указали его неверно. Доступные значения: [{{values}}].","label_invalid-treemap-redundant-value":"Похоже, что вы пытаетесь установить значение \\"value\\" для узла, используемого в качестве контейнера. Проверьте узел с этими свойствами: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-treemap-missing-value":"Похоже, что вы пытаетесь использовать узел без значения \\"value\\". Проверьте узел с этими свойствами: { id: \\"{{id}}\\", name: \\"{{name}}\\" }","label_invalid-y-axis-index":"Похоже, что вы пытаетесь использовать некорректный индекс для оси Y: \\"{{index}}\\""},"highcharts":{"reset-zoom-title":"Сбросить увеличение","decimal-point":",","thousands-sep":" ","Mon":"Пн","Tue":"Вт","Wed":"Ср","Thu":"Чт","Fri":"Пт","Sat":"Сб","Sun":"Вс","Jan":"Янв","January":"Январь","Feb":"Фев","February":"Февраль","Mar":"Мар","March":"Март","Apr":"Апр","April":"Апрель","May":"Май","Jun":"Июн","June":"Июнь","Jul":"Июл","July":"Июль","Aug":"Авг","August":"Август","Sep":"Сен","September":"Сентябрь","Oct":"Окт","October":"Октябрь","Nov":"Ноя","November":"Ноябрь","Dec":"Дек","December":"Декабрь"}}'),o=new r.TH;o.registerKeysets("en",i),o.registerKeysets("ru",a);const s=o.i18n.bind(o)},52789:(e,t,n)=>{"use strict";n.d(t,{W:()=>h});var r=n(44531),i=n(81214),a=n.n(i),o=n(13630),s=n.n(o),l=n(50256),u=n(95603),c=n.n(u);function d(e,t,n){if("plugins"===n){const n=[...e],r=[...t];let i=n.map((e=>{const t=r.findIndex((({type:t})=>t===e.type));if(-1!==t){const n=r[t];return r.splice(t,1),{type:e.type,renderer:n.renderer}}return e}));return r.length>0&&(i=[...i,...r]),i}return c()(e)?s()(e,t,d):t}const p=new class{constructor(){this.events={}}on(e,t){this.events[e]?this.events[e].push(t):this.events[e]=[t]}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter((({id:e})=>e!==t)))}dispatch(e,t){this.events[e]&&this.events[e].forEach((({action:e})=>{e(t)}))}},m=e=>{(0,r.jK)({lang:e}),l.J.setLang(e)},h=new class{constructor(){this.settings={plugins:[],lang:"en"},m(this.get("lang"))}get(e){return a()(this.settings,e)}set(e){const t=(n=e,Object.entries(n).reduce(((e,[t,n])=>(void 0!==n&&(e[t]=n),e)),{}));var n;if(this.settings=s()(this.settings,t,d),t.lang){const e=t.lang||this.get("lang");m(e),p.dispatch("change-lang",e)}}}},53302:(e,t,n)=>{"use strict";n.d(t,{A:()=>l}),n(77810);var r=n(76872),i=n(73822),a=n(88787),o=n(64922),s=(0,r.A)("status-label");function l(e){var t=e.className,n=e.label,r=e.renderPlaque,l=e.text,u=e.state,c=e.iconState,d=function(e){var t;return null!==(t={materializing:"preparing",initializing:"preparing",preparing:"preparing",pending:"preparing",starting:"preparing",running:"running",completing:"running",failing:"running",aborting:"running",reviving:"running",suspended:"suspended",failed:"failed",completed:"completed",aborted:"aborted",Unknown:"unknown",Stopped:"suspended",Paused:"suspended",Working:"running",Draining:"running",Pausing:"running",Completed:"completed"}[e])&&void 0!==t?t:"unknown"}(n),p=function(e){return{preparing:"clock",running:"play-circle",suspended:"pause-circle",failed:"times-circle",completed:"check-circle",aborted:"times-circle",unknown:"question-circle"}[e]}(null!=c?c:d),m={state:null!=u?u:d};return n||l||u?(0,o.jsxs)("span",{className:s(null,r?s("plaque",m,t):s(m,t)),children:[(0,o.jsx)(a.A,{awesome:p}),(0,o.jsx)("span",{children:null!=l?l:i.A.format.ReadableField(n)})]}):(0,o.jsx)("span",{})}},53364:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(40319),i=n(29121),a=n(12937),o=n(66134),s=n(10785),l=n(77810),u=n(22483),c=n(53332),d=n(26264),p=n(64922);function m(e){var t;return t=function(t){function n(){return(0,i.A)(this,n),(0,o.A)(this,n,arguments)}return(0,s.A)(n,t),(0,a.A)(n,[{key:"render",value:function(){return u.createPortal((0,p.jsx)(e,(0,r.A)({},this.props)),document.getElementById(d.g))}}])}(l.Component),t.displayName="WithSplit(".concat((0,c.Mn)(e),")"),t}},63082:(e,t,n)=>{"use strict";n.d(t,{X:()=>j});var r=n(64922),i=n(77810),a=n(81214),o=n.n(a),s=n(25930),l=n.n(s),u=n(23313),c=n.n(u),d=n(21086),p=n(82835),m=n(37338);const h=JSON.parse('{"label_empty":"No data","label-actions":"Actions","label-row-select":"Select"}'),f=JSON.parse('{"label_empty":"Нет данных","label-actions":"Действия","label-row-select":"Выбрать"}'),v=(0,m.N)({en:h,ru:f},"Table");function g(e){(0,p.m)(`[Table] Physical values (left, right) of "${e}" property are deprecated. Use logical values (start, end) instead.`)}function A(e,t){return"left"===e?(g(t),"start"):"right"===e?(g(t),"end"):e}const b=(0,d.om)("table");class j extends i.Component{constructor(){super(...arguments),this.state={activeScrollElement:"scrollContainer",columnsStyles:Array.from(this.props.columns,(()=>({}))),columnHeaderRefs:Array.from(this.props.columns,(()=>i.createRef()))},this.tableRef=i.createRef(),this.scrollContainerRef=i.createRef(),this.horizontalScrollBarRef=i.createRef(),this.horizontalScrollBarInnerRef=i.createRef(),this.renderRow=(e,t)=>{const{columns:n,isRowDisabled:i,onRowClick:a,onRowMouseEnter:o,onRowMouseLeave:s,onRowMouseDown:l,getRowClassNames:u,verticalAlign:c,edgePadding:d,wordWrap:p,getRowDescriptor:m}=this.props,{columnsStyles:h}=this.state,f=null==m?void 0:m(e,t),v=(null==f?void 0:f.disabled)||(null==i?void 0:i(e,t))||!1,g=(null==f?void 0:f.classNames)||(null==u?void 0:u(e,t))||[],x=Boolean(!v&&a);return(0,r.jsx)("tr",{onClick:!v&&a?a.bind(null,e,t):void 0,onMouseEnter:!v&&o?o.bind(null,e,t):void 0,onMouseLeave:!v&&s?s.bind(null,e,t):void 0,onMouseDown:!v&&l?l.bind(null,e,t):void 0,className:b("row",{disabled:v,interactive:x,"vertical-align":c},g.join(" ")),children:n.map(((n,i)=>{const{id:a,align:o,primary:s,className:l,sticky:u}=n,c=j.getBodyCellContent(n,e,t),m=A(o,"column.align"),f=A(u,"column.sticky");return(0,r.jsx)("td",{style:h[i],className:b("cell",{align:m,primary:s,sticky:f,"edge-padding":d,"word-wrap":p},l),children:c},a)}))},j.getRowId(this.props,e,t))},this.handleScrollContainerMouseenter=()=>{this.setState({activeScrollElement:"scrollContainer"})},this.handleScrollContainerScroll=()=>{"scrollContainer"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.horizontalScrollBarRef.current.scrollLeft=this.scrollContainerRef.current.scrollLeft)},this.handleHorizontalScrollBarMouseenter=()=>{this.setState({activeScrollElement:"scrollBar"})},this.handleHorizontalScrollBarScroll=()=>{"scrollBar"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.scrollContainerRef.current.scrollLeft=this.horizontalScrollBarRef.current.scrollLeft)}}static getRowId(e,t,n){const{data:r,getRowId:i,getRowDescriptor:a}=e,o=null!=n?n:r.indexOf(t),s=null==a?void 0:a(t,o);return void 0!==(null==s?void 0:s.id)?s.id:"function"==typeof i?i(t,o):String(i&&i in t?t[i]:o)}static getHeadCellContent(e){const{id:t,name:n}=e;let r;return r="function"==typeof n?n():"string"==typeof n?n:t,r}static getBodyCellContent(e,t,n){const{id:r,template:i,placeholder:a}=e;let s,u;return s="function"==typeof a?a(t,n):null!=a?a:"—","function"==typeof i?u=i(t,n):"string"==typeof i?u=o()(t,i):l()(t,r)&&(u=o()(t,r)),[void 0,null,""].includes(u)&&s?s:u}static getDerivedStateFromProps(e,t){return e.columns.length===t.columnHeaderRefs.length?null:{columnHeaderRefs:Array.from(e.columns,(()=>i.createRef()))}}componentDidMount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver=new ResizeObserver((e=>{var t;const{contentRect:n}=e[0];null===(t=this.horizontalScrollBarInnerRef.current)||void 0===t||t.style.setProperty("width",`${n.width}px`)})),this.tableRef.current&&this.tableResizeObserver.observe(this.tableRef.current),this.scrollContainerRef.current&&(this.scrollContainerRef.current.addEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.addEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.addEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.addEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver=new ResizeObserver((e=>{window.requestAnimationFrame((()=>{Array.isArray(e)&&e.length&&this.updateColumnStyles()}))})),this.tableRef.current&&this.columnsResizeObserver.observe(this.tableRef.current),this.updateColumnStyles()}componentDidUpdate(e){this.props.columns!==e.columns&&this.updateColumnStyles()}componentWillUnmount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver&&this.tableResizeObserver.disconnect(),this.scrollContainerRef.current&&(this.scrollContainerRef.current.removeEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.removeEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.removeEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.removeEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver&&this.columnsResizeObserver.disconnect()}render(){const{columns:e,stickyHorizontalScroll:t,className:n,qa:a}=this.props,o=e.some((({primary:e})=>e));return(0,r.jsx)("div",{className:b({"with-primary":o,"with-sticky-scroll":t},n),"data-qa":a,children:t?(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)("div",{ref:this.scrollContainerRef,className:b("scroll-container"),children:this.renderTable()}),this.renderHorizontalScrollBar()]}):this.renderTable()})}renderHead(){const{columns:e,edgePadding:t,wordWrap:n}=this.props,{columnsStyles:i}=this.state;return(0,r.jsx)("thead",{className:b("head"),children:(0,r.jsx)("tr",{className:b("row"),children:e.map(((e,a)=>{const{id:o,align:s,primary:l,sticky:u,className:c}=e,d=A(s,"column.align"),p=A(u,"column.sticky"),m=j.getHeadCellContent(e);return(0,r.jsx)("th",{ref:this.state.columnHeaderRefs[a],style:i[a],className:b("cell",{align:d,primary:l,sticky:p,"edge-padding":t,"word-wrap":n},c),children:m},o)}))})})}renderBody(){const{data:e}=this.props;return(0,r.jsx)("tbody",{className:b("body"),children:e.length>0?e.map(this.renderRow):this.renderEmptyRow()})}renderTable(){const{width:e="auto"}=this.props;return(0,r.jsxs)("table",{ref:this.tableRef,className:b("table",{width:e}),children:[this.renderHead(),this.renderBody()]})}renderEmptyRow(){const{columns:e,emptyMessage:t}=this.props;return(0,r.jsx)("tr",{className:b("row",{empty:!0}),children:(0,r.jsx)("td",{className:b("cell"),colSpan:e.length,children:t||v("label_empty")})})}renderHorizontalScrollBar(){const{stickyHorizontalScroll:e,stickyHorizontalScrollBreakpoint:t=0}=this.props;return(0,r.jsx)("div",{ref:this.horizontalScrollBarRef,className:b("horizontal-scroll-bar",{"sticky-horizontal-scroll":e}),style:{bottom:`${t}px`},"data-qa":"sticky-horizontal-scroll-breakpoint-qa",children:(0,r.jsx)("div",{ref:this.horizontalScrollBarInnerRef,className:b("horizontal-scroll-bar-inner")})})}updateColumnStyles(){this.setState((e=>{const t=e.columnHeaderRefs.map((e=>null===e.current?void 0:e.current.getBoundingClientRect().width));return{columnsStyles:this.props.columns.map(((e,n)=>this.getColumnStyles(n,t)))}}))}getColumnStyles(e,t){const{columns:n}=this.props,r=n[e],i={};if("string"==typeof r.width)return{maxWidth:0,width:r.width};if(void 0!==r.width&&(i.width=r.width),!r.sticky)return i;const a="left"===r.sticky||"start"===r.sticky?t.slice(0,e):t.slice(e+1);return i["left"===r.sticky||"start"===r.sticky?"insetInlineStart":"insetInlineEnd"]=a.reduce(((e,t)=>c()(t)?e+t:e),0),i}}j.defaultProps={edgePadding:!0}},63588:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(29121),i=n(12937),a=n(66134),o=n(10785),s=n(77810),l=n(10720),u=n(8208),c=n(73822),d=n(48971),p=n(64922),m=new l.I,h=function(e){function t(){return(0,r.A)(this,t),(0,a.A)(this,t,arguments)}return(0,o.A)(t,e),(0,i.A)(t,[{key:"componentDidUpdate",value:function(){var e=this.props,t=e.error,n=e.loaded,r=e.errorData;t&&n&&m.add({theme:"danger",name:"network",autoHiding:5e5,title:"Oops! something went wrong.",content:r?r.message:c.A.format.NO_VALUE,actions:[{label:" view",onClick:function(){return(0,d.eW)(r)}}]})}},{key:"render",value:function(){var e=this.props,t=e.alwaysShowError,n=void 0!==t&&t,r=e.error,i=e.errorData,a=e.loaded,o=e.children;return!r||!n&&a?o:(0,p.jsx)(u.z,{error:i})}}])}(s.Component)},63657:(e,t,n)=>{"use strict";n.d(t,{p:()=>c});var r=n(9736),i=n(77810),a=n(15647),o=n(53364),s=n(53246),l=n(64922),u=(0,o.A)((function(e){return e.children}));function c(e,t){var n=t.renderContent,o=i.useState(!1),c=(0,r.A)(o,2),d=c[0],p=c[1],m=(0,a.wA)(),h=i.useCallback((function(){m((0,s.Po)(e)),p(!0)}),[p,m,e]),f=i.useCallback((function(){p(!1),m((0,s.Dw)())}),[p,m]);return{closeWidget:f,openWidget:h,widgetOpened:d,widgetContent:d?(0,l.jsx)(u,{children:n({onClose:f,visible:d})}):null}}},67901:(e,t,n)=>{"use strict";n.d(t,{cn:()=>i,o:()=>a});var r=n(29717);const i=(0,r.withNaming)({e:"__",m:"_"}),a=(0,r.withNaming)({n:"chartkit-",e:"__",m:"_"})},69461:function(e){e.exports=function(){"use strict";return function(e,t,n){e=e||{};var r=t.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var l,u,c,d=a.$locale().relativeTime||i,p=e.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=p.length,h=0;h<m;h+=1){var f=p[h];f.d&&(l=o?n(t).diff(a,f.d,!0):a.diff(t,f.d,!0));var v=(e.rounding||Math.round)(Math.abs(l));if(c=l>0,v<=f.r||!f.r){v<=1&&h>0&&(f=p[h-1]);var g=d[f.l];s&&(v=s(""+v)),u="string"==typeof g?g.replace("%d",v):g(v,r,f.l,c);break}}if(r)return u;var A=c?d.future:d.past;return"function"==typeof A?A(u):A.replace("%s",u)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}()},70915:(e,t,n)=>{"use strict";n.d(t,{A:()=>u}),n(77810);var r=n(76872),i=n(89648),a=n(88787),o=n(19410),s=n(64922),l=(0,r.A)("yt-warning-icon");function u(e){var t=e.className,n=e.hoverContent,r=e.children,u=e.color;return(0,s.jsx)("span",{className:l(null,t),children:(0,s.jsxs)(o.m,{className:l("tooltip"),content:n,children:[(0,s.jsx)(a.A,{className:l("icon",{color:u}),awesome:"exclamation-triangle"}),r&&(0,s.jsx)(i.E,{variant:"inherit",color:u,children:r})]})})}},74069:(e,t,n)=>{"use strict";n.d(t,{BL:()=>c,DG:()=>u,sQ:()=>d,si:()=>l});var r=n(9736),i=n(77810),a=n(15647),o=n(53246),s=n(44611);function l(){var e=(0,a.wA)();i.useEffect((function(){e((0,o.Bg)())}),[e])}function u(){return l(),null}function c(){var e=i.useState(),t=(0,r.A)(e,2),n=t[0],a=t[1];return i.useEffect((function(){(0,s.u)().then((function(e){a(e)}))}),[]),n}function d(e){var t=e.children,n=c();return n?t({defaultPoolTree:n}):null}},79703:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(40319),i=n(64922);const a=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.44 4.54c.43-.354.994-.565 1.56-.565 1.217 0 2.34.82 2.34 2.14 0 .377-.078.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.325.257-.379.328-.038.052-.038.07-.038.089a.75.75 0 0 1-1.5 0c0-.794.544-1.286 1.057-1.645.28-.196.4-.332.458-.426a.54.54 0 0 0 .075-.312c0-.3-.244-.641-.84-.641a1 1 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 0 1-1.5 0c0-.674.345-1.22.78-1.577M8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})}))}},87605:(e,t,n)=>{"use strict";n.d(t,{d:()=>r});const r=()=>`ck.${((e,t)=>{let n="";for(let e=10;e>0;--e)n+=t[Math.floor(36*Math.random())];return n})(0,"0123456789abcdefghijklmnopqrstuvwxyz")}`},90200:(e,t,n)=>{"use strict";n.d(t,{A:()=>x,g:()=>j});var r=n(52789),i=n(56911),a=n(77810),o=n(50256),s=n(32286),l=n(87605);const u=a.memo;var c=n(67901);class d extends a.Component{constructor(){super(...arguments),this.state={error:void 0},this.resetError=()=>{this.state.error&&this.setState({error:void 0})}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(){var e,t;const{error:n}=this.state;n&&(null===(t=(e=this.props).onError)||void 0===t||t.call(e,{error:n}))}componentDidUpdate(e){if(e.data!==this.props.data){const{error:e}=this.state;e&&"code"in e&&e.code===s.iY.NO_DATA&&this.resetError()}}render(){const{error:e}=this.state;if(e){const t=function(e){const t="code"in e&&e.code;return(e.message||t||(0,o.R)("error","label_unknown-error")).toString()}(e);return this.props.renderError?this.props.renderError({error:e,message:t,resetError:this.resetError}):a.createElement("div",null,t)}return this.props.children}}var p=n(5865);const m=(0,c.o)("loader"),h=e=>{var{renderPluginLoader:t}=e,n=(0,i.Tt)(e,["renderPluginLoader"]);const r=null==t?void 0:t();return void 0!==r?r:a.createElement("div",{className:m()},a.createElement(p.a,Object.assign({},n)))},f=(0,c.cn)("chartkit"),v=e=>{const t=a.useRef(),{instanceRef:n,id:u,type:c,isMobile:d,renderPluginLoader:p}=e,m=(0,i.Tt)(e,["instanceRef","id","type","isMobile","renderPluginLoader"]),v=a.useMemo((()=>(0,l.d)()),[]),g=u||v,A=r.W.get("lang"),b=r.W.get("plugins").find((e=>e.type===c));if(!b)throw new s.R({code:s.iY.UNKNOWN_PLUGIN,message:(0,o.R)("error","label_unknown-plugin",{type:c})});const j=b.renderer;return a.useImperativeHandle(n,(()=>({reflow(e){var n;(null===(n=t.current)||void 0===n?void 0:n.reflow)&&t.current.reflow(e)}})),[]),a.createElement(a.Suspense,{fallback:a.createElement(h,{renderPluginLoader:p})},a.createElement("div",{className:f({mobile:d},"chartkit-theme_common")},a.createElement(j,Object.assign({ref:t,id:g,lang:A},m))))},g=u(a.forwardRef((function(e,t){return a.createElement(d,{onError:e.onError,data:e.data,renderError:e.renderError},a.createElement(v,Object.assign({instanceRef:t},e)))}))),A={type:"yagr",renderer:a.lazy((()=>Promise.all([n.e(3735),n.e(5232)]).then(n.bind(n,55232))))};n(203),r.W.set({plugins:[A]});var b=["rgb(77, 162, 241)","rgb(255, 61, 100)"];function j(e){return b[e%b.length]}const x=g}}]);
|
2
|
-
//# sourceMappingURL=45.12c412c1.chunk.js.map
|