@ytsaurus/ui 2.4.0 → 2.6.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.
Files changed (59) hide show
  1. package/dist/public/build/assets-manifest.json +39 -39
  2. package/dist/public/build/css/{9030.30b67fe6.chunk.css → 3792.a5336147.chunk.css} +1 -1
  3. package/dist/public/build/css/{9030.30b67fe6.chunk.css.map → 3792.a5336147.chunk.css.map} +1 -1
  4. package/dist/public/build/js/2142.9a9a44af.chunk.js +2 -0
  5. package/dist/public/build/js/2142.9a9a44af.chunk.js.map +1 -0
  6. package/dist/public/build/js/3225.0ca5646d.chunk.js +2 -0
  7. package/dist/public/build/js/3225.0ca5646d.chunk.js.map +1 -0
  8. package/dist/public/build/js/{9030.200c7642.chunk.js → 3792.1af8dc36.chunk.js} +2 -2
  9. package/dist/public/build/js/{9030.200c7642.chunk.js.map → 3792.1af8dc36.chunk.js.map} +1 -1
  10. package/dist/public/build/js/3848.db687afa.chunk.js +2 -0
  11. package/dist/public/build/js/3848.db687afa.chunk.js.map +1 -0
  12. package/dist/public/build/js/{9361.f5606246.chunk.js → 9361.632ac658.chunk.js} +3 -3
  13. package/dist/public/build/js/9361.632ac658.chunk.js.map +1 -0
  14. package/dist/public/build/js/acl.86dde5b4.chunk.js +2 -0
  15. package/dist/public/build/js/acl.86dde5b4.chunk.js.map +1 -0
  16. package/dist/public/build/js/{chart-kit.6c826f92.chunk.js → chart-kit.bc706a72.chunk.js} +2 -2
  17. package/dist/public/build/js/{chart-kit.6c826f92.chunk.js.map → chart-kit.bc706a72.chunk.js.map} +1 -1
  18. package/dist/public/build/js/{cluster-page-wrapper.24759f54.chunk.js → cluster-page-wrapper.69410672.chunk.js} +2 -2
  19. package/dist/public/build/js/{cluster-page-wrapper.24759f54.chunk.js.map → cluster-page-wrapper.69410672.chunk.js.map} +1 -1
  20. package/dist/public/build/js/{dashboard.5baf76be.chunk.js → dashboard.705aef5e.chunk.js} +2 -2
  21. package/dist/public/build/js/{dashboard.5baf76be.chunk.js.map → dashboard.705aef5e.chunk.js.map} +1 -1
  22. package/dist/public/build/js/{incarnations.db35d3e7.chunk.js → incarnations.b6c8305d.chunk.js} +2 -2
  23. package/dist/public/build/js/incarnations.b6c8305d.chunk.js.map +1 -0
  24. package/dist/public/build/js/main.2691b74a.js +3 -0
  25. package/dist/public/build/js/main.2691b74a.js.map +1 -0
  26. package/dist/public/build/js/navigation.b95d53a4.chunk.js +2 -0
  27. package/dist/public/build/js/navigation.b95d53a4.chunk.js.map +1 -0
  28. package/dist/public/build/js/{runtime.0bd241cc.js → runtime.cd2507d5.js} +2 -2
  29. package/dist/public/build/js/{runtime.0bd241cc.js.map → runtime.cd2507d5.js.map} +1 -1
  30. package/dist/public/build/js/settings-panel.5508764a.chunk.js +2 -0
  31. package/dist/public/build/js/settings-panel.5508764a.chunk.js.map +1 -0
  32. package/dist/public/build/js/{yt-df-dialog.3c75c1c6.chunk.js → yt-df-dialog.d8b77493.chunk.js} +3 -3
  33. package/dist/public/build/js/yt-df-dialog.d8b77493.chunk.js.map +1 -0
  34. package/dist/public/build/js/yt-queries-list.9b028808.chunk.js +2 -0
  35. package/dist/public/build/js/yt-queries-list.9b028808.chunk.js.map +1 -0
  36. package/dist/public/build/manifest.json +34 -34
  37. package/package.json +2 -2
  38. package/dist/public/build/js/2142.e3f4501e.chunk.js +0 -2
  39. package/dist/public/build/js/2142.e3f4501e.chunk.js.map +0 -1
  40. package/dist/public/build/js/3225.1bafd8e7.chunk.js +0 -2
  41. package/dist/public/build/js/3225.1bafd8e7.chunk.js.map +0 -1
  42. package/dist/public/build/js/3792.87728e87.chunk.js +0 -2
  43. package/dist/public/build/js/3792.87728e87.chunk.js.map +0 -1
  44. package/dist/public/build/js/9361.f5606246.chunk.js.map +0 -1
  45. package/dist/public/build/js/acl.ad72cb19.chunk.js +0 -2
  46. package/dist/public/build/js/acl.ad72cb19.chunk.js.map +0 -1
  47. package/dist/public/build/js/incarnations.db35d3e7.chunk.js.map +0 -1
  48. package/dist/public/build/js/main.10db4a06.js +0 -3
  49. package/dist/public/build/js/main.10db4a06.js.map +0 -1
  50. package/dist/public/build/js/navigation.dd0f8fc8.chunk.js +0 -2
  51. package/dist/public/build/js/navigation.dd0f8fc8.chunk.js.map +0 -1
  52. package/dist/public/build/js/settings-panel.4be91fef.chunk.js +0 -2
  53. package/dist/public/build/js/settings-panel.4be91fef.chunk.js.map +0 -1
  54. package/dist/public/build/js/yt-df-dialog.3c75c1c6.chunk.js.map +0 -1
  55. package/dist/public/build/js/yt-queries-list.e40d766e.chunk.js +0 -2
  56. package/dist/public/build/js/yt-queries-list.e40d766e.chunk.js.map +0 -1
  57. /package/dist/public/build/js/{9361.f5606246.chunk.js.LICENSE.txt → 9361.632ac658.chunk.js.LICENSE.txt} +0 -0
  58. /package/dist/public/build/js/{main.10db4a06.js.LICENSE.txt → main.2691b74a.js.LICENSE.txt} +0 -0
  59. /package/dist/public/build/js/{yt-df-dialog.3c75c1c6.chunk.js.LICENSE.txt → yt-df-dialog.d8b77493.chunk.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[2856],{9128:(e,t,n)=>{n.d(t,{V:()=>b}),n(77810);var i=n(76872),o=n(27528),s=n.n(o),r=n(65675),a=n.n(r),l=n(75414),c=n.n(l),d=n(80648),h=n.n(d),u=n(92611);const p=JSON.parse('{"all":"All","other":"Other","selected":"Selected"}'),v=JSON.parse('{"all":"Все","other":"Другие","selected":"Выбранные"}'),m=(0,u.Kc)("yt:nodes-types",{en:p,ru:v});var f=n(64922),g=(0,i.A)("counts-list"),x=3;function w(e){return c()(e,(function(e,t){return e+t.count}),0)}function j(e){return(0,f.jsxs)("li",{className:g("item"),children:[(0,f.jsx)("span",{className:g("type"),children:e.type}),(0,f.jsx)("span",{className:g("count"),children:e.count})]},e.type)}function y(e){var t=e.selectedItems,n=e.renderActions;return null!=t&&t.length?(0,f.jsxs)("li",{className:g("item"),children:[(0,f.jsx)("span",{className:g("type"),children:m("selected")}),(0,f.jsx)("span",{className:g("count"),children:t.length}),(0,f.jsx)("span",{className:g("actions"),children:null==n?void 0:n()})]}):null}function b(e){var t,n=e.hideAll,i=e.items,o=e.selectedItems,r=e.renderActions,l=function(e){var t=a()(e,(function(e){return e.count}),"desc");return h()(t,0,x)}(i),c=w(i),d=c-w(l);return(0,f.jsxs)("ul",{className:g("list"),children:[!n&&j({type:m("all"),count:c}),(t=l,s()(t,(function(e){return j(e)}))),!n&&d>0&&j({type:m("other"),count:d}),(0,f.jsx)(y,{selectedItems:o,renderActions:r})]})}},11687:(e,t,n)=>{n.d(t,{F:()=>k});var i=n(64922),o=n(72890),s=n(6542),r=n(84099),a=n(32235),l=n(17774),c=n(40590),d=n(70243),h=n(77810);const u=h.createContext(null),p=()=>{const e=h.useContext(u);if(!e)throw new Error('Alert: `useAlertContext` hook is used out of "AlertContext"');return e},v=e=>{const{view:t}=p();return(0,i.jsx)(s.$,Object.assign({view:"filled"===t?"normal-contrast":void 0},e))};const m=(0,n(21086).om)("alert"),f=({layout:e,view:t,children:n})=>(0,i.jsx)(u.Provider,{value:{layout:e,view:t},children:n});var g=n(12663);var x=n(44315);var w=n(16822);var j=n(71182);const y={danger:{filled:e=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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:x.A},warning:{filled:e=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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:w.A},utility:{filled:e=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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 b=n(89648),C=n(37338);const A=JSON.parse('{"label_close":"Close"}'),S=JSON.parse('{"label_close":"Закрыть"}'),R=(0,C.N)({en:A,ru:S},"Alert"),k=e=>{const{theme:t="normal",view:n="filled",layout:h="vertical",message:u,className:p,corners:v,style:g,onClose:x,align:w,qa:j}=e;return(0,i.jsx)(f,{layout:h,view:n,children:(0,i.jsx)(r.Z,{style:g,className:m({corners:v},(0,c.Y)({py:4,px:5},p)),theme:t,view:n,qa:j,children:(0,i.jsxs)(d.s,{gap:"3",alignItems:w,children:[void 0===e.icon?(0,i.jsx)(k.Icon,{theme:t,view:n}):e.icon,(0,i.jsxs)(d.s,{direction:"vertical"===h?"column":"row",gap:"5",grow:!0,children:[(0,i.jsx)(d.s,{gap:"2",grow:!0,className:m("text-content"),children:(0,i.jsxs)(d.s,{direction:"column",gap:"1",grow:!0,justifyContent:w,children:["string"==typeof e.title?(0,i.jsx)(k.Title,{text:e.title}):e.title,u]})}),Array.isArray(e.actions)?(0,i.jsx)(k.Actions,{items:e.actions}):e.actions]}),x&&(0,i.jsx)(s.$,{view:"flat",className:m("close-btn"),onClick:x,extraProps:{"aria-label":R("label_close")},children:(0,i.jsx)(a.I,{data:o.A,size:18,className:(0,l.$)({color:"secondary"})})})]})})})};k.Icon=({className:e,theme:t,view:n="filled",size:o=18})=>{const s=y[t];if(!s)return null;let r;return"success"===t?r="positive":"normal"!==t&&(r=t),(0,i.jsx)("div",{className:m("icon",(0,l.$)({color:r},e)),children:(0,i.jsx)(a.I,{data:s[n],size:o})})},k.Title=({text:e,className:t})=>(0,i.jsx)(b.E,{variant:"subheader-2",className:m("title",t),children:e}),k.Actions=({items:e,children:t,className:n})=>{const{layout:o}=p();return(0,i.jsx)(d.s,{className:m("actions",{minContent:"horizontal"===o},n),direction:"row",gap:"3",wrap:!0,alignItems:"horizontal"===o?"center":"flex-start",children:(null==e?void 0:e.map((({handler:e,text:t},n)=>(0,i.jsx)(v,{onClick:e,children:t},n))))||t})},k.Action=v},16034:(e,t,n)=>{n.d(t,{w:()=>M});var i=n(40319),o=n(9736),s=n(29121),r=n(12937),a=n(66134),l=n(10785),c=n(77810),d=n(76872),h=n(6542),u=n(32235),p=n(73384),v=n(11700),m=n.n(v),f=n(41655),g=n.n(f),x=n(92611);const w=JSON.parse('{"label_now":"Now","label_custom":"Custom","label_shortcut-list":"Show chart in"}'),j=(0,x.Kc)("yt:timeline",{en:w});var y=n(24297),b=n(24893),C=n(64922),A=function(e){function t(){var e;(0,s.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=(0,a.A)(this,t,[].concat(i))).state={},e.inputRef=c.createRef(),e.onKeyDown=function(t){switch(t.key){case"Enter":e.props.onDone(e.state.text);break;case"Escape":e.props.onCancel()}},e.onBlur=function(){e.props.onCancel()},e.onUpdate=function(t){e.setState({text:t}),e.props.onUpdate&&e.props.onUpdate(t)},e}return(0,l.A)(t,e),(0,r.A)(t,[{key:"componentDidMount",value:function(){this.props.autoselect&&(this.focus(),this.select())}},{key:"focus",value:function(){this.inputRef.current&&this.inputRef.current.focus()}},{key:"select",value:function(){this.inputRef.current&&this.inputRef.current.select()}},{key:"render",value:function(){var e=this.props,t=e.size,n=e.placeholder,i=e.autoFocus;return(0,C.jsx)(b.k,{controlRef:this.inputRef,size:t,placeholder:n,value:this.state.text,autoFocus:i,onUpdate:this.onUpdate,onBlur:this.onBlur,onKeyDown:this.onKeyDown})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.text;return t.previousText===n?t:{text:n,previousText:e.text}}}])}(c.Component),S=n(54299),R=function(e){function t(){return(0,s.A)(this,t),(0,a.A)(this,t,arguments)}return(0,l.A)(t,e),(0,r.A)(t,[{key:"render",value:function(){var e=this.props,t=e.from,n=e.to,i=e.separate,o=e.controlWidth;return i?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S.t,{range:!1,controlWidth:o,onUpdate:this.props.onFromChange,format:"dd.MM.yyyy HH:mm",from:t})," — ",(0,C.jsx)(S.t,{range:!1,controlWidth:o,onUpdate:this.props.onToChange,format:"dd.MM.yyyy HH:mm",from:n})]}):(0,C.jsx)(S.t,{onUpdate:this.props.onRangeChange,format:"yyyy-MM-dd HH:mm",from:t,to:n})}}])}(c.Component);R.defaultProps={separate:!1,controlWidth:"130px"};const k=function(e){return(0,C.jsx)("svg",(0,i.A)((0,i.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),{},{children:(0,C.jsx)("path",{fill:"currentColor",d:"M12 7v3h3V7zm0 0v3h3V7zm4 0v3h3V7zM4 11v3h3v-3zm8 0v3h3v-3zm0 0v3h3v-3zm4 0v3h3v-3zM4 15v3h3v-3zm8 0v3h3v-3zm0 0v3h3v-3zM8 7v3h3V7zm0 0v3h3V7zm0 4v3h3v-3zm0 0v3h3v-3zm0 4v3h3v-3zm0 0v3h3v-3z"})}))};var N=(0,d.A)("yc-timeline-picker"),T="custom",z=function(e){function t(){var e;(0,s.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=(0,a.A)(this,t,[].concat(i))).onClick=function(){e.props.onClick(e.props.time)},e}return(0,l.A)(t,e),(0,r.A)(t,[{key:"render",value:function(){var e=this.props,t=e.size,n=e.width,i=e.title,o=e.className,s=e.checked;return(0,C.jsx)(h.$,{view:s?"normal":"flat-secondary",size:t,width:n,onClick:this.onClick,className:o,children:i})}}])}(c.Component);z.defaultProps={size:"l"};var _=function(e,t){return"".concat((0,y.LA)(e)," - ").concat((0,y.LA)(t))},M=function(e){function t(){var e;(0,s.A)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(e=(0,a.A)(this,t,[].concat(r))).state={},e._datepickerRef=c.createRef(),e._inputRef=c.createRef(),e.onCustomClick=function(){e.setState({customInput:!0})},e.onCustomCancel=function(){e.setState({customInput:!1})},e.onCustomDone=function(t){var n,i;e.setState({customInput:!1}),null===(n=(i=e.props).onShortcut)||void 0===n||n.call(i,t,T)},e.onOpenPickerClick=function(){e.setState({opened:!0})},e.onPopupClose=function(t){var n;Boolean(null===(n=t.target)||void 0===n?void 0:n.closest(".yc-datepicker-body"))||(e.setState({opened:!1}),e.props.onUpdate({from:new Date(e.state.from).valueOf(),to:new Date(e.state.to).valueOf()}))},e.onInputChange=function(t){e.setState({datetime:t})},e.onInputDone=function(t){var n=/(?:(\d{4}-\d{2}-\d{2})(?:[ T]?(\d{2}:\d{2}))?)\s*-\s*(?:(\d{4}-\d{2}-\d{2})?[ T]?(\d{2}:\d{2})?)/.exec(t);if(n){var i=(0,o.A)(n,5),s=i[1],r=i[2],a=i[3],l=i[4],c=(0,y.zJ)("".concat(s," ").concat(r)),d=(0,y.zJ)("".concat(a||s," ").concat(l));isNaN(c)||isNaN(d)||e.props.onUpdate({from:c,to:d}),e.setState({opened:!1})}},e.onFromChange=function(t){var n=t.from,i=e.state.to;e.setState({from:g()(n).valueOf(),datetime:_(n,i)})},e.onToChange=function(t){var n=t.from,i=e.state.from;e.setState({to:g()(n).valueOf(),datetime:_(i,n)})},e.onRangeChange=function(t){var n=t.from,i=t.to;e.setState({from:n,to:i,datetime:_(n,i)})},e.onShortcutClick=function(t){var n,i;e.setState({opened:!1}),null===(n=(i=e.props).onShortcut)||void 0===n||n.call(i,t,t)},e.onTopShortcutClick=function(t){var n,i;null===(n=(i=e.props).onShortcut)||void 0===n||n.call(i,t,t)},e.renderTopShortcuts=function(t){var n=e.props.shortcut;return t.time===T?e.renderCustomShortcut():(0,C.jsx)(z,(0,i.A)((0,i.A)({},t),{},{checked:n===t.time,className:N("hot"),onClick:e.onTopShortcutClick}),t.time)},e}return(0,l.A)(t,e),(0,r.A)(t,[{key:"componentDidUpdate",value:function(){var e;this.state.opened&&this._inputRef.current&&(null===(e=this._inputRef.current)||void 0===e||e.focus())}},{key:"renderOpenedPicker",value:function(){var e=this.state.datetime;return(0,C.jsxs)(c.Fragment,{children:[this.renderClosedPicker(),(0,C.jsx)(A,{ref:this._inputRef,size:"l",text:e,autoselect:!0,onUpdate:this.onInputChange,onDone:this.onInputDone,onCancel:m()})]})}},{key:"renderClosedPicker",value:function(){var e=this.props,t=e.from,n=e.to;return(0,C.jsxs)("div",{className:N("date-text"),children:[(0,C.jsx)(u.I,{data:k,width:36,className:N("icon")}),(0,C.jsx)("div",{className:N("text"),children:(0,y.vy)(t,n)})]})}},{key:"renderShortcuts",value:function(){var e=this,t=this.props,n=t.shortcut,o=t.shortcuts,s=void 0===o?[]:o;return(0,C.jsx)("div",{className:N("shortcut-pane"),children:s.map((function(t,o){return(0,C.jsx)("div",{className:N("shortcut-group"),children:t.map((function(t){return(0,C.jsx)(z,(0,i.A)((0,i.A)({},t),{},{size:"m",checked:n===t.time,className:N("shortcut"),onClick:e.onShortcutClick}),t.time)}))},o)}))})}},{key:"renderCustomShortcut",value:function(){var e=this.props,t=e.from,n=e.to,i=e.shortcut===T,o=this.state.customInput;return(0,C.jsx)("div",{className:N("hot-custom"),children:o?(0,C.jsx)(A,{autoFocus:!0,placeholder:"6h",onCancel:this.onCustomCancel,onDone:this.onCustomDone}):(0,C.jsx)(z,{checked:i,onClick:this.onCustomClick,title:i?(0,y.pG)(t,n):j("label_custom"),width:"max"})},"custom")}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.from,i=e.to,o=e.topShortcuts,s=e.hasDatePicker,r=this.state.opened,a=r?this.renderOpenedPicker():this.renderClosedPicker();return(0,C.jsxs)("div",{className:N(null,t),children:[(0,C.jsx)("div",{className:N("hot-buttons",{divider:s}),children:null==o?void 0:o.map(this.renderTopShortcuts)}),s&&(0,C.jsxs)(c.Fragment,{children:[(0,C.jsx)("div",{ref:this._datepickerRef,className:N("datepicker",{opened:r}),onClick:this.onOpenPickerClick,children:a}),(0,C.jsx)(p.z,{anchorRef:this._datepickerRef,open:r,onClose:this.onPopupClose,children:(0,C.jsxs)("div",{className:N("shortcuts"),children:[(0,C.jsx)("div",{className:N("range-datepicker"),children:(0,C.jsx)(R,{from:n,to:i,onRangeChange:this.onRangeChange,onFromChange:this.onFromChange,onToChange:this.onToChange})}),(0,C.jsxs)("div",{className:N("shortcuts-title"),children:[j("label_shortcut-list"),":"]}),this.renderShortcuts()]})})]})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.from,i=e.to;return t.prevFrom===n&&t.prevTo===i?t:{from:n,to:i,prevFrom:n,prevTo:i,datetime:_(n,i)}}}])}(c.Component);M.defaultProps={shortcuts:[],topShortcuts:[]}},20145:(e,t,n)=>{n.d(t,{D2:()=>r,dR:()=>o.dR,vy:()=>o.vy,wn:()=>i.w});var i=n(16034),o=n(24297);function s(e,t){return{time:e,title:t||e}}var r=[[s("4h"),s("8h"),s("12h"),s("24h")],[s("2d"),s("7d","Week"),s("2w","2 Weeks")],[s("1M","Month"),s("2M","2 Months")]]},24297:(e,t,n)=>{n.d(t,{LA:()=>v,SK:()=>g,dR:()=>x,fU:()=>p,pG:()=>h,vy:()=>u,zJ:()=>m});var i=n(9736),o=n(41655),s=n.n(o),r=36e5,a=24*r,l=7*a,c=30*a,d=365*a,h=function(e,t){var n=t-e;if(n>=d){var i=Math.floor(n/d),o=Math.floor(n%d/c);return 0===o||i>4?"".concat(i,"y"):"".concat(i,"y ").concat(o,"mo")}if(n>=c){var s=Math.floor(n/c),h=Math.floor(n%c/a);return 0===h||s>4?"".concat(s,"mo"):"".concat(s,"mo ").concat(h,"d")}if(n>=l){var u=Math.floor(n/l),p=Math.floor(n%l/a);return 0===p||u>3?"".concat(u,"w"):"".concat(u,"w ").concat(p,"d")}if(n>=a){var v=Math.floor(n/a),m=Math.floor(n%a/r);return 0===m||v>4?"".concat(v,"d"):"".concat(v,"d ").concat(m,"h")}if(n>=r){var f=Math.floor(n/r),g=Math.floor(n%r/6e4);return 0===g||f>6?"".concat(f,"h"):"".concat(f,"h ").concat(g,"m")}var x=Math.round(n/6e4);return"".concat(x,"m")},u=function(e,t){var n=s()(e),i=s()(t);return i.isSame(n,"d")?"".concat(n.format("YYYY-MM-DD  HH:mm"),"  —  ").concat(i.format("HH:mm")):"".concat(n.format("YYYY-MM-DD  HH:mm"),"  —  ").concat(i.format("YYYY-MM-DD  HH:mm"))},p=function(e){return s()(e).format("HH:mm")},v=function(e){return s()(e).format("YYYY-MM-DD HH:mm")},m=function(e){return s()(e).valueOf()},f={mo:"M"},g=function(e){var t=Date.now(),n=function(e,t){for(var n=s()(t),o=/(-?\d+)([a-zA-Z]+)/g;;){var r=o.exec(e);if(!r)break;var a=(0,i.A)(r,3),l=a[1],c=a[2],d=f[c]||c;n.subtract(l,d)}return n.valueOf()}(e,t);return t<n?{from:t,to:n}:{from:n,to:t}};function x(e){if(e){var t=e.from,n=e.to,i=e.shortcutValue;return i?g(i):{from:t,to:n}}}},24642:(e,t,n)=>{n.d(t,{I:()=>a});var i=n(64922),o=n(51036),s=n(32235);const r=(0,n(21086).om)("arrow-toggle");function a({size:e=16,direction:t="bottom",className:n,qa:a}){return(0,i.jsx)("span",{style:{width:e,height:e},className:r({direction:t},n),"data-qa":a,children:(0,i.jsx)(s.I,{data:o.A,size:e})})}},27241:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(77810);const o=e=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06",clipRule:"evenodd"}))},46747:(e,t,n)=>{n.d(t,{J:()=>u});var i=n(64922),o=n(77810),s=n(72890),r=n(11415),a=n(48382),l=n(32235),c=n(21086);const d=(0,c.om)("label"),h={xs:{copyIconSize:12,closeIconSize:12},s:{copyIconSize:14,closeIconSize:14},m:{copyIconSize:16,closeIconSize:16}},u=o.forwardRef((function(e,t){const{type:n="default",theme:c="normal",size:u="xs",title:p,icon:v,children:m,onCloseClick:f,className:g,disabled:x,copyText:w,closeButtonLabel:j,copyButtonLabel:y,interactive:b=!1,value:C,onCopy:A,onClick:S,qa:R}=e,k=Boolean(""!==m&&o.Children.count(m)>0),N="close"===n&&k,T="copy"===n&&k,z="function"==typeof S,_=Boolean(T&&w),M=(z||_||b)&&!x,{copyIconSize:E,closeIconSize:O}=h[u],H=v&&(0,i.jsx)("div",{className:d("addon",{side:k?"start":void 0,type:"icon"}),children:v}),I=k&&(0,i.jsxs)("div",{className:d("text"),children:[(0,i.jsx)("div",{className:d("content"),children:m}),Boolean(C)&&(0,i.jsxs)("div",{className:d("value"),children:[(0,i.jsx)("div",{className:d("separator"),children:":"}),(0,i.jsx)("div",{className:d("key"),children:C})]})]}),D=e=>{let n;return T?n=(0,i.jsx)("button",{type:"button","aria-label":y||void 0,onClick:z?S:void 0,disabled:x,className:d("addon",{side:"end",type:"button"}),"data-qa":"copy-button",children:(0,i.jsx)(r.u,{status:e||"pending",size:E})}):N&&(n=(0,i.jsx)("button",{type:"button",onClick:f,"aria-label":j||void 0,disabled:x,className:d("addon",{side:"end",type:"button"}),"data-qa":"close-button",children:(0,i.jsx)(l.I,{size:O,data:s.A})})),(0,i.jsxs)("div",{ref:t,className:d({theme:c,size:u,interactive:M,disabled:x},g),title:p,"data-qa":R,children:[H,z?(0,i.jsx)("button",{disabled:x,type:"button",onClick:S,className:d("main-button"),"data-qa":"main-button",children:I}):I,n]})};return _&&w&&!z?(0,i.jsx)(a.$,{text:w,onCopy:A,timeout:1e3,children:e=>D(e)}):D()}))},50823:(e,t,n)=>{function i(e){return e.displayName||e.name||"Component"}n.d(t,{x:()=>i})},51036:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(77810);const o=e=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06",clipRule:"evenodd"}))},53302:(e,t,n)=>{n.d(t,{A:()=>l}),n(77810);var i=n(76872),o=n(73822),s=n(88787),r=n(64922),a=(0,i.A)("status-label");function l(e){var t=e.className,n=e.label,i=e.renderPlaque,l=e.text,c=e.state,d=e.iconState,h=e.hideIcon,u=function(e){var t;return null!==(t={materializing:"preparing",initializing:"preparing",preparing:"preparing",pending:"preparing",starting:"preparing",waiting:"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!=d?d:u),v={state:null!=c?c:u};return n||l||c?(0,r.jsxs)("span",{className:a(null,i?a("plaque",v,t):a(v,t)),children:[!h&&(0,r.jsx)(s.A,{awesome:p}),(0,r.jsx)("span",{children:null!=l?l:o.A.format.ReadableField(n)})]}):(0,r.jsx)("span",{})}},82837:(e,t,n)=>{n.d(t,{c:()=>g});var i=n(64922),o=n(77810),s=n(13032),r=n(84203),a=n(56911),l=n(76441),c=n(50823),d=n(8477);const h=(0,n(21086).om)("sheet");class u{constructor(e,t){this.x=e,this.y=t,this.timeStamp=Date.now()}}class p{constructor(e=5){this.points=[],this.pointsLen=e,this.clear()}clear(){this.points=new Array(this.pointsLen)}addMovement({x:e,y:t}){this.points.pop(),this.points.unshift(new u(e,t))}getYAcceleration(e=1){const t=this.points[0],n=this.points[e];return t&&n?(t.y-n.y)/Math.pow(t.timeStamp-n.timeStamp,2):0}}let v=[];class m extends o.Component{constructor(){super(...arguments),this.veilRef=o.createRef(),this.sheetRef=o.createRef(),this.sheetTopRef=o.createRef(),this.sheetContentBoxRef=o.createRef(),this.sheetScrollContainerRef=o.createRef(),this.velocityTracker=new p,this.observer=null,this.resizeWindowTimer=null,this.state={startScrollTop:0,startY:0,deltaY:0,prevSheetHeight:0,swipeAreaTouched:!1,contentTouched:!1,veilTouched:!1,isAnimating:!1,inWindowResizeScope:!1,delayedResize:!1},this.setStyles=({status:e,deltaHeight:t=0})=>{if(!this.sheetRef.current||!this.veilRef.current)return;const n=this.sheetHeight-t,i="showing"===e?`translate3d(0, -${n}px, 0)`:"translate3d(0, 0, 0)";let o=0;"showing"===e&&(o=0===t?1:n/this.sheetHeight),this.veilRef.current.style.opacity=String(o),this.sheetRef.current.style.transform=i},this.getAvailableContentHeight=e=>{const t=.9*window.innerHeight-this.sheetTopHeight;return e>=t?t:e},this.show=()=>{this.setState({isAnimating:!0},(()=>{this.setStyles({status:"showing"}),this.setHash()}))},this.hide=()=>{this.setState({isAnimating:!0},(()=>{this.setStyles({status:"hiding"}),this.removeHash()}))},this.onSwipeAreaTouchStart=e=>{this.velocityTracker.clear(),this.setState({startY:e.nativeEvent.touches[0].clientY,swipeAreaTouched:!0})},this.onContentTouchStart=e=>{this.props.allowHideOnContentScroll&&!this.state.swipeAreaTouched&&(this.velocityTracker.clear(),this.setState({startY:e.nativeEvent.touches[0].clientY,startScrollTop:this.sheetScrollTop,contentTouched:!0}))},this.onSwipeAriaTouchMove=e=>{const t=e.nativeEvent.touches[0].clientY-this.state.startY;this.velocityTracker.addMovement({x:e.nativeEvent.touches[0].clientX,y:e.nativeEvent.touches[0].clientY}),this.setState({deltaY:t}),t<=0||this.setStyles({status:"showing",deltaHeight:t})},this.onContentTouchMove=e=>{if(!this.props.allowHideOnContentScroll)return;if(!this.state.startY)return void this.onContentTouchStart(e);const{startScrollTop:t,swipeAreaTouched:n}=this.state;if(n||this.sheetScrollTop>0||t>0&&t!==this.sheetScrollTop)return;const i=e.nativeEvent.touches[0].clientY-this.state.startY;this.velocityTracker.addMovement({x:e.nativeEvent.touches[0].clientX,y:e.nativeEvent.touches[0].clientY}),i<=0?this.setState({deltaY:0}):(this.setState({deltaY:i}),this.setStyles({status:"showing",deltaHeight:i}))},this.onTouchEndAction=e=>{const t=this.velocityTracker.getYAcceleration();this.sheetHeight<=e?this.props.hideSheet():e>50&&t<=.08&&t>=-.02||t>.08?this.hide():0!==e&&this.show()},this.onSwipeAriaTouchEnd=()=>{const{deltaY:e}=this.state;this.onTouchEndAction(e),this.setState({startY:0,deltaY:0,swipeAreaTouched:!1})},this.onContentTouchEnd=()=>{const{deltaY:e,swipeAreaTouched:t}=this.state;this.props.allowHideOnContentScroll&&!t&&(this.onTouchEndAction(e),this.setState({startY:0,deltaY:0,contentTouched:!1}))},this.onVeilClick=()=>{this.setState({veilTouched:!0}),this.hide()},this.onVeilTransitionEnd=()=>{this.setState({isAnimating:!1}),"0"!==this.veilOpacity?this.state.delayedResize&&(this.onResizeWindow(),this.setState({delayedResize:!1})):this.props.hideSheet()},this.onContentTransitionEnd=e=>{"height"===e.propertyName&&this.sheetScrollContainerRef.current&&(this.sheetScrollContainerRef.current.style.transition="none")},this.onResizeWindow=()=>{this.state.isAnimating?this.setState({delayedResize:!0}):(this.setState({inWindowResizeScope:!0}),this.resizeWindowTimer&&window.clearTimeout(this.resizeWindowTimer),this.resizeWindowTimer=window.setTimeout((()=>{this.onResize()}),50))},this.onResize=()=>{if(!this.sheetRef.current||!this.sheetScrollContainerRef.current)return;const e=this.sheetContentHeight;if(e===this.state.prevSheetHeight&&!this.state.inWindowResizeScope)return;const t=this.getAvailableContentHeight(e);this.sheetScrollContainerRef.current.style.transition=this.state.prevSheetHeight>e?"height 0s ease 0.3s":"none",this.sheetScrollContainerRef.current.style.height=`${t}px`,this.sheetRef.current.style.transform=`translate3d(0, -${t+this.sheetTopHeight}px, 0)`,this.setState({prevSheetHeight:e,inWindowResizeScope:!1})}}componentDidMount(){this.addListeners(),this.show();const e=this.getAvailableContentHeight(this.sheetContentHeight);this.setInitialStyles(e),this.setState({prevSheetHeight:e})}componentDidUpdate(e){const{visible:t,location:n}=this.props;!e.visible&&t&&this.show(),(e.visible&&!t||this.shouldClose(e))&&this.hide(),e.location.pathname!==n.pathname&&(v=[])}componentWillUnmount(){this.removeListeners()}render(){const{content:e,contentClassName:t,swipeAreaClassName:n,hideTopBar:s,title:r}=this.props,{deltaY:a,swipeAreaTouched:l,contentTouched:c,veilTouched:d,isAnimating:u}=this.state,p={"with-transition":!a||d},v={"with-transition":p["with-transition"]},m={"without-scroll":a>0&&c||l};return(0,i.jsxs)(o.Fragment,{children:[(0,i.jsx)("div",{ref:this.veilRef,className:h("veil",p),onClick:u?void 0:this.onVeilClick,onTransitionEnd:this.onVeilTransitionEnd,role:"presentation"}),(0,i.jsxs)("div",{ref:this.sheetRef,className:h("sheet",v),role:"dialog","aria-modal":"true","aria-label":r,children:[!s&&(0,i.jsx)("div",{ref:this.sheetTopRef,className:h("sheet-top"),children:(0,i.jsx)("div",{className:h("sheet-top-resizer")})}),(0,i.jsx)("div",{className:h("sheet-swipe-area",n),onTouchStart:this.onSwipeAreaTouchStart,onTouchMove:this.onSwipeAriaTouchMove,onTouchEnd:this.onSwipeAriaTouchEnd}),(0,i.jsx)("div",{ref:this.sheetScrollContainerRef,className:h("sheet-scroll-container",m),onTouchStart:this.onContentTouchStart,onTouchMove:this.onContentTouchMove,onTouchEnd:this.onContentTouchEnd,onTransitionEnd:this.onContentTransitionEnd,children:(0,i.jsx)("div",{ref:this.sheetContentBoxRef,className:h("sheet-content-box"),children:(0,i.jsx)("div",{className:h("sheet-content-box-border-compensation"),children:(0,i.jsxs)("div",{className:h("sheet-content",t),children:[r&&(0,i.jsx)("div",{className:h("sheet-content-title"),children:r}),(0,i.jsx)("div",{children:e})]})})})})]})]})}get veilOpacity(){var e;return(null===(e=this.veilRef.current)||void 0===e?void 0:e.style.opacity)||0}get sheetTopHeight(){var e;return(null===(e=this.sheetTopRef.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0}get sheetHeight(){var e;return(null===(e=this.sheetRef.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0}get sheetScrollTop(){var e;return(null===(e=this.sheetScrollContainerRef.current)||void 0===e?void 0:e.scrollTop)||0}get sheetContentHeight(){var e;return(null===(e=this.sheetContentBoxRef.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0}setInitialStyles(e){this.sheetScrollContainerRef.current&&this.sheetContentBoxRef.current&&(this.sheetScrollContainerRef.current.style.height=`${e}px`)}addListeners(){window.addEventListener("resize",this.onResizeWindow),this.sheetContentBoxRef.current&&(this.observer=new ResizeObserver((()=>{this.state.inWindowResizeScope||this.onResize()})),this.observer.observe(this.sheetContentBoxRef.current))}removeListeners(){window.removeEventListener("resize",this.onResizeWindow),this.observer&&this.observer.disconnect()}setHash(){const{id:e,platform:t,location:n,history:i}=this.props;if(t===l.O.BROWSER)return;const o=Object.assign(Object.assign({},n),{hash:e});switch(t){case l.O.IOS:n.hash&&v.push(n.hash),i.replace(o);break;case l.O.ANDROID:i.push(o)}}removeHash(){var e;const{id:t,platform:n,location:i,history:o}=this.props;if(n!==l.O.BROWSER&&i.hash===`#${t}`)switch(n){case l.O.IOS:o.replace(Object.assign(Object.assign({},i),{hash:null!==(e=v.pop())&&void 0!==e?e:""}));break;case l.O.ANDROID:o.goBack()}}shouldClose(e){const{id:t,platform:n,location:i,history:o}=this.props;return n!==l.O.BROWSER&&"POP"===o.action&&e.location.hash!==i.hash&&i.hash!==`#${t}`}}m.defaultProps={id:"sheet",allowHideOnContentScroll:!0};const f=function(e){var t;const n=(0,c.x)(e);return(t=class extends o.Component{render(){return(0,i.jsx)(e,Object.assign({},this.props,{mobile:this.context.mobile,platform:this.context.platform,useHistory:this.context.useHistory,useLocation:this.context.useLocation}))}}).displayName=`withMobile(${n})`,t.contextType=d.G,t}(function(e){const t=t=>{const{useHistory:n,useLocation:o}=t,s=(0,a.Tt)(t,["useHistory","useLocation"]);return(0,i.jsx)(e,Object.assign({},s,{history:n(),location:o()}))},n=e.displayName||e.name||"Component";return t.displayName=`withRouterWrapper(${n})`,t}(m)),g=({children:e,onClose:t,visible:n,id:a,title:l,className:c,contentClassName:d,swipeAreaClassName:u,allowHideOnContentScroll:p,hideTopBar:v,qa:m})=>{const[g,x]=o.useState(n),[w,j]=o.useState(n);return(0,s.y)({enabled:g}),!w&&n&&x(!0),n!==w&&j(n),g?(0,i.jsx)(r.Z,{children:(0,i.jsx)("div",{"data-qa":m,className:h(null,c),children:(0,i.jsx)(f,{id:a,content:e,contentClassName:d,swipeAreaClassName:u,title:l,visible:n,allowHideOnContentScroll:p,hideTopBar:v,hideSheet:()=>{t&&t(),x(!1)}})})}):null}},84099:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(56911),o=n(64922),s=n(77810),r=n(3564),a=n(99992);const l=(0,n(21086).om)("card"),c=s.forwardRef((function(e,t){const{type:n="container",theme:s,view:c,size:d="m",children:h,className:u,onClick:p,disabled:v,selected:m}=e,f=(0,i.Tt)(e,["type","theme","view","size","children","className","onClick","disabled","selected"]),g="selection"===n,x="container"===n,w=("action"===n||g)&&Boolean(p)&&!v,j=x?"normal":void 0,y=x||g?"outlined":void 0,b=w?p:void 0,{onKeyDown:C}=(0,r.N)(p);return(0,o.jsx)(a.a,Object.assign({ref:t,role:w?"button":void 0,className:l({theme:s||j,view:c||y,type:n,selected:m,size:d,disabled:v,clickable:w},u),onClick:b,onKeyDown:w?C:void 0,tabIndex:w?0:void 0},f,{children:h}))}))},88822:(e,t,n)=>{n.r(t),n.d(t,{IncarnationsTemplate:()=>ke,default:()=>Re});var i=n(40319),o=n(77810),s=n(15647),r=n(76872),a=n(70243),l=n(5865),c=n(84099),d=n(64922),h=n(58906),u=n(2320);const p=o.createContext(void 0),v=o.createContext(void 0);function m(e){const{size:t,disabled:n,defaultExpanded:i,arrowPosition:s,summary:r,keepMounted:a,onUpdate:l,expanded:c}=e,[h,m]=o.useState((()=>Boolean(i))),f=void 0!==c,g=(0,u.u)(),x=`disclosure${g}`;return(0,d.jsx)(p.Provider,{value:{size:t,disabled:n,summary:r,arrowPosition:s,keepMounted:a,expanded:f?c:h,ariaControls:g,ariaLabelledby:x},children:(0,d.jsx)(v.Provider,{value:()=>{m((e=>!e)),l(f?!c:!h)},children:e.children})})}function f(){const e=o.useContext(p);if(void 0===e)throw new Error("useDisclosureAttributes must be used within DisclosureProvider");return e}var g=n(31053),x=n(51024);const w=(0,n(21086).om)("disclosure"),j={SUMMARY:"disclosure-summary",DETAILS:"disclosure-details"};function y({children:e}){const t=o.useRef(null),{ariaControls:n,ariaLabelledby:i,keepMounted:s,expanded:r}=f();return(0,d.jsx)(g.A,{nodeRef:t,in:r,addEndListener:e=>{var n;return null===(n=t.current)||void 0===n?void 0:n.addEventListener("animationend",e)},classNames:(0,x.L)(w),mountOnEnter:!s,unmountOnExit:!s,appear:!0,children:(0,d.jsx)("div",{ref:t,id:n,role:"region","aria-labelledby":i,className:w("content",{visible:r}),"data-qa":j.DETAILS,children:e})})}y.displayName="DisclosureDetails";var b=n(24642),C=n(82835);const A={m:14,l:16,xl:20};function S(){(0,C.m)('[Disclosure] Physical values (left, right) of "arrowPosition" property are deprecated. Use logical values (start, end) instead.')}function R({children:e}){const t=function(){const e=o.useContext(v);if(void 0===e)throw new Error("useToggleDisclosure must be used within DisclosureProvider");return e}(),{ariaControls:n,ariaLabelledby:i,expanded:s,disabled:r}=f(),a={onClick:t,ariaControls:n,id:i,expanded:s,disabled:r};return e(a,(0,d.jsx)(k,Object.assign({},a)))}function k({onClick:e,ariaControls:t,id:n,expanded:i,disabled:o}){const{size:s,summary:r,arrowPosition:a}=f();let l=a;return"left"===l&&(S(),l="start"),"right"===l&&(S(),l="end"),(0,d.jsxs)("button",{type:"button","aria-expanded":i,className:w("trigger",{disabled:o,arrow:l}),"aria-controls":t,id:n,onClick:e,disabled:o,"data-qa":j.SUMMARY,children:[(0,d.jsx)(b.I,{size:A[s],direction:i?"top":"bottom"}),r]})}R.displayName="DisclosureSummary";const N=(0,h.g)(R),T=o.forwardRef((function(e,t){const{size:n="m",disabled:i=!1,defaultExpanded:s=!1,arrowPosition:r="start",summary:a="",className:l,keepMounted:c=!0,children:h,onUpdate:u=(()=>{}),expanded:p,qa:v}=e,[f,g]=function(e){const t=o.Children.toArray(e);let n,i;const s=[];for(const e of t)if(N(e)){if(n)throw new Error("Only one <Disclosure.Summary> component is allowed");n=e}else s.push(e);return s.length>0&&(i=(0,d.jsx)(y,{children:s})),n||(n=(0,d.jsx)(R,{children:e=>(0,d.jsx)(k,Object.assign({},e))})),[n,i]}(h);return(0,d.jsx)(m,{disabled:i,defaultExpanded:s,expanded:p,keepMounted:c,size:n,summary:a,arrowPosition:r,onUpdate:u,children:(0,d.jsxs)("section",{ref:t,className:w({size:n},l),"data-qa":v,children:[f,g]})})}));T.Summary=R,T.displayName="Disclosure";var z=n(11687),_=n(26116),M=n(18472),E=n(64772),O=n(97846),H=n(53263),I=n(20145),D=n(48553);function Y(e,t,n){return["job_aborted","job_failed","job_interrupted"].includes(String(null==e?void 0:e.incarnation_switch_reason))&&null!=e&&e.incarnation_switch_reason?e.incarnation_switch_reason:"job_lack_after_revival"!==(null==e?void 0:e.incarnation_switch_reason)&&n?"operation_".concat(t.state):"system"}function L(e){if(e.startsWith("job")){var t=e.split("_")[1];return"interrupted"===t?"suspended":t}return"system"===e?"unknown":e.startsWith("operation")?e.split("_")[1]:e.toLowerCase()}function B(e,t){return e&&t?(0,I.vy)(e,t):e?E.A.DateTime(e):E.A.NO_VALUE}var P=(0,M.Mz)([D.eu,O.mh,O.M5,H.EM],(function(e,t,n,i){var o,s=[],r=i.isLoading,a=i.error;if(!t)return{incarnations:s,isLoading:r,error:a};for(var l=0;l<t.length;l++){var c,d,h,u=t[l],p=null==t?void 0:t[l+1],v=null==p?void 0:p.timestamp,m=null==p||null===(c=p.incarnation_switch_info)||void 0===c?void 0:c.trigger_job_id,f=null==p?void 0:p.incarnation_switch_reason,g=null==p?void 0:p.incarnation_switch_info,x=Y(p,e,l===t.length-1),w=u.timestamp,j=null!==(d=null!=v?v:null==e?void 0:e.finishTime)&&void 0!==d?d:null===(h=(0,_.bQ)("now"))||void 0===h?void 0:h.format("YYYY-MM-DDTHH:mm:ssZ"),y={id:u.incarnation,interval:B(w,j),trigger_job_id:m,switch_reason:f,finish_reason:E.A.ReadableField(x),finish_status:L(x),switch_info:g};s.push(y)}return n&&(s=s.filter((function(e){return e.id.startsWith(n)})).reverse()),{incarnations:null===(o=s)||void 0===o?void 0:o.reverse(),count:null==t?void 0:t.length,isLoading:r,error:a}})),W=n(8208),F=n(46747),U=n(89648),q=n(19314),V=n(52797),$=n(7313),J=n(42321),K=n(76426),Z=n(16727),G=n(92611);const X=JSON.parse('{"alert_no-incarnations":"No incarnations to show","trigger-job-info":"Trigger job info","no-info-to-display":"No info to display","id":"Id","abort-reason":"Abort reason","interruption-reason":"Interruption reason","error":"Error","all":"All","placeholder_incarnation-id":"Incarnation id...","jobs":"Jobs","incarnation-info":"Incarnation info"}'),Q=JSON.parse('{"alert_no-incarnations":"Нет инкарнаций для отображения","trigger-job-info":"Информация о запустившей задаче","no-info-to-display":"Нет информации для отображения","id":"Идентификатор","abort-reason":"Причина прерывания","interruption-reason":"Причина остановки","error":"Ошибка","all":"Все","placeholder_incarnation-id":"Идентификатор инкарнации...","jobs":"Задачи","incarnation-info":"Информация об инкарнации"}'),ee=(0,G.Kc)("yt:incarnations",{en:X,ru:Q});function te(e){var t=e.incarnation,n=(0,s.wA)(),i=(0,s.d4)(V.dB),o=(0,s.d4)(D.eu),r=t.switch_info,l=[{key:"trigger_job_id",value:(0,d.jsx)(K.A,{routed:!0,url:"/".concat(i,"/").concat(q.YW.JOB,"/").concat(o.id,"/").concat(t.trigger_job_id),children:t.trigger_job_id}),label:ee("id"),visible:Boolean(null==t?void 0:t.trigger_job_id)},{key:"abort_reason",value:(0,d.jsx)(F.J,{theme:"unknown",children:E.A.ReadableField(String(null==r?void 0:r.abort_reason))}),label:ee("abort-reason"),visible:Boolean(null==r?void 0:r.abort_reason)},{key:"interruption_reason",value:(0,d.jsx)(F.J,{theme:"unknown",children:E.A.ReadableField(String(null==r?void 0:r.interruption_reason))}),label:ee("interruption-reason"),visible:Boolean(null==r?void 0:r.interruption_reason)},{key:"error",value:(0,d.jsx)(Z.Bj.Error,{error:null==r?void 0:r.trigger_job_error,onClick:function(){return n((0,$.Hm)(null==r?void 0:r.trigger_job_error))}}),label:ee("error"),visible:Boolean(null==r?void 0:r.trigger_job_error)}];return(0,d.jsxs)(a.s,{gap:1,direction:"column",width:"40%",children:[(0,d.jsx)(U.E,{variant:"subheader-2",children:ee("trigger-job-info")}),(0,d.jsx)(J.Ay,{items:l}),!l.some((function(e){return e.visible}))&&(0,d.jsxs)(U.E,{variant:"inherit",children:[" ",ee("no-info-to-display")]})]})}var ne=n(20410),ie=n(93026),oe=n(53302),se=n(97536),re=n(18801),ae=n(6542),le=n(32235),ce=n(27241),de=n(51036),he=["incarnationId"],ue=(0,r.A)("incarnation-button");function pe(e){var t=e.incarnationId,n=(0,re.A)(e,he);return(0,d.jsx)(ae.$,(0,i.A)((0,i.A)({},n),{},{view:"flat",width:"max",className:ue(),children:(0,d.jsxs)(a.s,{alignItems:"center",gap:2,style:{height:"100%"},children:[(0,d.jsx)(U.E,{variant:"subheader-2",children:t}),(0,d.jsx)(le.I,{data:e.expanded?ce.A:de.A,size:"16"})]})}))}function ve(e){var t=e.incarnation,n=(0,s.wA)(),o=(0,s.d4)(V.dB),r=(0,s.d4)(D.eu);return(0,d.jsxs)(a.s,{justifyContent:"space-between",style:{overflow:"hidden"},children:[(0,d.jsxs)(a.s,{direction:"row",gap:2,alignItems:"center",children:[(0,d.jsx)(pe,(0,i.A)({incarnationId:t.id},e)),(0,d.jsx)(ne.b,{text:t.id}),(0,d.jsx)(K.A,{routed:!0,target:"_blank",url:"/".concat(o,"/").concat(q.YW.OPERATIONS,"/").concat(r.id,"/jobs?state=all&incarnation=").concat(t.id),children:(0,d.jsxs)(a.s,{alignItems:"center",gap:1,children:[ee("jobs"),(0,d.jsx)(ie.A,{})]})})]}),(0,d.jsxs)(a.s,{direction:"row",gap:4,alignItems:"center",children:[(0,d.jsx)(oe.A,{text:t.finish_reason,state:t.finish_status,hideIcon:!0,renderPlaque:!0}),(0,d.jsx)(U.E,{whiteSpace:"nowrap",variant:"inherit",ellipsis:!0,children:t.interval}),(0,d.jsx)(se.A,{onClick:function(){return n((0,O.TE)({infoDialog:{incarnation:t,visible:!0}}))}})]})]})}var me=n(24893);function fe(){return(0,d.jsx)(ge,{})}function ge(e){var t=e.renderAdditionalFilters,n=(0,s.wA)(),i=(0,s.d4)(O.M5);return(0,d.jsxs)(a.s,{direction:"row",gap:2,alignItems:"center",width:800,children:[(0,d.jsx)(me.k,{placeholder:ee("placeholder_incarnation-id"),value:i,onUpdate:function(e){n((0,O.CI)({idFilter:e}))}}),t]})}var xe=n(9128);function we(){var e=(0,s.d4)(P).count;return(0,d.jsx)(je,{items:[{type:ee("all"),count:e||0}]})}function je(e){var t=e.items;return(0,d.jsx)(xe.V,{hideAll:!0,items:t})}var ye=n(39055),be=n(78519),Ce=(0,r.A)("incarnation-info-dialog");function Ae(){var e,t,n=(0,s.wA)(),i=(0,s.d4)(O.RY),o=null==i||null===(e=i.incarnation)||void 0===e?void 0:e.switch_info,r=null==i||null===(t=i.incarnation)||void 0===t?void 0:t.switch_reason,a={};return o&&(a.incarnation_switch_info=o),r&&(a.incarnation_switch_reason=r),(0,d.jsxs)(ye.K,{size:"m",open:Boolean(null==i?void 0:i.visible),onClose:function(){n((0,O.TE)({infoDialog:{incarnation:(null==i?void 0:i.incarnation)||null,visible:!1}}))},children:[(0,d.jsx)(ye.K.Header,{caption:ee("incarnation-info")}),(0,d.jsx)(ye.K.Body,{children:(0,d.jsx)(be.A,{className:Ce("details"),settings:{format:"json"},value:null!=a?a:{}})})]})}var Se=(0,r.A)("incarnations");function Re(){var e=(0,s.d4)(P),t=e.incarnations,n=e.error,i=e.isLoading;return(0,d.jsx)(ke,{incarnations:t,isLoading:i,error:n,incarnationsCount:(0,d.jsx)(we,{}),incarnationsToolbar:(0,d.jsx)(fe,{})})}function ke(e){var t=e.incarnations,n=e.isLoading,o=e.error,s=e.incarnationsCount,r=e.incarnationsToolbar,h=e.incarnationsAlert,u=e.renderTelemetryInfo;return o?(0,d.jsx)(W.z,{error:o}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(a.s,{direction:"column",gap:2,children:[r,s,n?(0,d.jsx)(a.s,{justifyContent:"center",alignItems:"center",children:(0,d.jsx)(l.a,{})}):(0,d.jsxs)(d.Fragment,{children:[" ",h,null!=t&&t.length?t.map((function(e){return(0,d.jsx)(c.Z,{view:"outlined",className:Se("incarnation"),children:(0,d.jsxs)(T,{keepMounted:!1,children:[(0,d.jsx)(T.Summary,{children:function(t){return(0,d.jsx)(ve,(0,i.A)({incarnation:e},t))}}),(0,d.jsxs)(a.s,{direction:"row",className:Se("incarnation-info"),children:[(0,d.jsx)(te,{incarnation:e}),null==u?void 0:u(e.id)]})]})},e.id)})):(0,d.jsx)(z.F,{theme:"info",message:ee("alert_no-incarnations")})]})]}),(0,d.jsx)(Ae,{})]})}},93026:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(77810);const o=e=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 1.5A.75.75 0 0 0 10 3h1.94L6.97 7.97a.75.75 0 0 0 1.06 1.06L13 4.06V6a.75.75 0 0 0 1.5 0V2.25a.75.75 0 0 0-.75-.75zM7.5 3.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9.25a.75.75 0 0 0-1.5 0v2.25a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 3 11.5v-6A1.5 1.5 0 0 1 4.5 4h2.25a.75.75 0 0 0 .75-.75",clipRule:"evenodd"}))},97536:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(40319),o=n(18801),s=(n(77810),n(58299)),r=n(88787),a=n(64922),l=["view","size"];function c(e){var t=e.view,n=void 0===t?"flat-secondary":t,c=e.size,d=void 0===c?"m":c,h=(0,o.A)(e,l);return(0,a.jsx)(s.A,(0,i.A)((0,i.A)({view:n,size:d},h),{},{children:(0,a.jsx)(r.A,{awesome:"at"})}))}}}]);
2
- //# sourceMappingURL=incarnations.db35d3e7.chunk.js.map
1
+ "use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[2856],{9128:(e,t,n)=>{n.d(t,{V:()=>b}),n(77810);var i=n(76872),o=n(27528),s=n.n(o),r=n(65675),a=n.n(r),l=n(75414),c=n.n(l),d=n(80648),h=n.n(d),u=n(92611);const p=JSON.parse('{"all":"All","other":"Other","selected":"Selected"}'),v=JSON.parse('{"all":"Все","other":"Другие","selected":"Выбранные"}'),m=(0,u.Kc)("yt:nodes-types",{en:p,ru:v});var f=n(64922),g=(0,i.A)("counts-list"),x=3;function w(e){return c()(e,(function(e,t){return e+t.count}),0)}function j(e){return(0,f.jsxs)("li",{className:g("item"),children:[(0,f.jsx)("span",{className:g("type"),children:e.type}),(0,f.jsx)("span",{className:g("count"),children:e.count})]},e.type)}function y(e){var t=e.selectedItems,n=e.renderActions;return null!=t&&t.length?(0,f.jsxs)("li",{className:g("item"),children:[(0,f.jsx)("span",{className:g("type"),children:m("selected")}),(0,f.jsx)("span",{className:g("count"),children:t.length}),(0,f.jsx)("span",{className:g("actions"),children:null==n?void 0:n()})]}):null}function b(e){var t,n=e.hideAll,i=e.items,o=e.selectedItems,r=e.renderActions,l=function(e){var t=a()(e,(function(e){return e.count}),"desc");return h()(t,0,x)}(i),c=w(i),d=c-w(l);return(0,f.jsxs)("ul",{className:g("list"),children:[!n&&j({type:m("all"),count:c}),(t=l,s()(t,(function(e){return j(e)}))),!n&&d>0&&j({type:m("other"),count:d}),(0,f.jsx)(y,{selectedItems:o,renderActions:r})]})}},11687:(e,t,n)=>{n.d(t,{F:()=>k});var i=n(64922),o=n(72890),s=n(6542),r=n(84099),a=n(32235),l=n(17774),c=n(40590),d=n(70243),h=n(77810);const u=h.createContext(null),p=()=>{const e=h.useContext(u);if(!e)throw new Error('Alert: `useAlertContext` hook is used out of "AlertContext"');return e},v=e=>{const{view:t}=p();return(0,i.jsx)(s.$,Object.assign({view:"filled"===t?"normal-contrast":void 0},e))};const m=(0,n(21086).om)("alert"),f=({layout:e,view:t,children:n})=>(0,i.jsx)(u.Provider,{value:{layout:e,view:t},children:n});var g=n(12663);var x=n(44315);var w=n(16822);var j=n(71182);const y={danger:{filled:e=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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:x.A},warning:{filled:e=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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:w.A},utility:{filled:e=>h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),h.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 b=n(89648),C=n(37338);const A=JSON.parse('{"label_close":"Close"}'),S=JSON.parse('{"label_close":"Закрыть"}'),R=(0,C.N)({en:A,ru:S},"Alert"),k=e=>{const{theme:t="normal",view:n="filled",layout:h="vertical",message:u,className:p,corners:v,style:g,onClose:x,align:w,qa:j}=e;return(0,i.jsx)(f,{layout:h,view:n,children:(0,i.jsx)(r.Z,{style:g,className:m({corners:v},(0,c.Y)({py:4,px:5},p)),theme:t,view:n,qa:j,children:(0,i.jsxs)(d.s,{gap:"3",alignItems:w,children:[void 0===e.icon?(0,i.jsx)(k.Icon,{theme:t,view:n}):e.icon,(0,i.jsxs)(d.s,{direction:"vertical"===h?"column":"row",gap:"5",grow:!0,children:[(0,i.jsx)(d.s,{gap:"2",grow:!0,className:m("text-content"),children:(0,i.jsxs)(d.s,{direction:"column",gap:"1",grow:!0,justifyContent:w,children:["string"==typeof e.title?(0,i.jsx)(k.Title,{text:e.title}):e.title,u]})}),Array.isArray(e.actions)?(0,i.jsx)(k.Actions,{items:e.actions}):e.actions]}),x&&(0,i.jsx)(s.$,{view:"flat",className:m("close-btn"),onClick:x,extraProps:{"aria-label":R("label_close")},children:(0,i.jsx)(a.I,{data:o.A,size:18,className:(0,l.$)({color:"secondary"})})})]})})})};k.Icon=({className:e,theme:t,view:n="filled",size:o=18})=>{const s=y[t];if(!s)return null;let r;return"success"===t?r="positive":"normal"!==t&&(r=t),(0,i.jsx)("div",{className:m("icon",(0,l.$)({color:r},e)),children:(0,i.jsx)(a.I,{data:s[n],size:o})})},k.Title=({text:e,className:t})=>(0,i.jsx)(b.E,{variant:"subheader-2",className:m("title",t),children:e}),k.Actions=({items:e,children:t,className:n})=>{const{layout:o}=p();return(0,i.jsx)(d.s,{className:m("actions",{minContent:"horizontal"===o},n),direction:"row",gap:"3",wrap:!0,alignItems:"horizontal"===o?"center":"flex-start",children:(null==e?void 0:e.map((({handler:e,text:t},n)=>(0,i.jsx)(v,{onClick:e,children:t},n))))||t})},k.Action=v},16034:(e,t,n)=>{n.d(t,{w:()=>M});var i=n(40319),o=n(9736),s=n(29121),r=n(12937),a=n(66134),l=n(10785),c=n(77810),d=n(76872),h=n(6542),u=n(32235),p=n(73384),v=n(11700),m=n.n(v),f=n(41655),g=n.n(f),x=n(92611);const w=JSON.parse('{"label_now":"Now","label_custom":"Custom","label_shortcut-list":"Show chart in"}'),j=(0,x.Kc)("yt:timeline",{en:w});var y=n(24297),b=n(24893),C=n(64922),A=function(e){function t(){var e;(0,s.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=(0,a.A)(this,t,[].concat(i))).state={},e.inputRef=c.createRef(),e.onKeyDown=function(t){switch(t.key){case"Enter":e.props.onDone(e.state.text);break;case"Escape":e.props.onCancel()}},e.onBlur=function(){e.props.onCancel()},e.onUpdate=function(t){e.setState({text:t}),e.props.onUpdate&&e.props.onUpdate(t)},e}return(0,l.A)(t,e),(0,r.A)(t,[{key:"componentDidMount",value:function(){this.props.autoselect&&(this.focus(),this.select())}},{key:"focus",value:function(){this.inputRef.current&&this.inputRef.current.focus()}},{key:"select",value:function(){this.inputRef.current&&this.inputRef.current.select()}},{key:"render",value:function(){var e=this.props,t=e.size,n=e.placeholder,i=e.autoFocus;return(0,C.jsx)(b.k,{controlRef:this.inputRef,size:t,placeholder:n,value:this.state.text,autoFocus:i,onUpdate:this.onUpdate,onBlur:this.onBlur,onKeyDown:this.onKeyDown})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.text;return t.previousText===n?t:{text:n,previousText:e.text}}}])}(c.Component),S=n(54299),R=function(e){function t(){return(0,s.A)(this,t),(0,a.A)(this,t,arguments)}return(0,l.A)(t,e),(0,r.A)(t,[{key:"render",value:function(){var e=this.props,t=e.from,n=e.to,i=e.separate,o=e.controlWidth;return i?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(S.t,{range:!1,controlWidth:o,onUpdate:this.props.onFromChange,format:"dd.MM.yyyy HH:mm",from:t})," — ",(0,C.jsx)(S.t,{range:!1,controlWidth:o,onUpdate:this.props.onToChange,format:"dd.MM.yyyy HH:mm",from:n})]}):(0,C.jsx)(S.t,{onUpdate:this.props.onRangeChange,format:"yyyy-MM-dd HH:mm",from:t,to:n})}}])}(c.Component);R.defaultProps={separate:!1,controlWidth:"130px"};const k=function(e){return(0,C.jsx)("svg",(0,i.A)((0,i.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),{},{children:(0,C.jsx)("path",{fill:"currentColor",d:"M12 7v3h3V7zm0 0v3h3V7zm4 0v3h3V7zM4 11v3h3v-3zm8 0v3h3v-3zm0 0v3h3v-3zm4 0v3h3v-3zM4 15v3h3v-3zm8 0v3h3v-3zm0 0v3h3v-3zM8 7v3h3V7zm0 0v3h3V7zm0 4v3h3v-3zm0 0v3h3v-3zm0 4v3h3v-3zm0 0v3h3v-3z"})}))};var N=(0,d.A)("yc-timeline-picker"),T="custom",z=function(e){function t(){var e;(0,s.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=(0,a.A)(this,t,[].concat(i))).onClick=function(){e.props.onClick(e.props.time)},e}return(0,l.A)(t,e),(0,r.A)(t,[{key:"render",value:function(){var e=this.props,t=e.size,n=e.width,i=e.title,o=e.className,s=e.checked;return(0,C.jsx)(h.$,{view:s?"normal":"flat-secondary",size:t,width:n,onClick:this.onClick,className:o,children:i})}}])}(c.Component);z.defaultProps={size:"l"};var _=function(e,t){return"".concat((0,y.LA)(e)," - ").concat((0,y.LA)(t))},M=function(e){function t(){var e;(0,s.A)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(e=(0,a.A)(this,t,[].concat(r))).state={},e._datepickerRef=c.createRef(),e._inputRef=c.createRef(),e.onCustomClick=function(){e.setState({customInput:!0})},e.onCustomCancel=function(){e.setState({customInput:!1})},e.onCustomDone=function(t){var n,i;e.setState({customInput:!1}),null===(n=(i=e.props).onShortcut)||void 0===n||n.call(i,t,T)},e.onOpenPickerClick=function(){e.setState({opened:!0})},e.onPopupClose=function(t){var n;Boolean(null===(n=t.target)||void 0===n?void 0:n.closest(".yc-datepicker-body"))||(e.setState({opened:!1}),e.props.onUpdate({from:new Date(e.state.from).valueOf(),to:new Date(e.state.to).valueOf()}))},e.onInputChange=function(t){e.setState({datetime:t})},e.onInputDone=function(t){var n=/(?:(\d{4}-\d{2}-\d{2})(?:[ T]?(\d{2}:\d{2}))?)\s*-\s*(?:(\d{4}-\d{2}-\d{2})?[ T]?(\d{2}:\d{2})?)/.exec(t);if(n){var i=(0,o.A)(n,5),s=i[1],r=i[2],a=i[3],l=i[4],c=(0,y.zJ)("".concat(s," ").concat(r)),d=(0,y.zJ)("".concat(a||s," ").concat(l));isNaN(c)||isNaN(d)||e.props.onUpdate({from:c,to:d}),e.setState({opened:!1})}},e.onFromChange=function(t){var n=t.from,i=e.state.to;e.setState({from:g()(n).valueOf(),datetime:_(n,i)})},e.onToChange=function(t){var n=t.from,i=e.state.from;e.setState({to:g()(n).valueOf(),datetime:_(i,n)})},e.onRangeChange=function(t){var n=t.from,i=t.to;e.setState({from:n,to:i,datetime:_(n,i)})},e.onShortcutClick=function(t){var n,i;e.setState({opened:!1}),null===(n=(i=e.props).onShortcut)||void 0===n||n.call(i,t,t)},e.onTopShortcutClick=function(t){var n,i;null===(n=(i=e.props).onShortcut)||void 0===n||n.call(i,t,t)},e.renderTopShortcuts=function(t){var n=e.props.shortcut;return t.time===T?e.renderCustomShortcut():(0,C.jsx)(z,(0,i.A)((0,i.A)({},t),{},{checked:n===t.time,className:N("hot"),onClick:e.onTopShortcutClick}),t.time)},e}return(0,l.A)(t,e),(0,r.A)(t,[{key:"componentDidUpdate",value:function(){var e;this.state.opened&&this._inputRef.current&&(null===(e=this._inputRef.current)||void 0===e||e.focus())}},{key:"renderOpenedPicker",value:function(){var e=this.state.datetime;return(0,C.jsxs)(c.Fragment,{children:[this.renderClosedPicker(),(0,C.jsx)(A,{ref:this._inputRef,size:"l",text:e,autoselect:!0,onUpdate:this.onInputChange,onDone:this.onInputDone,onCancel:m()})]})}},{key:"renderClosedPicker",value:function(){var e=this.props,t=e.from,n=e.to;return(0,C.jsxs)("div",{className:N("date-text"),children:[(0,C.jsx)(u.I,{data:k,width:36,className:N("icon")}),(0,C.jsx)("div",{className:N("text"),children:(0,y.vy)(t,n)})]})}},{key:"renderShortcuts",value:function(){var e=this,t=this.props,n=t.shortcut,o=t.shortcuts,s=void 0===o?[]:o;return(0,C.jsx)("div",{className:N("shortcut-pane"),children:s.map((function(t,o){return(0,C.jsx)("div",{className:N("shortcut-group"),children:t.map((function(t){return(0,C.jsx)(z,(0,i.A)((0,i.A)({},t),{},{size:"m",checked:n===t.time,className:N("shortcut"),onClick:e.onShortcutClick}),t.time)}))},o)}))})}},{key:"renderCustomShortcut",value:function(){var e=this.props,t=e.from,n=e.to,i=e.shortcut===T,o=this.state.customInput;return(0,C.jsx)("div",{className:N("hot-custom"),children:o?(0,C.jsx)(A,{autoFocus:!0,placeholder:"6h",onCancel:this.onCustomCancel,onDone:this.onCustomDone}):(0,C.jsx)(z,{checked:i,onClick:this.onCustomClick,title:i?(0,y.pG)(t,n):j("label_custom"),width:"max"})},"custom")}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.from,i=e.to,o=e.topShortcuts,s=e.hasDatePicker,r=this.state.opened,a=r?this.renderOpenedPicker():this.renderClosedPicker();return(0,C.jsxs)("div",{className:N(null,t),children:[(0,C.jsx)("div",{className:N("hot-buttons",{divider:s}),children:null==o?void 0:o.map(this.renderTopShortcuts)}),s&&(0,C.jsxs)(c.Fragment,{children:[(0,C.jsx)("div",{ref:this._datepickerRef,className:N("datepicker",{opened:r}),onClick:this.onOpenPickerClick,children:a}),(0,C.jsx)(p.z,{anchorRef:this._datepickerRef,open:r,onClose:this.onPopupClose,children:(0,C.jsxs)("div",{className:N("shortcuts"),children:[(0,C.jsx)("div",{className:N("range-datepicker"),children:(0,C.jsx)(R,{from:n,to:i,onRangeChange:this.onRangeChange,onFromChange:this.onFromChange,onToChange:this.onToChange})}),(0,C.jsxs)("div",{className:N("shortcuts-title"),children:[j("label_shortcut-list"),":"]}),this.renderShortcuts()]})})]})]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.from,i=e.to;return t.prevFrom===n&&t.prevTo===i?t:{from:n,to:i,prevFrom:n,prevTo:i,datetime:_(n,i)}}}])}(c.Component);M.defaultProps={shortcuts:[],topShortcuts:[]}},20145:(e,t,n)=>{n.d(t,{D2:()=>r,dR:()=>o.dR,vy:()=>o.vy,wn:()=>i.w});var i=n(16034),o=n(24297);function s(e,t){return{time:e,title:t||e}}var r=[[s("4h"),s("8h"),s("12h"),s("24h")],[s("2d"),s("7d","Week"),s("2w","2 Weeks")],[s("1M","Month"),s("2M","2 Months")]]},24297:(e,t,n)=>{n.d(t,{LA:()=>v,SK:()=>g,dR:()=>x,fU:()=>p,pG:()=>h,vy:()=>u,zJ:()=>m});var i=n(9736),o=n(41655),s=n.n(o),r=36e5,a=24*r,l=7*a,c=30*a,d=365*a,h=function(e,t){var n=t-e;if(n>=d){var i=Math.floor(n/d),o=Math.floor(n%d/c);return 0===o||i>4?"".concat(i,"y"):"".concat(i,"y ").concat(o,"mo")}if(n>=c){var s=Math.floor(n/c),h=Math.floor(n%c/a);return 0===h||s>4?"".concat(s,"mo"):"".concat(s,"mo ").concat(h,"d")}if(n>=l){var u=Math.floor(n/l),p=Math.floor(n%l/a);return 0===p||u>3?"".concat(u,"w"):"".concat(u,"w ").concat(p,"d")}if(n>=a){var v=Math.floor(n/a),m=Math.floor(n%a/r);return 0===m||v>4?"".concat(v,"d"):"".concat(v,"d ").concat(m,"h")}if(n>=r){var f=Math.floor(n/r),g=Math.floor(n%r/6e4);return 0===g||f>6?"".concat(f,"h"):"".concat(f,"h ").concat(g,"m")}var x=Math.round(n/6e4);return"".concat(x,"m")},u=function(e,t){var n=s()(e),i=s()(t);return i.isSame(n,"d")?"".concat(n.format("YYYY-MM-DD  HH:mm"),"  —  ").concat(i.format("HH:mm")):"".concat(n.format("YYYY-MM-DD  HH:mm"),"  —  ").concat(i.format("YYYY-MM-DD  HH:mm"))},p=function(e){return s()(e).format("HH:mm")},v=function(e){return s()(e).format("YYYY-MM-DD HH:mm")},m=function(e){return s()(e).valueOf()},f={mo:"M"},g=function(e){var t=Date.now(),n=function(e,t){for(var n=s()(t),o=/(-?\d+)([a-zA-Z]+)/g;;){var r=o.exec(e);if(!r)break;var a=(0,i.A)(r,3),l=a[1],c=a[2],d=f[c]||c;n.subtract(l,d)}return n.valueOf()}(e,t);return t<n?{from:t,to:n}:{from:n,to:t}};function x(e){if(e){var t=e.from,n=e.to,i=e.shortcutValue;return i?g(i):{from:t,to:n}}}},24642:(e,t,n)=>{n.d(t,{I:()=>a});var i=n(64922),o=n(51036),s=n(32235);const r=(0,n(21086).om)("arrow-toggle");function a({size:e=16,direction:t="bottom",className:n,qa:a}){return(0,i.jsx)("span",{style:{width:e,height:e},className:r({direction:t},n),"data-qa":a,children:(0,i.jsx)(s.I,{data:o.A,size:e})})}},27241:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(77810);const o=e=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06",clipRule:"evenodd"}))},46747:(e,t,n)=>{n.d(t,{J:()=>u});var i=n(64922),o=n(77810),s=n(72890),r=n(11415),a=n(48382),l=n(32235),c=n(21086);const d=(0,c.om)("label"),h={xs:{copyIconSize:12,closeIconSize:12},s:{copyIconSize:14,closeIconSize:14},m:{copyIconSize:16,closeIconSize:16}},u=o.forwardRef((function(e,t){const{type:n="default",theme:c="normal",size:u="xs",title:p,icon:v,children:m,onCloseClick:f,className:g,disabled:x,copyText:w,closeButtonLabel:j,copyButtonLabel:y,interactive:b=!1,value:C,onCopy:A,onClick:S,qa:R}=e,k=Boolean(""!==m&&o.Children.count(m)>0),N="close"===n&&k,T="copy"===n&&k,z="function"==typeof S,_=Boolean(T&&w),M=(z||_||b)&&!x,{copyIconSize:E,closeIconSize:O}=h[u],H=v&&(0,i.jsx)("div",{className:d("addon",{side:k?"start":void 0,type:"icon"}),children:v}),I=k&&(0,i.jsxs)("div",{className:d("text"),children:[(0,i.jsx)("div",{className:d("content"),children:m}),Boolean(C)&&(0,i.jsxs)("div",{className:d("value"),children:[(0,i.jsx)("div",{className:d("separator"),children:":"}),(0,i.jsx)("div",{className:d("key"),children:C})]})]}),D=e=>{let n;return T?n=(0,i.jsx)("button",{type:"button","aria-label":y||void 0,onClick:z?S:void 0,disabled:x,className:d("addon",{side:"end",type:"button"}),"data-qa":"copy-button",children:(0,i.jsx)(r.u,{status:e||"pending",size:E})}):N&&(n=(0,i.jsx)("button",{type:"button",onClick:f,"aria-label":j||void 0,disabled:x,className:d("addon",{side:"end",type:"button"}),"data-qa":"close-button",children:(0,i.jsx)(l.I,{size:O,data:s.A})})),(0,i.jsxs)("div",{ref:t,className:d({theme:c,size:u,interactive:M,disabled:x},g),title:p,"data-qa":R,children:[H,z?(0,i.jsx)("button",{disabled:x,type:"button",onClick:S,className:d("main-button"),"data-qa":"main-button",children:I}):I,n]})};return _&&w&&!z?(0,i.jsx)(a.$,{text:w,onCopy:A,timeout:1e3,children:e=>D(e)}):D()}))},50823:(e,t,n)=>{function i(e){return e.displayName||e.name||"Component"}n.d(t,{x:()=>i})},51036:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(77810);const o=e=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.97 5.47a.75.75 0 0 1 1.06 0L8 9.44l3.97-3.97a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 0-1.06",clipRule:"evenodd"}))},53302:(e,t,n)=>{n.d(t,{A:()=>l}),n(77810);var i=n(76872),o=n(73822),s=n(88787),r=n(64922),a=(0,i.A)("status-label");function l(e){var t=e.className,n=e.label,i=e.renderPlaque,l=e.text,c=e.state,d=e.iconState,h=e.hideIcon,u=function(e){var t;return null!==(t={materializing:"preparing",initializing:"preparing",preparing:"preparing",pending:"preparing",starting:"preparing",waiting:"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!=d?d:u),v={state:null!=c?c:u};return n||l||c?(0,r.jsxs)("span",{className:a(null,i?a("plaque",v,t):a(v,t)),children:[!h&&(0,r.jsx)(s.A,{awesome:p}),(0,r.jsx)("span",{children:null!=l?l:o.A.format.ReadableField(n)})]}):(0,r.jsx)("span",{})}},82837:(e,t,n)=>{n.d(t,{c:()=>g});var i=n(64922),o=n(77810),s=n(13032),r=n(84203),a=n(56911),l=n(76441),c=n(50823),d=n(8477);const h=(0,n(21086).om)("sheet");class u{constructor(e,t){this.x=e,this.y=t,this.timeStamp=Date.now()}}class p{constructor(e=5){this.points=[],this.pointsLen=e,this.clear()}clear(){this.points=new Array(this.pointsLen)}addMovement({x:e,y:t}){this.points.pop(),this.points.unshift(new u(e,t))}getYAcceleration(e=1){const t=this.points[0],n=this.points[e];return t&&n?(t.y-n.y)/Math.pow(t.timeStamp-n.timeStamp,2):0}}let v=[];class m extends o.Component{constructor(){super(...arguments),this.veilRef=o.createRef(),this.sheetRef=o.createRef(),this.sheetTopRef=o.createRef(),this.sheetContentBoxRef=o.createRef(),this.sheetScrollContainerRef=o.createRef(),this.velocityTracker=new p,this.observer=null,this.resizeWindowTimer=null,this.state={startScrollTop:0,startY:0,deltaY:0,prevSheetHeight:0,swipeAreaTouched:!1,contentTouched:!1,veilTouched:!1,isAnimating:!1,inWindowResizeScope:!1,delayedResize:!1},this.setStyles=({status:e,deltaHeight:t=0})=>{if(!this.sheetRef.current||!this.veilRef.current)return;const n=this.sheetHeight-t,i="showing"===e?`translate3d(0, -${n}px, 0)`:"translate3d(0, 0, 0)";let o=0;"showing"===e&&(o=0===t?1:n/this.sheetHeight),this.veilRef.current.style.opacity=String(o),this.sheetRef.current.style.transform=i},this.getAvailableContentHeight=e=>{const t=.9*window.innerHeight-this.sheetTopHeight;return e>=t?t:e},this.show=()=>{this.setState({isAnimating:!0},(()=>{this.setStyles({status:"showing"}),this.setHash()}))},this.hide=()=>{this.setState({isAnimating:!0},(()=>{this.setStyles({status:"hiding"}),this.removeHash()}))},this.onSwipeAreaTouchStart=e=>{this.velocityTracker.clear(),this.setState({startY:e.nativeEvent.touches[0].clientY,swipeAreaTouched:!0})},this.onContentTouchStart=e=>{this.props.allowHideOnContentScroll&&!this.state.swipeAreaTouched&&(this.velocityTracker.clear(),this.setState({startY:e.nativeEvent.touches[0].clientY,startScrollTop:this.sheetScrollTop,contentTouched:!0}))},this.onSwipeAriaTouchMove=e=>{const t=e.nativeEvent.touches[0].clientY-this.state.startY;this.velocityTracker.addMovement({x:e.nativeEvent.touches[0].clientX,y:e.nativeEvent.touches[0].clientY}),this.setState({deltaY:t}),t<=0||this.setStyles({status:"showing",deltaHeight:t})},this.onContentTouchMove=e=>{if(!this.props.allowHideOnContentScroll)return;if(!this.state.startY)return void this.onContentTouchStart(e);const{startScrollTop:t,swipeAreaTouched:n}=this.state;if(n||this.sheetScrollTop>0||t>0&&t!==this.sheetScrollTop)return;const i=e.nativeEvent.touches[0].clientY-this.state.startY;this.velocityTracker.addMovement({x:e.nativeEvent.touches[0].clientX,y:e.nativeEvent.touches[0].clientY}),i<=0?this.setState({deltaY:0}):(this.setState({deltaY:i}),this.setStyles({status:"showing",deltaHeight:i}))},this.onTouchEndAction=e=>{const t=this.velocityTracker.getYAcceleration();this.sheetHeight<=e?this.props.hideSheet():e>50&&t<=.08&&t>=-.02||t>.08?this.hide():0!==e&&this.show()},this.onSwipeAriaTouchEnd=()=>{const{deltaY:e}=this.state;this.onTouchEndAction(e),this.setState({startY:0,deltaY:0,swipeAreaTouched:!1})},this.onContentTouchEnd=()=>{const{deltaY:e,swipeAreaTouched:t}=this.state;this.props.allowHideOnContentScroll&&!t&&(this.onTouchEndAction(e),this.setState({startY:0,deltaY:0,contentTouched:!1}))},this.onVeilClick=()=>{this.setState({veilTouched:!0}),this.hide()},this.onVeilTransitionEnd=()=>{this.setState({isAnimating:!1}),"0"!==this.veilOpacity?this.state.delayedResize&&(this.onResizeWindow(),this.setState({delayedResize:!1})):this.props.hideSheet()},this.onContentTransitionEnd=e=>{"height"===e.propertyName&&this.sheetScrollContainerRef.current&&(this.sheetScrollContainerRef.current.style.transition="none")},this.onResizeWindow=()=>{this.state.isAnimating?this.setState({delayedResize:!0}):(this.setState({inWindowResizeScope:!0}),this.resizeWindowTimer&&window.clearTimeout(this.resizeWindowTimer),this.resizeWindowTimer=window.setTimeout((()=>{this.onResize()}),50))},this.onResize=()=>{if(!this.sheetRef.current||!this.sheetScrollContainerRef.current)return;const e=this.sheetContentHeight;if(e===this.state.prevSheetHeight&&!this.state.inWindowResizeScope)return;const t=this.getAvailableContentHeight(e);this.sheetScrollContainerRef.current.style.transition=this.state.prevSheetHeight>e?"height 0s ease 0.3s":"none",this.sheetScrollContainerRef.current.style.height=`${t}px`,this.sheetRef.current.style.transform=`translate3d(0, -${t+this.sheetTopHeight}px, 0)`,this.setState({prevSheetHeight:e,inWindowResizeScope:!1})}}componentDidMount(){this.addListeners(),this.show();const e=this.getAvailableContentHeight(this.sheetContentHeight);this.setInitialStyles(e),this.setState({prevSheetHeight:e})}componentDidUpdate(e){const{visible:t,location:n}=this.props;!e.visible&&t&&this.show(),(e.visible&&!t||this.shouldClose(e))&&this.hide(),e.location.pathname!==n.pathname&&(v=[])}componentWillUnmount(){this.removeListeners()}render(){const{content:e,contentClassName:t,swipeAreaClassName:n,hideTopBar:s,title:r}=this.props,{deltaY:a,swipeAreaTouched:l,contentTouched:c,veilTouched:d,isAnimating:u}=this.state,p={"with-transition":!a||d},v={"with-transition":p["with-transition"]},m={"without-scroll":a>0&&c||l};return(0,i.jsxs)(o.Fragment,{children:[(0,i.jsx)("div",{ref:this.veilRef,className:h("veil",p),onClick:u?void 0:this.onVeilClick,onTransitionEnd:this.onVeilTransitionEnd,role:"presentation"}),(0,i.jsxs)("div",{ref:this.sheetRef,className:h("sheet",v),role:"dialog","aria-modal":"true","aria-label":r,children:[!s&&(0,i.jsx)("div",{ref:this.sheetTopRef,className:h("sheet-top"),children:(0,i.jsx)("div",{className:h("sheet-top-resizer")})}),(0,i.jsx)("div",{className:h("sheet-swipe-area",n),onTouchStart:this.onSwipeAreaTouchStart,onTouchMove:this.onSwipeAriaTouchMove,onTouchEnd:this.onSwipeAriaTouchEnd}),(0,i.jsx)("div",{ref:this.sheetScrollContainerRef,className:h("sheet-scroll-container",m),onTouchStart:this.onContentTouchStart,onTouchMove:this.onContentTouchMove,onTouchEnd:this.onContentTouchEnd,onTransitionEnd:this.onContentTransitionEnd,children:(0,i.jsx)("div",{ref:this.sheetContentBoxRef,className:h("sheet-content-box"),children:(0,i.jsx)("div",{className:h("sheet-content-box-border-compensation"),children:(0,i.jsxs)("div",{className:h("sheet-content",t),children:[r&&(0,i.jsx)("div",{className:h("sheet-content-title"),children:r}),(0,i.jsx)("div",{children:e})]})})})})]})]})}get veilOpacity(){var e;return(null===(e=this.veilRef.current)||void 0===e?void 0:e.style.opacity)||0}get sheetTopHeight(){var e;return(null===(e=this.sheetTopRef.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0}get sheetHeight(){var e;return(null===(e=this.sheetRef.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0}get sheetScrollTop(){var e;return(null===(e=this.sheetScrollContainerRef.current)||void 0===e?void 0:e.scrollTop)||0}get sheetContentHeight(){var e;return(null===(e=this.sheetContentBoxRef.current)||void 0===e?void 0:e.getBoundingClientRect().height)||0}setInitialStyles(e){this.sheetScrollContainerRef.current&&this.sheetContentBoxRef.current&&(this.sheetScrollContainerRef.current.style.height=`${e}px`)}addListeners(){window.addEventListener("resize",this.onResizeWindow),this.sheetContentBoxRef.current&&(this.observer=new ResizeObserver((()=>{this.state.inWindowResizeScope||this.onResize()})),this.observer.observe(this.sheetContentBoxRef.current))}removeListeners(){window.removeEventListener("resize",this.onResizeWindow),this.observer&&this.observer.disconnect()}setHash(){const{id:e,platform:t,location:n,history:i}=this.props;if(t===l.O.BROWSER)return;const o=Object.assign(Object.assign({},n),{hash:e});switch(t){case l.O.IOS:n.hash&&v.push(n.hash),i.replace(o);break;case l.O.ANDROID:i.push(o)}}removeHash(){var e;const{id:t,platform:n,location:i,history:o}=this.props;if(n!==l.O.BROWSER&&i.hash===`#${t}`)switch(n){case l.O.IOS:o.replace(Object.assign(Object.assign({},i),{hash:null!==(e=v.pop())&&void 0!==e?e:""}));break;case l.O.ANDROID:o.goBack()}}shouldClose(e){const{id:t,platform:n,location:i,history:o}=this.props;return n!==l.O.BROWSER&&"POP"===o.action&&e.location.hash!==i.hash&&i.hash!==`#${t}`}}m.defaultProps={id:"sheet",allowHideOnContentScroll:!0};const f=function(e){var t;const n=(0,c.x)(e);return(t=class extends o.Component{render(){return(0,i.jsx)(e,Object.assign({},this.props,{mobile:this.context.mobile,platform:this.context.platform,useHistory:this.context.useHistory,useLocation:this.context.useLocation}))}}).displayName=`withMobile(${n})`,t.contextType=d.G,t}(function(e){const t=t=>{const{useHistory:n,useLocation:o}=t,s=(0,a.Tt)(t,["useHistory","useLocation"]);return(0,i.jsx)(e,Object.assign({},s,{history:n(),location:o()}))},n=e.displayName||e.name||"Component";return t.displayName=`withRouterWrapper(${n})`,t}(m)),g=({children:e,onClose:t,visible:n,id:a,title:l,className:c,contentClassName:d,swipeAreaClassName:u,allowHideOnContentScroll:p,hideTopBar:v,qa:m})=>{const[g,x]=o.useState(n),[w,j]=o.useState(n);return(0,s.y)({enabled:g}),!w&&n&&x(!0),n!==w&&j(n),g?(0,i.jsx)(r.Z,{children:(0,i.jsx)("div",{"data-qa":m,className:h(null,c),children:(0,i.jsx)(f,{id:a,content:e,contentClassName:d,swipeAreaClassName:u,title:l,visible:n,allowHideOnContentScroll:p,hideTopBar:v,hideSheet:()=>{t&&t(),x(!1)}})})}):null}},84099:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(56911),o=n(64922),s=n(77810),r=n(3564),a=n(99992);const l=(0,n(21086).om)("card"),c=s.forwardRef((function(e,t){const{type:n="container",theme:s,view:c,size:d="m",children:h,className:u,onClick:p,disabled:v,selected:m}=e,f=(0,i.Tt)(e,["type","theme","view","size","children","className","onClick","disabled","selected"]),g="selection"===n,x="container"===n,w=("action"===n||g)&&Boolean(p)&&!v,j=x?"normal":void 0,y=x||g?"outlined":void 0,b=w?p:void 0,{onKeyDown:C}=(0,r.N)(p);return(0,o.jsx)(a.a,Object.assign({ref:t,role:w?"button":void 0,className:l({theme:s||j,view:c||y,type:n,selected:m,size:d,disabled:v,clickable:w},u),onClick:b,onKeyDown:w?C:void 0,tabIndex:w?0:void 0},f,{children:h}))}))},88822:(e,t,n)=>{n.r(t),n.d(t,{IncarnationsTemplate:()=>ke,default:()=>Re});var i=n(40319),o=n(77810),s=n(15647),r=n(76872),a=n(70243),l=n(5865),c=n(84099),d=n(64922),h=n(58906),u=n(2320);const p=o.createContext(void 0),v=o.createContext(void 0);function m(e){const{size:t,disabled:n,defaultExpanded:i,arrowPosition:s,summary:r,keepMounted:a,onUpdate:l,expanded:c}=e,[h,m]=o.useState((()=>Boolean(i))),f=void 0!==c,g=(0,u.u)(),x=`disclosure${g}`;return(0,d.jsx)(p.Provider,{value:{size:t,disabled:n,summary:r,arrowPosition:s,keepMounted:a,expanded:f?c:h,ariaControls:g,ariaLabelledby:x},children:(0,d.jsx)(v.Provider,{value:()=>{m((e=>!e)),l(f?!c:!h)},children:e.children})})}function f(){const e=o.useContext(p);if(void 0===e)throw new Error("useDisclosureAttributes must be used within DisclosureProvider");return e}var g=n(31053),x=n(51024);const w=(0,n(21086).om)("disclosure"),j={SUMMARY:"disclosure-summary",DETAILS:"disclosure-details"};function y({children:e}){const t=o.useRef(null),{ariaControls:n,ariaLabelledby:i,keepMounted:s,expanded:r}=f();return(0,d.jsx)(g.A,{nodeRef:t,in:r,addEndListener:e=>{var n;return null===(n=t.current)||void 0===n?void 0:n.addEventListener("animationend",e)},classNames:(0,x.L)(w),mountOnEnter:!s,unmountOnExit:!s,appear:!0,children:(0,d.jsx)("div",{ref:t,id:n,role:"region","aria-labelledby":i,className:w("content",{visible:r}),"data-qa":j.DETAILS,children:e})})}y.displayName="DisclosureDetails";var b=n(24642),C=n(82835);const A={m:14,l:16,xl:20};function S(){(0,C.m)('[Disclosure] Physical values (left, right) of "arrowPosition" property are deprecated. Use logical values (start, end) instead.')}function R({children:e}){const t=function(){const e=o.useContext(v);if(void 0===e)throw new Error("useToggleDisclosure must be used within DisclosureProvider");return e}(),{ariaControls:n,ariaLabelledby:i,expanded:s,disabled:r}=f(),a={onClick:t,ariaControls:n,id:i,expanded:s,disabled:r};return e(a,(0,d.jsx)(k,Object.assign({},a)))}function k({onClick:e,ariaControls:t,id:n,expanded:i,disabled:o}){const{size:s,summary:r,arrowPosition:a}=f();let l=a;return"left"===l&&(S(),l="start"),"right"===l&&(S(),l="end"),(0,d.jsxs)("button",{type:"button","aria-expanded":i,className:w("trigger",{disabled:o,arrow:l}),"aria-controls":t,id:n,onClick:e,disabled:o,"data-qa":j.SUMMARY,children:[(0,d.jsx)(b.I,{size:A[s],direction:i?"top":"bottom"}),r]})}R.displayName="DisclosureSummary";const N=(0,h.g)(R),T=o.forwardRef((function(e,t){const{size:n="m",disabled:i=!1,defaultExpanded:s=!1,arrowPosition:r="start",summary:a="",className:l,keepMounted:c=!0,children:h,onUpdate:u=(()=>{}),expanded:p,qa:v}=e,[f,g]=function(e){const t=o.Children.toArray(e);let n,i;const s=[];for(const e of t)if(N(e)){if(n)throw new Error("Only one <Disclosure.Summary> component is allowed");n=e}else s.push(e);return s.length>0&&(i=(0,d.jsx)(y,{children:s})),n||(n=(0,d.jsx)(R,{children:e=>(0,d.jsx)(k,Object.assign({},e))})),[n,i]}(h);return(0,d.jsx)(m,{disabled:i,defaultExpanded:s,expanded:p,keepMounted:c,size:n,summary:a,arrowPosition:r,onUpdate:u,children:(0,d.jsxs)("section",{ref:t,className:w({size:n},l),"data-qa":v,children:[f,g]})})}));T.Summary=R,T.displayName="Disclosure";var z=n(11687),_=n(26116),M=n(18472),E=n(64772),O=n(97846),H=n(53263),I=n(20145),D=n(48553);function Y(e,t,n){return["job_aborted","job_failed","job_interrupted"].includes(String(null==e?void 0:e.incarnation_switch_reason))&&null!=e&&e.incarnation_switch_reason?e.incarnation_switch_reason:"job_lack_after_revival"!==(null==e?void 0:e.incarnation_switch_reason)&&n?"operation_".concat(t.state):"system"}function L(e){if(e.startsWith("job")){var t=e.split("_")[1];return"interrupted"===t?"suspended":t}return"system"===e?"unknown":e.startsWith("operation")?e.split("_")[1]:e.toLowerCase()}function B(e,t){return e&&t?(0,I.vy)(e,t):e?E.A.DateTime(e):E.A.NO_VALUE}var P=(0,M.Mz)([D.eu,O.mh,O.M5,H.EM],(function(e,t,n,i){var o,s=[],r=i.isLoading,a=i.error;if(!t)return{incarnations:s,isLoading:r,error:a};for(var l=0;l<t.length;l++){var c,d,h,u=t[l],p=null==t?void 0:t[l+1],v=null==p?void 0:p.timestamp,m=null==p||null===(c=p.incarnation_switch_info)||void 0===c?void 0:c.trigger_job_id,f=null==p?void 0:p.incarnation_switch_reason,g=null==p?void 0:p.incarnation_switch_info,x=Y(p,e,l===t.length-1),w=u.timestamp,j=null!==(d=null!=v?v:null==e?void 0:e.finishTime)&&void 0!==d?d:null===(h=(0,_.bQ)("now"))||void 0===h?void 0:h.format("YYYY-MM-DDTHH:mm:ssZ"),y={id:u.incarnation,interval:B(w,j),trigger_job_id:m,switch_reason:f,finish_reason:E.A.ReadableField(x),finish_status:L(x),switch_info:g};s.push(y)}return n&&(s=s.filter((function(e){return e.id.startsWith(n)})).reverse()),{incarnations:null===(o=s)||void 0===o?void 0:o.reverse(),count:null==t?void 0:t.length,isLoading:r,error:a}})),W=n(8208),F=n(46747),U=n(89648),q=n(19314),V=n(52797),$=n(7313),J=n(42321),K=n(76426),Z=n(16727),G=n(92611);const X=JSON.parse('{"alert_no-incarnations":"No incarnations to show","trigger-job-info":"Trigger job info","no-info-to-display":"No info to display","id":"Id","abort-reason":"Abort reason","interruption-reason":"Interruption reason","error":"Error","all":"All","placeholder_incarnation-id":"Incarnation id...","jobs":"Jobs","incarnation-info":"Incarnation info"}'),Q=JSON.parse('{"alert_no-incarnations":"Нет инкарнаций для отображения","trigger-job-info":"Информация о запустившей задаче","no-info-to-display":"Нет информации для отображения","id":"Идентификатор","abort-reason":"Причина прерывания","interruption-reason":"Причина остановки","error":"Ошибка","all":"Все","placeholder_incarnation-id":"Идентификатор инкарнации...","jobs":"Задачи","incarnation-info":"Информация об инкарнации"}'),ee=(0,G.Kc)("yt:incarnations",{en:X,ru:Q});function te(e){var t=e.incarnation,n=(0,s.wA)(),i=(0,s.d4)(V.dB),o=(0,s.d4)(D.eu),r=t.switch_info,l=[{key:"trigger_job_id",value:(0,d.jsx)(K.A,{routed:!0,url:"/".concat(i,"/").concat(q.YW.JOB,"/").concat(o.id,"/").concat(t.trigger_job_id),children:t.trigger_job_id}),label:ee("id"),visible:Boolean(null==t?void 0:t.trigger_job_id)},{key:"abort_reason",value:(0,d.jsx)(F.J,{theme:"unknown",children:E.A.ReadableField(String(null==r?void 0:r.abort_reason))}),label:ee("abort-reason"),visible:Boolean(null==r?void 0:r.abort_reason)},{key:"interruption_reason",value:(0,d.jsx)(F.J,{theme:"unknown",children:E.A.ReadableField(String(null==r?void 0:r.interruption_reason))}),label:ee("interruption-reason"),visible:Boolean(null==r?void 0:r.interruption_reason)},{key:"error",value:(0,d.jsx)(Z.Bj.Error,{error:null==r?void 0:r.trigger_job_error,onClick:function(){return n((0,$.Hm)(null==r?void 0:r.trigger_job_error))}}),label:ee("error"),visible:Boolean(null==r?void 0:r.trigger_job_error)}];return(0,d.jsxs)(a.s,{gap:1,direction:"column",width:"40%",children:[(0,d.jsx)(U.E,{variant:"subheader-2",children:ee("trigger-job-info")}),(0,d.jsx)(J.Ay,{items:l}),!l.some((function(e){return e.visible}))&&(0,d.jsxs)(U.E,{variant:"inherit",children:[" ",ee("no-info-to-display")]})]})}var ne=n(20410),ie=n(93026),oe=n(53302),se=n(97536),re=n(18801),ae=n(6542),le=n(32235),ce=n(27241),de=n(51036),he=["incarnationId"],ue=(0,r.A)("incarnation-button");function pe(e){var t=e.incarnationId,n=(0,re.A)(e,he);return(0,d.jsx)(ae.$,(0,i.A)((0,i.A)({},n),{},{view:"flat",width:"max",className:ue(),children:(0,d.jsxs)(a.s,{alignItems:"center",gap:2,style:{height:"100%"},children:[(0,d.jsx)(U.E,{variant:"subheader-2",children:t}),(0,d.jsx)(le.I,{data:e.expanded?ce.A:de.A,size:"16"})]})}))}function ve(e){var t=e.incarnation,n=(0,s.wA)(),o=(0,s.d4)(V.dB),r=(0,s.d4)(D.eu);return(0,d.jsxs)(a.s,{justifyContent:"space-between",style:{overflow:"hidden"},children:[(0,d.jsxs)(a.s,{direction:"row",gap:2,alignItems:"center",children:[(0,d.jsx)(pe,(0,i.A)({incarnationId:t.id},e)),(0,d.jsx)(ne.b,{text:t.id}),(0,d.jsx)(K.A,{routed:!0,target:"_blank",url:"/".concat(o,"/").concat(q.YW.OPERATIONS,"/").concat(r.id,"/jobs?state=all&incarnation=").concat(t.id),children:(0,d.jsxs)(a.s,{alignItems:"center",gap:1,children:[ee("jobs"),(0,d.jsx)(ie.A,{})]})})]}),(0,d.jsxs)(a.s,{direction:"row",gap:4,alignItems:"center",children:[(0,d.jsx)(oe.A,{text:t.finish_reason,state:t.finish_status,hideIcon:!0,renderPlaque:!0}),(0,d.jsx)(U.E,{whiteSpace:"nowrap",variant:"inherit",ellipsis:!0,children:t.interval}),(0,d.jsx)(se.A,{onClick:function(){return n((0,O.TE)({infoDialog:{incarnation:t,visible:!0}}))}})]})]})}var me=n(24893);function fe(){return(0,d.jsx)(ge,{})}function ge(e){var t=e.renderAdditionalFilters,n=(0,s.wA)(),i=(0,s.d4)(O.M5);return(0,d.jsxs)(a.s,{direction:"row",gap:2,alignItems:"center",width:800,children:[(0,d.jsx)(me.k,{placeholder:ee("placeholder_incarnation-id"),value:i,onUpdate:function(e){n((0,O.CI)({idFilter:e}))}}),t]})}var xe=n(9128);function we(){var e=(0,s.d4)(P).count;return(0,d.jsx)(je,{items:[{type:ee("all"),count:e||0}]})}function je(e){var t=e.items;return(0,d.jsx)(xe.V,{hideAll:!0,items:t})}var ye=n(39055),be=n(78519),Ce=(0,r.A)("incarnation-info-dialog");function Ae(){var e,t,n=(0,s.wA)(),i=(0,s.d4)(O.RY),o=null==i||null===(e=i.incarnation)||void 0===e?void 0:e.switch_info,r=null==i||null===(t=i.incarnation)||void 0===t?void 0:t.switch_reason,a={};return o&&(a.incarnation_switch_info=o),r&&(a.incarnation_switch_reason=r),(0,d.jsxs)(ye.K,{size:"m",open:Boolean(null==i?void 0:i.visible),onClose:function(){n((0,O.TE)({infoDialog:{incarnation:(null==i?void 0:i.incarnation)||null,visible:!1}}))},children:[(0,d.jsx)(ye.K.Header,{caption:ee("incarnation-info")}),(0,d.jsx)(ye.K.Body,{children:(0,d.jsx)(be.A,{className:Ce("details"),settings:{format:"json"},value:null!=a?a:{}})})]})}var Se=(0,r.A)("incarnations");function Re(){var e=(0,s.d4)(P),t=e.incarnations,n=e.error,i=e.isLoading;return(0,d.jsx)(ke,{incarnations:t,isLoading:i,error:n,incarnationsCount:(0,d.jsx)(we,{}),incarnationsToolbar:(0,d.jsx)(fe,{})})}function ke(e){var t=e.incarnations,n=e.isLoading,o=e.error,s=e.incarnationsCount,r=e.incarnationsToolbar,h=e.incarnationsAlert,u=e.renderTelemetryInfo;return o?(0,d.jsx)(W.z,{error:o}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(a.s,{direction:"column",gap:2,children:[r,s,n?(0,d.jsx)(a.s,{justifyContent:"center",alignItems:"center",children:(0,d.jsx)(l.a,{})}):(0,d.jsxs)(d.Fragment,{children:[" ",h,null!=t&&t.length?t.map((function(e,t){return(0,d.jsx)(c.Z,{view:"outlined",className:Se("incarnation"),children:(0,d.jsxs)(T,{keepMounted:!1,defaultExpanded:0===t,children:[(0,d.jsx)(T.Summary,{children:function(t){return(0,d.jsx)(ve,(0,i.A)({incarnation:e},t))}}),(0,d.jsxs)(a.s,{direction:"row",className:Se("incarnation-info"),children:[(0,d.jsx)(te,{incarnation:e}),null==u?void 0:u(e.id)]})]})},e.id)})):(0,d.jsx)(z.F,{theme:"info",message:ee("alert_no-incarnations")})]})]}),(0,d.jsx)(Ae,{})]})}},93026:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(77810);const o=e=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 1.5A.75.75 0 0 0 10 3h1.94L6.97 7.97a.75.75 0 0 0 1.06 1.06L13 4.06V6a.75.75 0 0 0 1.5 0V2.25a.75.75 0 0 0-.75-.75zM7.5 3.25a.75.75 0 0 0-.75-.75H4.5a3 3 0 0 0-3 3v6a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V9.25a.75.75 0 0 0-1.5 0v2.25a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 3 11.5v-6A1.5 1.5 0 0 1 4.5 4h2.25a.75.75 0 0 0 .75-.75",clipRule:"evenodd"}))},97536:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(40319),o=n(18801),s=(n(77810),n(58299)),r=n(88787),a=n(64922),l=["view","size"];function c(e){var t=e.view,n=void 0===t?"flat-secondary":t,c=e.size,d=void 0===c?"m":c,h=(0,o.A)(e,l);return(0,a.jsx)(s.A,(0,i.A)((0,i.A)({view:n,size:d},h),{},{children:(0,a.jsx)(r.A,{awesome:"at"})}))}}}]);
2
+ //# sourceMappingURL=incarnations.b6c8305d.chunk.js.map