@ytsaurus/ui 1.71.1 → 1.72.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 +55 -55
- package/dist/public/build/js/1260.534f3f75.chunk.js +2 -0
- package/dist/public/build/js/{1260.e955a5ff.chunk.js.map → 1260.534f3f75.chunk.js.map} +1 -1
- package/dist/public/build/js/{1983.3d8315a1.chunk.js → 1983.666923be.chunk.js} +2 -2
- package/dist/public/build/js/{1983.3d8315a1.chunk.js.map → 1983.666923be.chunk.js.map} +1 -1
- package/dist/public/build/js/3337.31ee332d.chunk.js +3 -0
- package/dist/public/build/js/3337.31ee332d.chunk.js.map +1 -0
- package/dist/public/build/js/3724.425d01ec.chunk.js +2 -0
- package/dist/public/build/js/{3724.49a6f456.chunk.js.map → 3724.425d01ec.chunk.js.map} +1 -1
- package/dist/public/build/js/5088.64e090aa.chunk.js +2 -0
- package/dist/public/build/js/{5088.f0feaa1e.chunk.js.map → 5088.64e090aa.chunk.js.map} +1 -1
- package/dist/public/build/js/{5177.3e2a0ddb.chunk.js → 5177.8978a5b3.chunk.js} +2 -2
- package/dist/public/build/js/{5177.3e2a0ddb.chunk.js.map → 5177.8978a5b3.chunk.js.map} +1 -1
- package/dist/public/build/js/6729.c07b8f4c.chunk.js +2 -0
- package/dist/public/build/js/6729.c07b8f4c.chunk.js.map +1 -0
- package/dist/public/build/js/{7263.860d7c88.chunk.js → 7263.210dadfd.chunk.js} +3 -3
- package/dist/public/build/js/{7263.860d7c88.chunk.js.map → 7263.210dadfd.chunk.js.map} +1 -1
- package/dist/public/build/js/{7959.ab3789db.chunk.js → 7959.fedd6b2e.chunk.js} +2 -2
- package/dist/public/build/js/{7959.ab3789db.chunk.js.map → 7959.fedd6b2e.chunk.js.map} +1 -1
- package/dist/public/build/js/9558.a6ea64c9.chunk.js +2 -0
- package/dist/public/build/js/9558.a6ea64c9.chunk.js.map +1 -0
- package/dist/public/build/js/accounts.2ba221c2.chunk.js +2 -0
- package/dist/public/build/js/{accounts.69da4208.chunk.js.map → accounts.2ba221c2.chunk.js.map} +1 -1
- package/dist/public/build/js/acl.5e54e4b4.chunk.js +2 -0
- package/dist/public/build/js/acl.5e54e4b4.chunk.js.map +1 -0
- package/dist/public/build/js/bundles.7fc5e9e7.chunk.js +2 -0
- package/dist/public/build/js/{bundles.86be96f0.chunk.js.map → bundles.7fc5e9e7.chunk.js.map} +1 -1
- package/dist/public/build/js/{chyt.6901fd41.chunk.js → chyt.eff6e270.chunk.js} +2 -2
- package/dist/public/build/js/{chyt.6901fd41.chunk.js.map → chyt.eff6e270.chunk.js.map} +1 -1
- package/dist/public/build/js/{cluster-page-wrapper.af414db5.chunk.js → cluster-page-wrapper.434bb4ef.chunk.js} +2 -2
- package/dist/public/build/js/{cluster-page-wrapper.af414db5.chunk.js.map → cluster-page-wrapper.434bb4ef.chunk.js.map} +1 -1
- package/dist/public/build/js/groups.923ba865.chunk.js +2 -0
- package/dist/public/build/js/groups.923ba865.chunk.js.map +1 -0
- package/dist/public/build/js/job.1bfebd02.chunk.js +2 -0
- package/dist/public/build/js/{job.64020b69.chunk.js.map → job.1bfebd02.chunk.js.map} +1 -1
- package/dist/public/build/js/main.c46b0cfa.js +3 -0
- package/dist/public/build/js/main.c46b0cfa.js.map +1 -0
- package/dist/public/build/js/navigation.f5cf971c.chunk.js +2 -0
- package/dist/public/build/js/navigation.f5cf971c.chunk.js.map +1 -0
- package/dist/public/build/js/query-navigation.76b02345.chunk.js +2 -0
- package/dist/public/build/js/{query-navigation.38a9af12.chunk.js.map → query-navigation.76b02345.chunk.js.map} +1 -1
- package/dist/public/build/js/{runtime.e38921d0.js → runtime.c88113bf.js} +2 -2
- package/dist/public/build/js/{runtime.e38921d0.js.map → runtime.c88113bf.js.map} +1 -1
- package/dist/public/build/js/scheduling.428b3b4f.chunk.js +2 -0
- package/dist/public/build/js/{scheduling.8bc4b3c7.chunk.js.map → scheduling.428b3b4f.chunk.js.map} +1 -1
- package/dist/public/build/js/system.65647634.chunk.js +2 -0
- package/dist/public/build/js/{system.eed98c65.chunk.js.map → system.65647634.chunk.js.map} +1 -1
- package/dist/public/build/js/{yt-df-dialog.0886347f.chunk.js → yt-df-dialog.636f6f6b.chunk.js} +2 -2
- package/dist/public/build/js/{yt-df-dialog.0886347f.chunk.js.map → yt-df-dialog.636f6f6b.chunk.js.map} +1 -1
- package/dist/public/build/js/yt-monaco-editor.59382231.chunk.js +2 -0
- package/dist/public/build/js/{yt-monaco-editor.61605970.chunk.js.map → yt-monaco-editor.59382231.chunk.js.map} +1 -1
- package/dist/public/build/manifest.json +50 -50
- package/dist/server/components/oauth.js +3 -0
- package/dist/server/utils/index.d.ts +1 -1
- package/dist/server/utils/index.js +0 -1
- package/dist/shared/constants/settings-types.d.ts +1 -1
- package/package.json +2 -2
- package/dist/public/build/js/1260.e955a5ff.chunk.js +0 -2
- package/dist/public/build/js/3337.b59984e8.chunk.js +0 -3
- package/dist/public/build/js/3337.b59984e8.chunk.js.map +0 -1
- package/dist/public/build/js/3724.49a6f456.chunk.js +0 -2
- package/dist/public/build/js/5088.f0feaa1e.chunk.js +0 -2
- package/dist/public/build/js/6729.90d07a56.chunk.js +0 -2
- package/dist/public/build/js/6729.90d07a56.chunk.js.map +0 -1
- package/dist/public/build/js/9558.65b707cc.chunk.js +0 -2
- package/dist/public/build/js/9558.65b707cc.chunk.js.map +0 -1
- package/dist/public/build/js/accounts.69da4208.chunk.js +0 -2
- package/dist/public/build/js/acl.81abf8c2.chunk.js +0 -2
- package/dist/public/build/js/acl.81abf8c2.chunk.js.map +0 -1
- package/dist/public/build/js/bundles.86be96f0.chunk.js +0 -2
- package/dist/public/build/js/groups.acc74ffc.chunk.js +0 -2
- package/dist/public/build/js/groups.acc74ffc.chunk.js.map +0 -1
- package/dist/public/build/js/job.64020b69.chunk.js +0 -2
- package/dist/public/build/js/main.0840984c.js +0 -3
- package/dist/public/build/js/main.0840984c.js.map +0 -1
- package/dist/public/build/js/navigation.f21aa950.chunk.js +0 -2
- package/dist/public/build/js/navigation.f21aa950.chunk.js.map +0 -1
- package/dist/public/build/js/query-navigation.38a9af12.chunk.js +0 -2
- package/dist/public/build/js/scheduling.8bc4b3c7.chunk.js +0 -2
- package/dist/public/build/js/system.eed98c65.chunk.js +0 -2
- package/dist/public/build/js/yt-monaco-editor.61605970.chunk.js +0 -2
- /package/dist/public/build/js/{3337.b59984e8.chunk.js.LICENSE.txt → 3337.31ee332d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{7263.860d7c88.chunk.js.LICENSE.txt → 7263.210dadfd.chunk.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{main.0840984c.js.LICENSE.txt → main.c46b0cfa.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
|
|
1
|
+
(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[6582],{29228:(e,t,n)=>{"use strict";n.d(t,{B:()=>N,y:()=>f});var r=n(40319),a=n(18801),o=n(77810),l=n(13778),s=n(92423),i=n(55695),c=n(25723);function u(e,t){const n=e.getAttribute("target");return e.href&&(!n||"_self"===n)&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}const d=(0,n(21086).om)("breadcrumbs2");function m(e){const t=e.href?"a":"span",n=(0,c.$)(e,{labelable:!0});let r=e.title;r||"string"!=typeof e.children||(r=e.children);const a=t=>{if(e.disabled||e.current)return void t.preventDefault();"function"==typeof e.onAction&&e.onAction();const n=t.currentTarget;"function"==typeof e.navigate&&n instanceof HTMLAnchorElement&&e.href&&!t.isDefaultPrevented()&&u(n,t)&&(t.preventDefault(),e.navigate(e.href,e.routerOptions))},l=e.disabled||e.current;let s={title:r,onClick:a,"aria-disabled":!!l||void 0};return"a"===t?(s.href=e.href,s.hrefLang=e.hrefLang,s.target=e.target,s.rel="_blank"!==e.target||e.rel?e.rel:"noopener noreferrer",s.download=e.download,s.ping=e.ping,s.referrerPolicy=e.referrerPolicy):(s.role="link",s.tabIndex=l?void 0:0,s.onKeyDown=e=>{"Enter"===e.key&&a(e)}),e.current&&(s["aria-current"]="page"),"menu"===e.itemType&&(s={}),o.createElement(t,Object.assign({},n,s,{className:"menu"===e.itemType?d("menu"):d("link",{"is-current":e.current,"is-disabled":l&&!e.current})}),e.children)}function h({separator:e}){return o.createElement("div",{"aria-hidden":!0,className:d("divider")},null!=e?e:"/")}m.displayName="Breadcrumbs.Item",h.displayName="Breadcrumbs.Separator";var p=n(54205);const b=JSON.parse('{"breadcrumbs":"Breadcrumbs","label_more":"Show more"}'),_=JSON.parse('{"breadcrumbs":"Навигация","label_more":"Показать больше"}'),v=(0,p.N)({en:b,ru:_},"lab/Breadcrumbs");function f(e){return null}const y=o.forwardRef((function(e,t){const n=o.useRef(null),r=(0,l.N)(t,n),a=[];o.Children.forEach(e.children,((e,t)=>{o.isValidElement(e)&&(void 0!==e.key&&null!==e.key||(e=o.cloneElement(e,{key:t})),a.push(e))}));const[p,b]=o.useState(a.length),[_,f]=o.useState(!1),y=o.useCallback((()=>{f(!1),b(a.length)}),[a.length]);!function({ref:e,onResize:t}){o.useEffect((()=>{const n=null==e?void 0:e.current;if(!n)return;if(void 0===window.ResizeObserver)return window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)};const r=new ResizeObserver((e=>{e.length&&t()}));return r.observe(n),()=>{r.disconnect()}}),[e,t])}({ref:n,onResize:y});const g=o.useRef(null);o.useLayoutEffect((()=>{_&&e.children!==g.current&&(g.current=e.children,f(!1),b(a.length))}),[_,a.length,e.children]),o.useLayoutEffect((()=>{_||(t=>{const r=n.current;if(!r)return;const o=Array.from(r.children);if(0===o.length)return;const l=r.offsetWidth;let s=0,i=0,c=e.maxItems||1/0,u=0;if(e.showRoot){const e=o.shift();e&&(u=e.scrollWidth,i+=u),s++}if(a.length>t){const e=o.shift();e&&(i+=e.offsetWidth),c--}e.showRoot&&i>=l&&(i-=u,s--);const d=o.pop();d&&(i+=Math.min(d.offsetWidth,200),i<l&&s++);for(let e=o.length-1;e>=0&&(i+=o[e].offsetWidth,!(i>=l));e--)s++;s=Math.max(Math.min(c,s),1),s===p?f(!0):b(s)})(p)}));const{navigate:A}=e;let x=a;if(a.length>p){x=[];const t=[...a];let n=p;if(e.showRoot&&p>1){const e=t.shift();e&&x.push(e),n--}const r=t.slice(0,-n),l=o.createElement(m,{itemType:"menu"},o.createElement(i.r,{items:r.map(((t,n)=>Object.assign(Object.assign({},t.props),{text:t.props.children,disabled:e.disabled,items:[],action:r=>{var a;"function"==typeof e.onAction&&e.onAction(null!==(a=t.key)&&void 0!==a?a:n);const o=r.currentTarget;"function"==typeof A&&o instanceof HTMLAnchorElement&&t.props.href&&u(o,r)&&(r.preventDefault(),A(t.props.href,t.props.routerOptions))}}))),popupProps:{className:d("popup",{staircase:"staircase"===e.popupStyle}),placement:e.popupPlacement},renderSwitcher:({onClick:t})=>o.createElement(s.$,{title:v("label_more"),className:d("more-button"),onClick:t,size:"s",view:"flat",disabled:e.disabled},o.createElement(s.$.Icon,null,"..."))}));x.push(l),x.push(...t.slice(-n))}const w=x.length-1,N=x.map(((t,n)=>{var r;const a=n===w,l=null!==(r=t.key)&&void 0!==r?r:n;return o.createElement("li",{key:n,className:d("item",{calculating:!_})},o.createElement(m,Object.assign({},t.props,{key:l,current:a,disabled:e.disabled,onAction:()=>{"function"==typeof e.onAction&&e.onAction(l)},navigate:A}),t.props.children),a?null:o.createElement(h,{separator:e.separator}))}));return o.createElement("ol",Object.assign({ref:r},(0,c.$)(e,{labelable:!0}),{"data-qa":e.qa,className:d(null,e.className),style:e.style}),N)}));y.Item=f,y.displayName="Breadcrumbs";var g=n(76872),A=n(64922),x=["children"],w=(0,g.A)("yt-u-breadcrumbs"),N=function(e){var t=e.children,n=(0,a.A)(e,x);return(0,A.jsx)(y,(0,r.A)((0,r.A)({},n),{},{className:w(null,n.className),children:t}))}},42324:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(77810),a=n(76426),o=n(60620),l=n(64922);function s(e){var t=e.className,n=e.url,s=e.title,i=e.theme,c=e.children,u=e.hideIcon,d=e.face,m=e.wrapContent;if(!n)return null;var h=u?null:(0,l.jsx)(o.A,{awesome:"chart-bar",face:d}),p=c?(0,l.jsxs)(r.Fragment,{children:[h,c]}):h;return(0,l.jsx)(a.A,{className:t,target:"_blank",theme:i,url:n,title:null!=s?s:"View",children:m?m(p):p})}const i=r.memo(s)},79484:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(40319),a=n(29121),o=n(12937),l=n(10785),s=n(26718),i=n(77810),c=n(75826),u=n.n(c),d=n(76872),m=n(27528),h=n.n(m),p=n(55695),b=n(92423),_=n(60620),v=n(39566),f=n(64922),y=(0,d.A)("favourites"),g=function(e){(0,l.A)(n,e);var t=(0,s.A)(n);function n(){var e;(0,a.A)(this,n);for(var r=arguments.length,o=new Array(r),l=0;l<r;l++)o[l]=arguments[l];return(e=t.call.apply(t,[this].concat(o))).state={isActive:e.props.isActive},e.toggleActive=function(){var t=e.props.onToggle;e.setState((function(e){return{isActive:!e.isActive}})),t()},e.onItemClick=function(t){(0,e.props.onItemClick)(t)},e}return(0,o.A)(n,[{key:"renderDropDownMenu",value:function(){var e=this,t=this.props.items,n=h()(t,(function(t){return{text:t.path,action:function(){return e.onItemClick(t)}}}));0===t.length&&n.push({action:function(){},text:"No favourites"});var r=this.renderButton({view:"normal",size:"m",pin:"brick-round",title:"View favourites",children:(0,f.jsx)(_.A,{awesome:"angle-down"})});return(0,f.jsx)(p.r,{popupProps:{className:y("popup",{empty:0===t.length})},items:n,switcher:r})}},{key:"renderHotkey",value:function(){return(0,f.jsx)(v.A,{settings:[{keys:"f",handler:this.toggleActive,scope:"all"}]})}},{key:"renderButton",value:function(e){var t=this.props.theme?{view:"outlined"}:{};return(0,f.jsx)(b.$,(0,r.A)((0,r.A)({},e),t))}},{key:"render",value:function(){var e=this.props,t=e.toggleDisabled,n=e.className,r=e.theme,a=this.state.isActive;return(0,f.jsxs)("div",{className:y(null,n),children:[(0,f.jsx)("div",{className:y("star-btn",{clear:"clear"===r}),children:this.renderButton({view:"outlined-info",selected:a,size:"m",pin:"clear"===r?"round-brick":"round-clear",title:"Add to favourites [F]",onClick:this.toggleActive,disabled:t,children:(0,f.jsx)(_.A,{awesome:a?"star-alt":"star"})})}),this.renderDropDownMenu(),this.renderHotkey()]})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isActive!==t.isActive?{isActive:e.isActive}:null}}]),n}(i.Component);g.itemType=u().shape({path:u().string})},53615:(e,t,n)=>{"use strict";n.d(t,{R:()=>c}),n(77810);var r=n(76872),a=n(72679),o=n(40319),l=n(64922);const s=function(e){return(0,l.jsx)("svg",(0,o.A)((0,o.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"},e),{},{children:(0,l.jsx)("path",{fill:"#027BF3",d:"M7 .828C3.521.828.703 3.672.703 7.125A6.296 6.296 0 0 0 7 13.422c3.453 0 6.297-2.818 6.297-6.297C13.297 3.672 10.453.828 7 .828m0 11.375a5.06 5.06 0 0 1-5.078-5.078A5.077 5.077 0 0 1 7 2.047c2.793 0 5.078 2.285 5.078 5.078A5.077 5.077 0 0 1 7 12.203m0-8.582c-.61 0-1.066.483-1.066 1.067 0 .609.457 1.066 1.066 1.066.584 0 1.066-.457 1.066-1.066 0-.584-.482-1.067-1.066-1.067m1.422 6.45v-.61a.33.33 0 0 0-.305-.305h-.305V6.617a.33.33 0 0 0-.304-.304H5.883a.31.31 0 0 0-.305.304v.61c0 .177.127.304.305.304h.305v1.625h-.305a.31.31 0 0 0-.305.305v.61c0 .177.127.304.305.304h2.234a.31.31 0 0 0 .305-.305"})}))};var i=(0,r.A)("info-block");function c(e){var t=e.children,n=e.className;return(0,l.jsxs)("div",{className:i(null,n),children:[(0,l.jsx)("div",{className:i("icon"),children:(0,l.jsx)(a.I,{data:s})}),(0,l.jsx)("div",{className:i("body"),children:t})]})}},80016:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});var r=n(9736),a=n(77810),o=n(15647),l=n(11843),s=n(27652);function i(e){var t=e.children,n=(0,o.d4)(l.Y),i=n.regular,c=n.monospace,u=a.useState(!1),d=(0,r.A)(u,2),m=d[0],h=d[1];return a.useEffect((function(){Promise.all([(0,s.w)(i),(0,s.w)(c)]).then((function(){return h(!0)}))}),[i,c]),m?t:null}},35762:(e,t,n)=>{"use strict";n.d(t,{h:()=>l}),n(77810);var r=n(76872),a=n(64922),o=(0,r.A)("bundle-params-list"),l=function(e){var t=e.className,n=e.params,r=e.size,l=void 0===r?"s":r;return(0,a.jsx)("div",{className:o({size:l},t),children:n.map((function(e){return(0,a.jsxs)("span",{children:[e.title," ",(0,a.jsxs)("span",{className:o("value",{type:e.type}),children:[e.value," ",e.postfix]})]},e.title)}))})}},19899:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ChaosCellBundlesTopRow:()=>qr,TabletCellBundles:()=>Br,TabletCellBundlesTopRow:()=>Pr});var r=n(40319),a=n(68175),o=n(77810),l=n(76872),s=n(75414),i=n.n(s),c=n(83611),u=n(42265),d=n(64965),m=n(69835),h=n(83534),p=n(15647),b=n(13322),_=n(29121),v=n(12937),f=n(10785),y=n(26718),g=n(49214),A=n.n(g),x=n(28640),w=n(84162),N=n(33023),C=n(77723),j=n(64922),B=(0,l.A)("cells-table-instruments");const k=function(e){(0,f.A)(n,e);var t=(0,y.A)(n);function n(){var e;(0,_.A)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).onIdFilter=function(t){e.props.setTabletsPartial({cellsIdFilter:t})},e.onBundleFilter=function(t){e.props.setTabletsPartial({cellsBundleFilter:t})},e.onHostFilterChange=function(t){e.onHostSelected(t)},e.onHostSelected=function(t){e.props.setTabletsPartial({cellsHostFilter:t})},e.onHostInputBlur=function(){e.setState({hostFilter:e.props.hostFilter})},e.getBundleFilterItems=function(t){var n=e.props.bundles;return t?A()(n,(function(){return-1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").indexOf(t)})):n},e.getHostFilterItems=function(t){var n=e.props.hosts;return t?A()(n,(function(){return-1!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").indexOf(t)})):n},e}return(0,v.A)(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.idFilter,a=t.bundleFilter,o=t.activeBundle,l=t.activeBundleHosts;return(0,j.jsx)(N.M,{className:B(null,n),itemsToWrap:[{name:"id1",node:(0,j.jsx)(w.A,{className:B("text-filter"),hasClear:!0,size:"m",type:"text",value:r,placeholder:"Enter cell id...",onChange:this.onIdFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:B("item")}].concat((0,b.A)(o?[]:[{name:"bundle",node:(0,j.jsx)(C.A,{className:B("suggest"),text:a,apply:function(t){return e.onBundleFilter("string"==typeof t?t:t.value)},filter:function(t,n){return e.getBundleFilterItems(n)},placeholder:"Enter bundle name...",popupClassName:B("suggest-popup")}),growable:!0,shrinkable:!0,wrapperClassName:B("item")}]),[{name:"host",node:(0,j.jsx)(C.A,{className:B("suggest"),text:this.props.hostFilter,onTextUpdate:this.onHostFilterChange,onItemClick:function(t){return e.onHostSelected("string"==typeof t?t:t.value)},onBlur:this.onHostInputBlur,filter:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.getHostFilterItems(n)},placeholder:"Enter host...",autoFocus:!1,popupClassName:B("suggest-popup")}),growable:!0,shrinkable:!0,wrapperClassName:B("item")}],(0,b.A)(l?[{name:"copy-hosts",node:(0,j.jsx)(x.A,{pin:"round",text:l,awesome:"clipboard-list",buttonText:"Copy host list"})}]:[]))})}}]),n}(o.Component);var T=n(92547),E=n(9736),L=n(27528),S=n.n(L),F=n(90943),z=n.n(F),R=n(73928),O=n(13724),D=n(85749),I=n(623),P=n.n(I),U=n(48971),q=n(27497),H=n(64714),M=n(13542),V=n(63582),W=n(76365),Q=n(40519),Y=new W.A;function K(){return function(e){e({type:u.Nj});var t=[{command:"exists",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles"}},{command:"list",parameters:(0,r.A)({path:"//sys/tablet_cells",attributes:["peers","id","tablet_cell_bundle","total_statistics","status"]},Q.v)},{command:"get",parameters:(0,r.A)({path:"//sys/tablet_cell_bundles",attributes:["nodes","enable_bundle_balancer","health","options","node_tag_filter","resource_limits","resource_usage","folder_id","abc","dynamic_options","bundle_controller_target_config","enable_bundle_controller","zone"]},Q.v)}];return Y.removeAllRequests(),H.Qq.executeBatch(H.Vu.tabletCellBundles,{parameters:{requests:t},cancellation:Y.saveCancelToken}).then((function(t){var n=(0,T.A)(t),r=n[0].output,a=n.slice(1),o=(0,E.A)(a,2),l=o[0].output,s=o[1].output,c=(0,U.$7)(a,"Tablet cell bundles cannot be loaded");if(c)throw c;var d=(0,R.VY)(l),m=(0,R.Th)(d,s),h=function(e){var t=new Map;return e.forEach((function(e){var n=e.bundle;t.has(n)||t.set(n,!0)})),(0,b.A)(t.keys())}(m);e(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function(t,n){var r=(0,q.ID)(n()),a=S()(e,(function(e){return(0,V.jQ)({path:"//sys/tablet_cell_bundles/".concat(e.bundle),user:r,permission:"write"})}));return(0,U.fI)(H.Qq.executeBatch(H.Vu.tabletBundlesCheckWrite,{parameters:{requests:a},cancellation:Y.saveCancelToken}).then((function(n){var r=(0,U.hC)(n,"Failed to get bundle permissions"),a=r.error,o=r.outputs,l=i()(o,(function(t,n,r){if("allow"===(null==n?void 0:n.action)){var a=e[r].bundle;t.set(a,!0)}return t}),new Map);return t({type:u.Kh,data:{writableByName:l}}),a?Promise.reject(a):void 0})),{toasterName:"bundleWritePermissions",skipSuccessToast:!0,errorTitle:"Fetch write permissions"})}}(m)),h.length&&r?H.Qq.get(H.Vu.bundleControllerZones,{parameters:{path:"//sys/bundle_controller/controller/zones",attributes:["tablet_node_sizes","rpc_proxy_sizes","data_centers"]},cancellation:Y.saveCancelToken}).then((function(t){var n=function(e){return Object.entries(e).reduce((function(e,t){var n=(0,E.A)(t,2),r=n[0],a=n[1];return e[r]=z().getValue(a,"/@"),e}),Object.create(null))}(t);e({type:u.ds,data:{cells:d,bundles:m,bundleDefaultConfig:n}})})).catch((function(t){(0,W.m)(t)||e({type:u.m2,data:t})})):e({type:u.ds,data:{cells:d,bundles:m}})})).catch((function(t){(0,W.m)(t)||e({type:u.m2,data:t})}))}}function G(e){return{type:u.Kh,data:e}}function X(e){return function(t){t((0,O.MV)(e)),t({type:u.p9,data:{activeBundle:e}})}}var $={setTabletsPartial:G};const Z=(0,p.Ng)((function(e){return{activeBundle:(0,D.OR)(e),activeBundleHosts:(0,D.j4)(e),idFilter:(0,D.GV)(e),bundleFilter:(0,D.HS)(e),hostFilter:(0,D.HH)(e),bundles:(0,D.Eg)(e),hosts:(0,D.u6)(e)}}),$)(k);var J=n(88314),ee=n.n(J),te=n(27222),ne=n(14880),re=n(34413),ae=n(77318),oe=n(60620),le=n(81970),se=n(76426),ie=n(34380),ce=n(35074),ue=n(65873),de=n(82053),me=n.n(de),he=n(29746),pe=n(37175),be=n(7787),_e=(0,l.A)("bundle-general-meta");function ve(e){var t=e.value,n=void 0===t||t,r=e.blocking;return(0,j.jsx)("span",{className:_e("bb",{success:n,blocking:r}),children:n?"on":"off"})}var fe={good:"success",initializing:"warning",degrading:"warning",failed:"danger",changing:"info"};function ye(e){var t=e.value,n=e.className,r=fe[t||""];return t?(0,j.jsx)(le.A,{className:n,theme:r,children:t}):me().format.NO_VALUE}function ge(){var e=(0,p.d4)(D.EA),t=(0,p.d4)(q.jU),n=(0,p.d4)(q.dB),r=(0,p.d4)(q.qp);if(!e)return null;var a=[].concat((0,b.A)(be.Ay.getExtraMetaTableItemsForBundle({bundle:e,clusterUiConfig:t})||[]),[{key:"Health",value:(0,j.jsx)(ye,{value:e.health})},{key:"Tablet cells",value:me().format.Number(e.tabletCells)},{key:"Tablets",value:me().format.Number(e.tablets),visible:!r},{key:"Bundle controller",value:(0,j.jsx)(ve,{value:e.enable_bundle_controller})},{key:"Bundle balancer",value:(0,j.jsx)(ve,{value:e.enable_bundle_balancer,blocking:e.enable_bundle_controller})},{key:"Node tag filter",value:e.node_tag_filter||me().format.NO_VALUE}]),o=[{key:"Memory",value:me().format.Bytes(e.memory),visible:!r},{key:"Tablets",value:Ae(e,"tablet_count"),visible:r},{key:"Tablet static memory",value:Ae(e,"tablet_static_memory"),visible:r},{key:"Uncompressed size",value:me().format.Bytes(e.uncompressed)},{key:"Compressed size",value:me().format.Bytes(e.compressed)},{key:"Changelog account",value:e.changelog_account?(0,j.jsx)(pe.A,{className:_e("account-link"),account:e.changelog_account,cluster:n}):me().format.NO_VALUE},{key:"Snapshot account",value:e.snapshot_account?(0,j.jsx)(pe.A,{className:_e("account-link"),account:e.snapshot_account,cluster:n}):me().format.NO_VALUE}];return(0,j.jsx)(ce.Ay,{className:_e(),items:[a,o],title:"General"})}function Ae(e,t){var n=he.Ay.getValue(e,"/resource_usage/".concat(t)),a=he.Ay.getValue(e,"/resource_limits/".concat(t)),o="tablet_static_memory"===t?"Bytes":"Number",l=(0,U.z)(n,a,o);return(0,j.jsx)(ue.k,(0,r.A)({className:_e("progress")},l))}var xe=n(17955),we=(0,l.A)("cells-table"),Ne={leading:"success",none:"default",elections:"warning",leader_recovery:"warning"},Ce={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyTop:h.kB,syncHeadOnResize:!0,dynamicRender:!0},je={id:"Cell id",uncompressed:"Uncompressed size",compressed:"Compressed size",peerAddress:"Node",actions:" "};function Be(e){return(0,j.jsx)("span",{className:we("hover-action"),children:e.children})}function ke(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(0,j.jsx)("div",{className:we("wrapped"),children:e.apply(void 0,(0,b.A)(n))})}}var Te=function(e){(0,f.A)(n,e);var t=(0,y.A)(n);function n(){var e;(0,_.A)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).renderColumnHeader=function(t,n){var r,a=e.props.sortState,o=a.column,l=a.order,s=t===o;return(0,j.jsx)(re.A,{className:we("header-cell",{col:t,sortable:n},"data-table__head-cell"),column:t,title:null!==(r=je[t])&&void 0!==r?r:ee()(t),order:s?l:void 0,onSort:e.onColumnSort,withUndefined:!0})},e.onColumnSort=function(t,n){e.props.setTabletsPartial({cellsSort:{column:t,order:n}})},e.renderId=function(e){var t=((null==e?void 0:e.row)||{}).id;return(0,j.jsxs)("div",{className:we("id"),children:[(0,j.jsx)("span",{className:we("id-id"),children:t}),(0,j.jsx)(Be,{children:(0,j.jsx)(x.A,{view:"flat-secondary",text:t})})]})},e.renderBundle=function(t){var n=e.props,r=n.activeBundleLink,a=n.cluster,o=((null==t?void 0:t.row)||{}).bundle;return(0,j.jsx)(se.A,{routed:!0,theme:"primary",url:r(a,o),onClick:function(){e.props.setTabletsActiveBundle(o)},children:o})},e.renderState=function(e){var t,n=(null!==(t=null==e?void 0:e.row)&&void 0!==t?t:{}).state,r=n?Ne[n]:void 0;return(0,j.jsx)(le.A,{theme:r,type:"text",text:n,capitalize:!0})},e.renderActions=function(t){var n=e.props,r=n.attributesPath,a=n.cellNavigationLink,o=n.cluster,l=((null==t?void 0:t.row)||{}).id;return(0,j.jsxs)("div",{className:we("actions"),children:[(0,j.jsx)(ie.m,{placement:["bottom","top"],content:"Go to Navigation",children:(0,j.jsx)(se.A,{url:a(o,l),theme:"ghost",routed:!0,children:(0,j.jsx)(oe.A,{awesome:"folder"})})}),(0,j.jsx)(ne.A,{size:"m",view:"flat-secondary",title:l,path:r(l)})]})},e}return(0,v.A)(n,[{key:"renderNumber",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Number(n)}},{key:"renderBytes",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Bytes(n)}},{key:"renderHealth",value:function(e){var t=((null==e?void 0:e.row)||{}).health;return(0,j.jsx)(ye,{value:t})}},{key:"renderHost",value:function(e){var t;return(0,j.jsx)(xe.x,{asTabletNode:!0,address:null==e||null===(t=e.row)||void 0===t?void 0:t.peerAddress,copyBtnClassName:we("hover-action")})}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{name:e,align:"left",sortable:!1,className:we("td",{col:e.toLocaleLowerCase()}),header:this.renderColumnHeader(e,t)}}},{key:"sortableColumn",value:function(e){return this.column(e,!0)}},{key:"render",value:function(){var e=this,t=this.props.columns.map((function(t){return Ee[t].call(e)})),n=this.props,r=n.data,a=n.loading,o=n.loaded;return(0,j.jsx)("div",{className:we(),children:(0,j.jsx)(ae.Ay,{loading:a,loaded:o,columns:t,data:r,settings:Ce,theme:"bundles-table"})})}}]),n}(o.Component),Ee={id:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("id")),{},{render:this.renderId,width:400})},bundle:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("bundle")),{},{render:ke(this.renderBundle)})},health:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("health")),{},{render:ke(this.renderHealth),width:80})},tablets:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablets")),{},{render:ke(this.renderNumber.bind(this,"tablets")),align:"right",width:100})},memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("memory")),{},{render:ke(this.renderBytes.bind(this,"memory")),align:"right",width:100})},uncompressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("uncompressed")),{},{render:ke(this.renderBytes.bind(this,"uncompressed")),align:"right",width:150})},compressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("compressed")),{},{render:ke(this.renderBytes.bind(this,"compressed")),align:"right",width:130})},peerAddress:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("peerAddress")),{},{render:this.renderHost,width:130})},state:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("state")),{},{render:ke(this.renderState),width:100})},actions:function(){return(0,r.A)((0,r.A)({},this.column("actions")),{},{render:this.renderActions,width:70})}};const Le=Te;var Se=["id","bundle","health","tablets","memory","uncompressed","compressed","peerAddress","state","actions"],Fe={setTabletsPartial:G,setTabletsActiveBundle:X};const ze=(0,p.Ng)((function(e){return{cluster:(0,q.dB)(e),loading:(0,D.U7)(e),loaded:(0,D.HF)(e),data:(0,D.It)(e),sortState:(0,D.AC)(e),columns:Se,activeBundleLink:R.d7,attributesPath:R.dh,cellNavigationLink:R.lX}}),Fe)(Le);function Re(){return(0,j.jsx)(m.A,{children:(0,j.jsx)(h.Ay,{toolbar:(0,j.jsx)(Z,{}),content:(0,j.jsx)(ze,{})})})}var Oe=n(53332),De=n(13685),Ie=n(94285);function Pe(e){return{type:u.lr,data:e}}function Ue(e){return function(t){t((0,O.MV)(e)),t({type:u.SQ,data:{activeBundle:e}})}}var qe=n(82060),He=n(18472);const Me=e=>o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),o.createElement("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 11ZM8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.44 4.54c.43-.354.994-.565 1.56-.565 1.217 0 2.34.82 2.34 2.14 0 .377-.079.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.326.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.543.543 0 0 0 .074-.312c0-.3-.243-.641-.839-.641a.997.997 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 1 1-1.5 0c0-.674.345-1.22.78-1.577ZM8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}));var Ve=n(14633),We=n(72679);const Qe=(0,n(65986).o)("help-popover");function Ye(e){var t;return o.createElement(Ve.A,Object.assign({},e,{className:Qe(null,e.className)}),o.createElement("button",Object.assign({ref:e.buttonRef,type:"button"},e.buttonProps,{className:Qe("button",null===(t=e.buttonProps)||void 0===t?void 0:t.className)}),o.createElement(We.I,{data:Me,size:16})))}var Ke=n(2211),Ge=n(42324),Xe=n(80016),$e=(0,l.A)("bundles-table"),Ze={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyFooter:te.Ay.MOVING,stickyTop:h.kB,stickyBottom:0,syncHeadOnResize:!0,dynamicRender:!0},Je={bundle:"Bundle / Node tag filter",tabletCells:"Cells",uncompressed:"Uncompressed size",compressed:"Compressed size",enable_bundle_controller:"Bundle controller",enable_bundle_balancer:"Bundle balancer",changelog_account:"Changelog and Snapshot account",node_tag_filter:"Node tag filter",actions:" ",tablet_count:"Usage",tablet_count_limit:"Limit",tablet_count_free:"Free",tablet_count_percentage:"Percentage",tablet_static_memory:"Usage",tablet_static_memory_limit:"Limit",tablet_static_memory_free:"Free",tablet_static_memory_percentage:"Percentage"},et={enable_bundle_balancer:"BB",enable_bundle_controller:"BC"};function tt(e){var t=e.bundle,n=e.copyHostListToClipboard,r=o.useCallback((function(){return n(t)}),[t,n]);return(0,j.jsx)("div",{className:$e("actions-copy-hosts"),onClick:r,children:(0,j.jsx)(ie.m,{content:(0,j.jsx)("span",{className:$e("no-wrap"),children:"Copy hosts to clipboard"}),placement:"bottom-start",children:(0,j.jsx)(x.A,{view:"flat-secondary",onCopy:r})})})}var nt=function(e){(0,f.A)(n,e);var t=(0,y.A)(n);function n(){var e;(0,_.A)(this,n);for(var r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];return(e=t.call.apply(t,[this].concat(a))).renderColumnHeader=function(t,n){var r=e.props.sortState||{},a=r.column,o=r.order,l=t===a;return(0,j.jsx)(re.A,{className:$e("header-cell",{col:t,sortable:n},"data-table__head-cell"),column:t,title:Je[t],shortTitle:et[t],order:l?o:void 0,onSort:n?e.onColumnSort:void 0,withUndefined:!0})},e.onColumnSort=function(t,n){e.props.setBundlesSortState({column:t,order:n})},e.renderBundle=function(t){var n,r=e.props,a=r.activeBundleLink,o=r.cluster,l=r.clusterUiConfig,s=(null==t?void 0:t.row)||{},i=s.bundle,c=s.node_tag_filter,u=s.enable_bundle_controller,d=Boolean(c);return(0,j.jsxs)("div",{className:$e("bundle"),children:[(0,j.jsxs)("div",{className:$e("name",{has_tag:d}),children:[i?(0,j.jsx)(se.A,{routed:!0,theme:"primary",url:a(o,i,u),onClick:function(){e.props.setActiveBundle(i)},children:null==t||null===(n=t.row)||void 0===n?void 0:n.bundle}):"Total",d&&(0,j.jsx)("span",{className:$e("name-tag"),children:c})]}),be.Ay.renderBundlesTableItemExtraControls({bundle:t.row,clusterUiConfig:l,itemClassName:$e("extra-control")})]})},e.renderAccount=function(t){var n=e.props.cluster,r=(null==t?void 0:t.row)||{},a=r.changelog_account,l=r.snapshot_account;return(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)(pe.A,{cluster:n,account:a}),a!==l&&(0,j.jsxs)(o.Fragment,{children:[", ",(0,j.jsx)(pe.A,{cluster:n,account:l})]})]})},e.renderNodes=function(e){var t=(null==e?void 0:e.row)||{},n=t.nodes,r=t.node_tag_filter,a=t.unique_node_tag,o=t.bundle;if(!a&&o){var l='This bundle shares nodes with other bundles having node tag filter\n "'.concat(r,'". Actual amount of available resources depends on the number of tablet cells and may\n be less than displayed in this column.');return(0,j.jsxs)("div",{className:$e("nodes"),children:[(0,j.jsx)(Ye,{className:$e("help-tooltip"),delayClosing:50,placement:"auto",content:l}),null==n?void 0:n.length]})}return null==n?void 0:n.length},e.renderActions=function(t){var n=e.props,r=n.allowPerBundleAccounting,a=n.bundleDashboardUrl,o=n.cluster,l=n.copyHostListToClipboard,s=n.pathPrefix,i=n.showCellBundleEditor,c=n.writeableByName,u=(null==t?void 0:t.row)||{},d=u.bundle,m=u.nodes,h=u.enable_bundle_controller;if(d){var p="".concat(s).concat(d),b=null!=h?h:null==c?void 0:c.get(d);return(0,j.jsxs)("div",{className:$e("actions"),children:[(0,j.jsx)("div",{className:$e("actions-attrs"),children:(0,j.jsx)(ne.A,{size:"m",view:"flat-secondary",title:p,path:p})}),r&&b&&(0,j.jsx)("div",{className:$e("actions-attrs"),children:(0,j.jsx)(Ke.A,{size:"m",view:"flat-secondary",onClick:function(){return i(d)},children:(0,j.jsx)(oe.A,{awesome:"pencil"})})}),a&&(0,j.jsx)("div",{className:$e("actions-attrs"),children:(0,j.jsx)(Ge.A,{url:a(o,d),wrapContent:function(e){return(0,j.jsx)(Ke.A,{size:"m",view:"flat-secondary",children:e})}})}),m&&m.length>0&&(0,j.jsx)(tt,{bundle:d,copyHostListToClipboard:l})]})}},e}return(0,v.A)(n,[{key:"renderNumber",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Number(n)}},{key:"renderBytes",value:function(e,t){var n=((null==t?void 0:t.row)||{})[e];return me().format.Bytes(n)}},{key:"renderBB",value:function(e){var t=(null==e?void 0:e.row)||{},n=t.bundle,r=t.enable_bundle_balancer;return n?(0,j.jsx)(ve,{value:r}):null}},{key:"renderBC",value:function(e){var t=(null==e?void 0:e.row)||{},n=t.bundle,r=t.enable_bundle_controller;return n?(0,j.jsx)(ve,{value:r}):null}},{key:"renderHealth",value:function(e){var t=((null==e?void 0:e.row)||{}).health;return(0,j.jsx)(ye,{value:t})}},{key:"renderTabletCountPercentage",value:function(e){if(void 0===e.row.tablet_count_percentage)return me().format.NO_VALUE;var t=e.row,n=t.tablet_count,r=t.tablet_count_limit,a=(0,U.z)(n,r,"Number"),o=a.value,l=a.theme,s=a.text;return void 0===o?me().format.NO_VALUE:(0,j.jsx)(ue.k,{value:o,theme:l,text:s})}},{key:"renderTabletStaticMemoryPercentage",value:function(e){if(void 0===e.row.tablet_static_memory_percentage)return me().format.NO_VALUE;var t=e.row,n=t.tablet_static_memory,r=t.tablet_static_memory_limit,a=(0,U.z)(n,r,"Bytes"),o=a.value,l=a.theme,s=a.text;return void 0===o?me().format.NO_VALUE:(0,j.jsx)(ue.k,{value:o,theme:l,text:s})}},{key:"column",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{name:e,align:"left",sortable:!1,className:$e("td",{col:e.toLowerCase()}),header:this.renderColumnHeader(e,t)}}},{key:"sortableColumn",value:function(e){return this.column(e,!0)}},{key:"render",value:function(){var e=this,t=this.props.columns.map((function(t){return rt[t].call(e)})),n=this.props,r=n.data,a=n.total,o=n.loading,l=n.loaded;return(0,j.jsx)("div",{className:$e(),children:(0,j.jsx)(Xe.w,{children:(0,j.jsx)(ae.Ay,{loading:o,loaded:l,columns:t,data:r,settings:Ze,theme:"bundles-table",footerData:r.length?[a]:void 0})})})}}]),n}(o.Component),rt={bundle:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("bundle")),{},{render:this.renderBundle})},tablet_count_percentage:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_percentage")),{},{render:this.renderTabletCountPercentage,width:260,align:"center"})},tablet_count:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count")),{},{render:this.renderNumber.bind(this,"tablet_count"),align:"right",width:150})},tablet_count_limit:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_limit")),{},{render:this.renderNumber.bind(this,"tablet_count_limit"),align:"right",width:150})},tablet_count_free:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_count_free")),{},{render:this.renderNumber.bind(this,"tablet_count_free"),align:"right",width:150})},tablet_static_memory_percentage:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_percentage")),{},{render:this.renderTabletStaticMemoryPercentage,width:260,align:"center"})},tablet_static_memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory")),{},{render:this.renderBytes.bind(this,"tablet_static_memory"),align:"right",width:150})},tablet_static_memory_limit:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_limit")),{},{render:this.renderBytes.bind(this,"tablet_static_memory_limit"),align:"right",width:150})},tablet_static_memory_free:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablet_static_memory_free")),{},{render:this.renderBytes.bind(this,"tablet_static_memory_free"),align:"right",width:150})},health:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("health")),{},{render:this.renderHealth,align:"center",width:110})},nodes:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("nodes")),{},{render:this.renderNodes,align:"right",width:85})},tabletCells:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tabletCells")),{},{render:this.renderNumber.bind(this,"tabletCells"),align:"right",width:85})},tablets:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("tablets")),{},{render:this.renderNumber.bind(this,"tablets"),align:"right",width:100})},memory:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("memory")),{},{render:this.renderBytes.bind(this,"memory"),align:"right",width:100})},uncompressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("uncompressed")),{},{align:"right",render:this.renderBytes.bind(this,"uncompressed"),width:150})},compressed:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("compressed")),{},{align:"right",render:this.renderBytes.bind(this,"compressed"),width:120})},enable_bundle_balancer:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("enable_bundle_balancer")),{},{align:"center",render:this.renderBB,width:80})},enable_bundle_controller:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("enable_bundle_controller")),{},{align:"center",render:this.renderBC,width:80})},changelog_account:function(){return(0,r.A)((0,r.A)({},this.sortableColumn("changelog_account")),{},{render:this.renderAccount,width:235})},actions:function(){return(0,r.A)((0,r.A)({},this.column("actions")),{},{render:this.renderActions,width:100})}};const at=nt;var ot=n(39760),lt=n.n(ot),st=n(65304),it=n.n(st),ct=n(73822),ut=n(26777),dt=n(84092),mt=n.n(dt);function ht(e){return function(t,n){var a=n();t({type:u.N5,data:{bundleName:e}});var o=(0,D.p0)(a).find((function(t){return t.bundle===e}));if(!o)return Promise.resolve();var l=(0,D.q8)(a),s=[{command:"get",parameters:{path:"//sys/tablet_cell_bundles/".concat(e),attributes:["resource_usage","resource_limits","options","abc","folder_id","zone","enable_bundle_controller"]}}];return o.enable_bundle_controller&&s.push({command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(e)}}),(0,U.fI)(H.Qq.executeBatch(H.Vu.tabletCellBundlesEditData,{requests:s}).then((function(e){var t,n=o.enable_bundle_controller&&(null===(t=e[2])||void 0===t||null===(t=t.error)||void 0===t?void 0:t.code)===mt().codes.NODE_DOES_NOT_EXIST,r=(0,U.$7)(n?[e[0]]:e,"Failed to get bundle edit data");if(r)throw r;return e})),{toasterName:"edit-bundle-data",skipSuccessToast:!0,errorContent:"Failed to load bundle details"}).then((function(e){var n,a,s=e,i=(0,E.A)(s,2),c=i[0].output,d=i[1],m=(void 0===d?{output:void 0}:d).output,h=o;null!==(n=o.bundle_controller_target_config)&&void 0!==n&&n.memory_limits.reserved||!l||(h=(0,r.A)((0,r.A)({},o),{},{bundle_controller_target_config:(0,r.A)((0,r.A)({},o.bundle_controller_target_config),{},{memory_limits:(0,r.A)((0,r.A)({},null===(a=o.bundle_controller_target_config)||void 0===a?void 0:a.memory_limits),{},{reserved:l})})})),t({type:u.V,data:{bundleData:h,data:c,bundleControllerData:m}});var p=[].concat((0,b.A)(S()(null==m?void 0:m.allocated_tablet_nodes,(function(e,t){return[(0,ut.Sz)("get",{path:"//sys/cluster_nodes/".concat(t,"/@bundle_controller_annotations/nanny_service")}),(0,ut.Sz)("get",{path:"//sys/cluster_nodes/".concat(t,"/@statistics/memory/tablet_static")})]}))),(0,b.A)(S()(null==m?void 0:m.allocated_rpc_proxies,(function(e,t){return[(0,ut.Sz)("get",{path:"//sys/rpc_proxies/".concat(t,"/@bundle_controller_annotations/nanny_service")})]})))),_=[];(0,U.fI)(H.Qq.executeBatch(H.Vu.tabletCellBundlesInstancesDetails,{requests:S()(p,(function(e){return(0,ut.Sz)("execute_batch",{requests:e})}))}),{toasterName:"bundle-controller-tablet-static-memory",skipSuccessToast:!0,errorContent:"BundleController: Cannot load tablet static memory of isntances"}).then((function(e){var n=[].concat((0,b.A)(it()(null==m?void 0:m.allocated_tablet_nodes)),(0,b.A)(it()(null==m?void 0:m.allocated_rpc_proxies))),r={};lt()(e,(function(e,t){var a=e.output,o=e.error;if(o)_.push(o);else{var l=(0,E.A)(a,2),s=l[0].output,i=l[1],c=(void 0===i?{output:void 0}:i).output;r[n[t]]={nanny_service:s,tablet_static_memory:c}}})),t({type:u.Or,data:{instanceDetailsMap:r}})}))})).catch((function(e){return t({type:u.KI,data:e}),Promise.reject(e)}))}}function pt(e){return function(t){t(ht(e)).then((function(){t({type:u.Or,data:{visibleEditor:!0}})}))}}function bt(e){return function(t){var n=e.bundleName,r=e.data,a="//sys/tablet_cell_bundles/".concat(n),o=S()(r,(function(e,t){return(0,ut.Gy)("".concat(a,"/").concat(t),e)}));return(0,U.fI)(H.Qq.executeBatch(H.Vu.tabletCellBundlesSetAttrs,{requests:o}),{toasterName:"edit_bundle_".concat(n),successContent:"Set bundle edit data",batchType:"v3",errorTitle:"Failed to set bundle edit data"}).then((function(){t(K())}))}}var _t=n(94544),vt=(0,He.Mz)([D.Br],(function(e){var t=["bundle"];switch(e){case"tablets":t.push("tablet_count_percentage","tablet_count","tablet_count_limit","tablet_count_free");break;case"tablets_memory":t.push("tablet_static_memory_percentage","tablet_static_memory","tablet_static_memory_limit","tablet_static_memory_free");break;default:t.push("health","nodes","tabletCells","tablets","memory","uncompressed","compressed","enable_bundle_controller","enable_bundle_balancer","changelog_account")}return t.push("actions"),t})),ft={setBundlesSortState:function(e){return{type:u.Kh,data:{bundlesSort:e}}},setActiveBundle:X,showCellBundleEditor:pt};const yt=(0,p.Ng)((function(e){return{loading:(0,D.U7)(e),loaded:(0,D.HF)(e),data:(0,D.kj)(e),total:(0,D.XL)(e),sortState:(0,D.a1)(e),cluster:(0,q.dB)(e),allowPerBundleAccounting:(0,q.qp)(e),pathPrefix:"//sys/tablet_cell_bundles/",columns:vt(e),activeBundleLink:R.d7,bundleDashboardUrl:_t.Ut,writeableByName:(0,D.nX)(e)}}),ft)(at);var gt=n(29347),At=n.n(gt),xt=n(87604);function wt(e){var t=e.bundlesTableMode,n=e.setTabletsPartial,r=e.modes,a=(0,p.wA)(),l=(0,p.d4)(q.qp),s=o.useCallback((function(e){a(n({bundlesTableMode:e.target.value}))}),[a]),i=r.map(xt.A.prepareSimpleValue);return l?(0,j.jsx)(xt.A,{items:i,value:t,onChange:s}):null}const Nt=o.memo(wt);var Ct=(0,l.A)("bundles-table-instruments"),jt=function(e){(0,f.A)(n,e);var t=(0,y.A)(n);function n(){var e;(0,_.A)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(e=t.call.apply(t,[this].concat(a))).onNameEnterKeyDown=function(){e.props.setTabletsFirstBundleAsActive()},e}return(0,v.A)(n,[{key:"render",value:function(){var e=this.props,t=e.accountFilter,n=e.bundlesTableMode,r=e.className,a=e.modes,o=e.nameFilter,l=e.setTabletsPartial,s=e.tagNodeFilter;return(0,j.jsx)(N.M,{className:Ct(null,r),itemsToWrap:At()([{name:"name",node:(0,j.jsx)(w.A,{className:Ct("text-filter"),hasClear:!0,autofocus:!0,size:"m",type:"text",value:o,placeholder:"Enter bundle name...",onChange:this.props.setTabletsBundlesNameFilter,onEnterKeyDown:this.onNameEnterKeyDown}),shrinkable:!0,growable:!0,wrapperClassName:Ct("item")},{name:"account",node:(0,j.jsx)(w.A,{className:Ct("account-filter"),hasClear:!0,size:"m",type:"text",value:t,placeholder:"Enter changelog or snapshot account...",onChange:this.props.setTabletsBundlesAccountFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:Ct("item")},{name:"tagNode",node:(0,j.jsx)(w.A,{className:Ct("account-filter"),hasClear:!0,size:"m",type:"text",value:s,placeholder:"Enter node tag filter...",onChange:this.props.setTabletsBundlesTagNodeFilter,autofocus:!1}),shrinkable:!0,growable:!0,wrapperClassName:Ct("item")},(a.length>1||a[0]!==n)&&{name:"tableMode",node:(0,j.jsx)(Nt,{bundlesTableMode:n,setTabletsPartial:l,modes:a}),shrinkable:!1,growable:!1,wrapperClassName:Ct("item")}])})}}]),n}(o.Component);const Bt=jt;var kt=["default","tablets","tablets_memory"],Tt={setTabletsBundlesNameFilter:function(e){return{type:u.Kh,data:{bundlesNameFilter:e}}},setTabletsBundlesAccountFilter:function(e){return{type:u.Kh,data:{bundlesAccountFilter:e}}},setTabletsBundlesTagNodeFilter:function(e){return{type:u.Kh,data:{bundlesTagNodeFilter:e}}},setTabletsFirstBundleAsActive:function(){return function(e,t){var n=t(),r=(0,D.kj)(n),a=(0,E.A)(r,1)[0];if(a){var o=(0,q.dB)(n);e(X(a.bundle)),(0,M.Q)().push((0,R.d7)(o,a.bundle))}}},setTabletsPartial:G};const Et=(0,p.Ng)((function(e){return{accountFilter:(0,D.CH)(e),bundlesTableMode:(0,D.Br)(e),nameFilter:(0,D.K2)(e),tagNodeFilter:(0,D.Js)(e),modes:kt}}),Tt)(Bt);function Lt(){var e=(0,p.wA)(),t=o.useCallback((function(t){e(function(e){return function(t,n){var r=(0,D.bf)(e,(0,D.xU)(n())),a=(0,D.U5)(r);P()(a||"")}}(t))}),[e]);return o.useEffect((function(){e(X(""))}),[e]),(0,j.jsx)(m.A,{children:(0,j.jsx)(h.Ay,{toolbar:(0,j.jsx)(Et,{}),content:(0,j.jsx)(yt,{copyHostListToClipboard:t})})})}var St=n(73502);function Ft(){var e=(0,p.d4)(q.dB),t=(0,p.d4)(D.OR),n=(0,p.d4)(q.O4);if(!t)return(0,j.jsx)(St.R,{warning:"You don't have any selected bundles",hint:"Please choose one to display charts"});var r=be.Ay.getStatisticsComponentForBundle();return(0,j.jsx)(m.A,{children:(0,j.jsx)(r,{cluster:e,bundle:t,theme:n})})}const zt=o.memo(Ft);function Rt(e){var t=e.component,n=(0,p.d4)(D.EA),r=(0,p.d4)(q.dB),a=o.useMemo((function(){return he.Ay.getValue(n,"/bundle")}),[n]);return a?(0,j.jsx)(m.A,{children:(0,j.jsx)(t,{cluster:r,tablet_cell_bundle:a,bundleData:n})}):(0,j.jsx)(St.R,{warning:"You don't have any selected bundles",hint:"Please choose one to display charts"})}const Ot=o.memo(Rt);var Dt=n(66205),It=n(7452);function Pt(e){var t=e.className,n=(0,p.d4)(D.OR),r=(0,p.d4)(Dt.Nr);return(0,j.jsx)(m.A,{children:r?(0,j.jsx)(It.fw,{path:n,className:t}):(0,j.jsx)(St.R,{className:t,hint:"The cluster is not ready to work with bundle's ACL"})})}var Ut=n(28407),qt=n(70232),Ht=n.n(qt),Mt=n(5458),Vt=n.n(Mt),Wt=n(16737),Qt=n.n(Wt),Yt=(0,l.A)("yt-color-circle");function Kt(e){var t=e.color,n=e.marginRight,r=void 0===n||n;return(0,j.jsx)("div",{className:Yt({"margin-right":r}),style:{backgroundColor:t}})}var Gt=n(16770),Xt=(0,l.A)("bundle-meta-resource-progress");function $t(e,t){var n=t.data,a=t.limit,o=t.resourceType,l=t.postfix,s=function(e){var t=e.data,n=e.limit,r=e.resourceType,a=e.postfix,o={stack:[]},l=i()(t,(function(e,t){return e+Number(t)}),0),s=null!=n?n:l,c="".concat(ct.A.format[r](l)," ").concat(a).trim(),u=[];lt()(t,(function(e,t){var n=ct.A.format[r](e),l=(0,Gt.H)(o.stack.length);u.push({key:t,label:(0,j.jsxs)("span",{children:[(0,j.jsx)(Kt,{color:l,marginRight:!0}),ct.A.format.Readable(t)]}),value:"".concat(n," ").concat(a)});var i=Number(e)/s*100;o.stack.push({color:l,value:i})}));var d=(0,j.jsx)(ce.Ay,{items:u});return{props:o,text:c,commonTooltip:d}}({data:n,limit:a,resourceType:o,postfix:void 0===l?"":l}),c=s.props,u=s.text,d=s.commonTooltip;return{key:e,value:(0,j.jsx)("div",{className:Xt(),children:(0,j.jsx)(ie.m,{placement:"bottom",content:d,children:(0,j.jsx)(ue.k,(0,r.A)((0,r.A)({className:Xt("progress")},c),{},{text:u}))})})}}var Zt=(0,l.A)("bundle-configuration-meta"),Jt=["allocating_rpc_proxy_count","allocating_tablet_node_count","deallocating_rpc_proxy_count","deallocating_tablet_node_count","removing_cell_count"];function en(){var e=(0,p.wA)(),t=(0,p.d4)(D.EA)||{},n=t.bundle,r=t.enable_bundle_controller,a=o.useCallback((function(){n&&e(ht(n))}),[e,n]);(0,De.Tt)(a);var l=o.useRef(null),s=o.useCallback((0,Ut.A)(Ht().mark((function e(){var t,o,s,c,u,d,m,h;return Ht().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&r){e.next=2;break}return e.abrupt("return");case 2:return t=[{command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(n,"/alerts")}}].concat((0,b.A)(S()(Jt,(function(e){return{command:"get",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles/".concat(n,"/").concat(e)}}})))),e.next=5,(0,U.fI)(H.Qq.executeBatch(H.Vu.tabletBundleControllerState,{requests:t}),{toasterName:"active-bundle-controller-status",skipSuccessToast:!0,errorContent:'Cannot load bundle controller details for "'.concat(n,'".')}).catch((function(){return[]}));case 5:if(o=e.sent,s=(0,T.A)(o),c=s[0],u=(void 0===c?{output:[]}:c).output,d=s.slice(1),m=i()(d,(function(e,t){var n=t.output;return e+(null!=n?n:0)}),0),h=an(u,m),null!==l.current){e.next=16;break}return l.current=h,e.abrupt("return");case 16:l.current!==h&&(l.current=h,a());case 17:case"end":return e.stop()}}),e)}))),[a,n,r]);return(0,De.Tt)(s,{timeout:3e3}),null}function tn(){var e=((0,p.d4)(D.EA)||{}).bundle_controller_target_config,t=(0,p.d4)(D.x0);if(!e||!t)return null;var n=[];if(t){var r=t.resource_quota,a=t.resource_allocated,o=r.memory,l=r.vcpu,s=a.memory,c=a.vcpu;n.push(function(e){var t,n,r=e.alerts,a=function(e){var t=e.alerts,n=Vt()(Qt()(e,Jt));return{state:an(t,i()(n,(function(e,t){var n=(0,E.A)(t,2);return n[0],e+n[1]}),0)),detailsEntries:n}}(e),o=a.state,l=a.detailsEntries;return"good"===o?{key:"State",value:(0,j.jsx)(ye,{className:Zt("health",{value:o}),value:o})}:"changing"===o?{key:"State",value:(0,j.jsxs)(ie.m,{content:(t=l,n=t.map((function(e){var t=(0,E.A)(e,2),n=t[0],r=t[1];return"".concat(n," - ").concat(r)})),(0,j.jsx)("ul",{className:Zt("tooltip-list"),children:n.map((function(e,t){return(0,j.jsx)("li",{className:Zt("tooltip-item"),children:e},t)}))})),placement:"bottom",className:Zt("state-with-icon"),children:[(0,j.jsx)(ye,{className:Zt("health",{value:o}),value:o})," ",(0,j.jsx)(oe.A,{awesome:"question-circle"})]})}:{key:"State",value:(0,j.jsxs)(ie.m,{content:on(r),placement:"bottom",className:Zt("state-with-icon"),children:[(0,j.jsx)(ye,{className:Zt("health",{value:o}),value:o})," ",(0,j.jsx)(oe.A,{awesome:"exclamation-triangle"})]})}}(t),nn("Memory allocated/limit",s,o,"Bytes"),nn("vCPU allocated/limit",c,l,"vCores"))}if(void 0!==e.rpc_proxy_count){var u=e.rpc_proxy_count,d=e.rpc_proxy_resource_guarantee,m=d.memory,h=d.vcpu;n.push(rn("RPC proxies",u,m,h))}if(void 0!==e.tablet_node_count){var b=e.tablet_node_count,_=e.tablet_node_resource_guarantee,v=_.memory,f=_.vcpu;n.push(rn("Tablet nodes",b,v,f))}if(e.memory_limits){var y=((null==e?void 0:e.tablet_node_resource_guarantee)||{}).memory;n.push($t("Memory allocation",{data:e.memory_limits,resourceType:"Bytes",limit:y}))}return e.cpu_limits&&n.push($t("vCPU allocation",{data:e.cpu_limits,resourceType:"Number",postfix:"threads"})),(0,j.jsx)(ce.Ay,{className:Zt(),subTitles:["Bundle configuration"],items:[n]})}function nn(e,t,n,r){var a=ct.A.format[r](n),o=ct.A.format[r](t),l=ct.A.format.Number(t/n*100||0);return{key:e,value:(0,j.jsxs)("span",{children:[(0,Oe.G1)(o,a),(0,j.jsxs)("span",{className:Zt("percentage"),children:[l,"%"]})]})}}function rn(e,t,n,r){var a=ct.A.format.Bytes(n),o=ct.A.format.vCores(r);return{key:e,value:t?"".concat(t," x (").concat(a,", ").concat(o,")"):0}}function an(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null!=e&&e.length||0!==t?(null==e||!e.length)&&t>0?"changing":"failed":"good"}function on(e){return(0,j.jsx)("ol",{className:Zt("tooltip-list",{alerts:!0}),children:e.map((function(e){return(0,j.jsxs)("li",{className:Zt("tooltip-item"),children:[e.id," - ",e.description]},e.id)}))})}var ln=(0,l.A)("bundle-meta-table");function sn(){return(0,j.jsxs)("div",{className:ln("container"),children:[(0,j.jsx)(ge,{}),(0,j.jsx)(tn,{}),(0,j.jsx)(en,{})]})}var cn=n(64772),un=n(72902),dn=n(4617),mn=(0,l.A)("cells-bundle-controller"),hn=[{name:"Address",render:function(e){var t=e.row,n=t.url,r=t.address;return(0,j.jsxs)("span",{children:[(0,j.jsx)(se.A,{className:mn("address-host"),url:n,routed:!0,children:r}),r&&(0,j.jsx)(x.A,{text:r,view:"flat",inlineMargins:!0,visibleOnRowHover:!0})]})},sortable:!1},{name:"Type",render:function(e){var t,n=(null===(t=e.row.data)||void 0===t?void 0:t.resource)||{},r=n.memory,a=n.vcpu,o=cn.A.Bytes(r),l=cn.A.vCores(a);return(0,j.jsxs)("div",{children:[o,", ",l]})},sortable:!1,width:200},{name:"tablet_static_memory",header:"Tablet static memory",render:function(e){var t,n=e.row.tablet_static_memory;if(!n)return cn.A.NO_VALUE;var r=n.used,a=n.limit,o=(0,Oe.G1)(cn.A.Bytes(r),cn.A.Bytes(a)),l=null!==(t=(0,dn.jP)(r,a))&&void 0!==t?t:0;return(0,j.jsx)(ue.k,{value:l,theme:(0,dn.F0)(l),text:o})},sortable:!1,width:200,align:"center"},{name:"Allocation request",render:function(e){var t=e.row.hulkRequestPath;if(!t)return cn.A.NO_VALUE;var n=(0,Oe.bx)(t,"/").suffix;return(0,j.jsxs)("span",{className:mn("alloc-request"),children:[(0,j.jsx)(ne.A,{className:mn("alloc-request-attrs"),title:n,exactPath:t}),(0,j.jsx)(se.A,{className:mn("alloc-request-url"),url:(0,un.L$)({path:t}),children:n})]})},width:300,align:"center",sortable:!1},{name:"Allocation state",render:function(e){var t=e.row.allocationState,n="IN_PROGRESS"===t?"Please note that allocating new instances on MapReduce clusters can take several hours.":void 0;return t?(0,j.jsxs)(ie.m,{content:n,useFlex:!0,children:[(0,j.jsx)(le.A,{text:cn.A.ReadableField(t.toLocaleLowerCase())}),Boolean(n)&&(0,j.jsx)(oe.A,{awesome:"question-circle",color:"secondary"})]}):cn.A.NO_VALUE},sortable:!1,align:"center",width:200},{name:"",render:function(e){var t=e.row;return(0,j.jsxs)(o.Fragment,{children:[pn(t),bn(t)]})},width:80,align:"center"}];function pn(e){var t=e.deployUrl;return t?(0,j.jsx)(ie.m,{className:mn("link-icon"),content:"Deploy",placement:["top-end","bottom-end"],children:(0,j.jsx)(Ge.A,{url:t,hideIcon:!0,children:(0,j.jsx)(oe.A,{awesome:"rocket",face:"solid"})})}):null}function bn(e){var t=e.nannyUrl;return t?(0,j.jsx)(ie.m,{className:mn("link-icon"),content:"Nanny",placement:["top-end","bottom-end"],children:(0,j.jsx)(Ge.A,{url:t,hideIcon:!0,children:(0,j.jsx)(oe.A,{awesome:"cloud",face:"solid"})})}):null}var _n={displayIndices:!1,stickyHead:te.Ay.MOVING,stickyTop:h.kB,syncHeadOnResize:!0,dynamicRender:!0};function vn(e){var t=e.items,n=e.hideColumns,r=o.useState(""),a=(0,E.A)(r,2),l=a[0],s=a[1],i=o.useMemo((function(){return l?A()(t,(function(e){var t=e.address;return-1!==(null==t?void 0:t.indexOf(l))})):t}),[t,l]),c=function(e){return o.useMemo((function(){if(null==e||!e.length)return hn;var t=new Set(e);return hn.filter((function(e){return!t.has(e.name)}))}),[e])}(n),u=(0,j.jsx)(N.M,{itemsToWrap:[{name:"filter",node:(0,j.jsx)(w.A,{hasClear:!0,size:"m",type:"text",value:l,placeholder:"Enter address...",onChange:s,autofocus:!1,debounce:400,skipBlurByEnter:!0})}]});return(0,j.jsx)("div",{className:mn(),children:(0,j.jsx)(h.Ay,{toolbar:u,content:(0,j.jsx)(ae.Ay,{useThemeYT:!0,columns:c,data:i,settings:_n,emptyDataMessage:"No items to show"})})})}var fn=function(){var e=(0,p.d4)(D.Hw);return(0,j.jsx)(m.A,{children:(0,j.jsx)(vn,{items:e})})},yn=function(){var e=(0,p.d4)(D.hz);return(0,j.jsx)(m.A,{children:(0,j.jsx)(vn,{items:e,hideColumns:["tablet_static_memory"]})})},gn=n(96843),An=n.n(gn),xn=n(53615),wn=n(35762),Nn=n(20361),Cn=n(79366),jn=n(14145),Bn=n(70353),kn=n(81214),Tn=n.n(kn),En={keys:{resources:["rpc_proxy_count","rpc_proxy_resource_guarantee","tablet_node_count","tablet_node_resource_guarantee"],memory_limits:["reserved","tablet_static","tablet_dynamic","compressed_block_cache","uncompressed_block_cache","versioned_chunk_meta","lookup_row_cache","key_filter_block_cache"],cpu_limits:["lookup_thread_pool_size","query_thread_pool_size","write_thread_pool_size"]},defaults:{memory_limits:{memory_reset:!1,tablet_static:0,tablet_dynamic:0,compressed_block_cache:0,uncompressed_block_cache:0,versioned_chunk_meta:0,lookup_row_cache:0,key_filter_block_cache:0},cpu_limits:{threadPool_reset:!1,lookup_thread_pool_size:0,query_thread_pool_size:0,write_thread_pool_size:0}}},Ln=function(e,t){return{usage:he.Ay.getValue(e,"/@resource_usage/".concat(t)),limit:he.Ay.getValue(e,"/@resource_limits/".concat(t))}},Sn=function(e,t){var n=he.Ay.getValue(e,"/@abc/slug"),r=he.Ay.getValue(e,"/@options/changelog_account"),a=he.Ay.getValue(e,"/@options/snapshot_account"),o=Ln(e,"tablet_count").limit,l=Ln(e,"tablet_static_memory").limit;if(!t)return{general:{abc:{slug:n},changelog_account:r,snapshot_account:a},resources:{tablet_count:o||0,tablet_static_memory:l||0}};var s=t.rpc_proxy_count,i=t.tablet_node_count,c=t.cpu_limits,u=t.memory_limits;return{general:{abc:{slug:n},changelog_account:r,snapshot_account:a},resources:{info:"",tablet_count:o||0,rpc_proxy_count:s,rpc_proxy_resource_guarantee:t.rpc_proxy_resource_guarantee||void 0,tablet_node_count:i,tablet_node_resource_guarantee:t.tablet_node_resource_guarantee||void 0},memory_limits:{memory_reset:!1,reserved:(null==u?void 0:u.reserved)||0,tablet_static:(null==u?void 0:u.tablet_static)||0,tablet_dynamic:(null==u?void 0:u.tablet_dynamic)||0,compressed_block_cache:(null==u?void 0:u.compressed_block_cache)||0,uncompressed_block_cache:(null==u?void 0:u.uncompressed_block_cache)||0,versioned_chunk_meta:(null==u?void 0:u.versioned_chunk_meta)||0,lookup_row_cache:(null==u?void 0:u.lookup_row_cache)||0,key_filter_block_cache:(null==u?void 0:u.key_filter_block_cache)||0},cpu_limits:{threadPool_reset:!1,lookup_thread_pool_size:(null==c?void 0:c.lookup_thread_pool_size)||0,query_thread_pool_size:(null==c?void 0:c.query_thread_pool_size)||0,write_thread_pool_size:(null==c?void 0:c.write_thread_pool_size)||0}}},Fn=function(e){return Object.entries(e).map((function(e){var t,n,a=(0,E.A)(e,2),o=a[0],l=a[1],s=l.resource_guarantee,i=s.net,c=s.vcpu,u=s.memory;return{id:o,type:o,memory:ct.A.format.Bytes(u),net:(t=i,n=void 0!==t?(t/1e9).toPrecision(2):0,"".concat(n," Gbit RX/TX")),vcpu:ct.A.format.vCores(c),initialData:(0,r.A)((0,r.A)({},l.resource_guarantee),{},{type:o})}}))},zn=function(e,t,n){var r=ct.A.format[e](t).split(" "),a=(0,E.A)(r,2),o=[{title:"Total",value:a[0],postfix:a[1]}];if(void 0!==n){var l=t-n,s=ct.A.format[e](l).split(" "),i=(0,E.A)(s,2),c=i[0],u=i[1];o.push({title:"Free",value:c===ct.A.format.NO_VALUE?"0":c,postfix:u,type:l>=0?"positive":"negative"})}return o};function Rn(e){var t=e.id,n=e.slug;return t&&n?{id:t,slug:n}:void 0}var On=function(e){var t={},n=e.getState(),r=n.dirtyFields,a=n.values;function o(e,n,o){if(r[n]){var l=Tn()(a,n);t[e]="function"==typeof o?o(l):l}}return o("@abc","general.abc",Rn),o("@options/changelog_account","general.changelog_account"),o("@options/snapshot_account","general.snapshot_account"),o("@resource_limits/tablet_count","resources.tablet_count"),o("@resource_limits/tablet_static_memory","resources.tablet_static_memory"),o("@bundle_controller_target_config/rpc_proxy_count","resources.rpc_proxy_count"),o("@bundle_controller_target_config/tablet_node_count","resources.tablet_node_count"),o("@bundle_controller_target_config/rpc_proxy_resource_guarantee","resources.rpc_proxy_resource_guarantee"),o("@bundle_controller_target_config/tablet_node_resource_guarantee","resources.tablet_node_resource_guarantee"),o("@bundle_controller_target_config/memory_limits/reserved","memory_limits.reserved"),o("@bundle_controller_target_config/memory_limits/tablet_static","memory_limits.tablet_static"),o("@bundle_controller_target_config/memory_limits/tablet_dynamic","memory_limits.tablet_dynamic"),o("@bundle_controller_target_config/memory_limits/compressed_block_cache","memory_limits.compressed_block_cache"),o("@bundle_controller_target_config/memory_limits/uncompressed_block_cache","memory_limits.uncompressed_block_cache"),o("@bundle_controller_target_config/memory_limits/versioned_chunk_meta","memory_limits.versioned_chunk_meta"),o("@bundle_controller_target_config/memory_limits/lookup_row_cache","memory_limits.lookup_row_cache"),o("@bundle_controller_target_config/memory_limits/key_filter_block_cache","memory_limits.key_filter_block_cache"),o("@bundle_controller_target_config/cpu_limits/lookup_thread_pool_size","cpu_limits.lookup_thread_pool_size"),o("@bundle_controller_target_config/cpu_limits/query_thread_pool_size","cpu_limits.query_thread_pool_size"),o("@bundle_controller_target_config/cpu_limits/write_thread_pool_size","cpu_limits.write_thread_pool_size"),t},Dn=function(e){var t,n=Number(e);return Number.isFinite(n)||(t="Incorrect value"),n<0&&(t="Must be greater than or equal to zero"),t},In=function(e){var t=e.length;return function(e){var n,r=Number(e);return Number.isFinite(r)?r<0?n="Must be greater than or equal to zero":t>0&&r%t!=0&&(n="Must be divisible by ".concat(t)):n="Incorrect value",n}};function Pn(e,t,n){var r,a={},o=(0,Bn.A)(En.keys[n]);try{for(o.s();!(r=o.n()).done;){var l,s=r.value;a[s]=null!==(l=e[s])&&void 0!==l?l:t[s]}}catch(e){o.e(e)}finally{o.f()}return a}var Un=n(29081),qn=(0,l.A)("bundle-editor");function Hn(){var e,t=(0,p.d4)(jn.j),n=t.visibleEditor,a=t.bundleName,o=t.bundleData,l=t.data,s=t.bundleControllerData,i=(0,p.d4)(q.jU),c=(0,p.d4)(D._t).defaultConfig,d=null==o?void 0:o.bundle_controller_target_config,m=(null==o?void 0:o.enable_bundle_controller)||!1,h=Ln(l,"tablet_count").usage,_=Ln(l,"tablet_static_memory").usage,v=(0,p.d4)(D.nX).get(null!=a?a:""),f=(0,p.d4)(Cn.d),y=m?d?Sn(l,d):{}:Sn(l),g=function(){if(!c)return[[],[],[]];var e=c.rpc_proxy_sizes,t=c.tablet_node_sizes,n=c.data_centers;return[Fn(e),Fn(t),n?(0,b.A)(Object.values(n)):[]]}(),A=(0,E.A)(g,3),x=A[0],w=A[1],N=A[2],C={name:"general",title:"General",type:"tab-vertical",size:"s",fields:[].concat((0,b.A)((0,be.Ve)()?[{name:"abc",type:"abc-control",caption:"ABC Service",extras:{placeholder:"Select ABC service...",disabled:!f}}]:[]),[{name:"changelog_account",type:"accounts-suggest-with-loading",caption:"Changelog account",extras:{allowRootAccount:!0,disabled:!f}},{name:"snapshot_account",type:"accounts-suggest-with-loading",caption:"Snapshot account",extras:{allowRootAccount:!0,disabled:!f}}])},B={name:"resources",title:"Resources",type:"tab-vertical",size:"s",fields:[{name:"info",type:"block",fullWidth:!0,touched:!0,extras:{children:(0,j.jsxs)(xn.R,{className:qn("info"),children:[be.Ay.renderTableCellBundleEditorNotice({bundleData:o,clusterUiConfig:i}),(0,j.jsx)(wn.h,{className:qn("params"),params:[{title:"Memory",value:ct.A.format.Bytes((null==s?void 0:s.resource_quota.memory)||"0")},{title:"vCPU",value:ct.A.format.vCores((null==s?void 0:s.resource_quota.vcpu)||"0")},{title:"Tablet count",value:ct.A.format.Number(null===(e=y.resources)||void 0===e?void 0:e.tablet_count)}]})]})}}].concat((0,b.A)(v?[{name:"tablet_count",type:"bundle-input",caption:"Tablet count",extras:{format:"Number",withoutDetailedBar:!0,progress:{usage:h}},validator:Dn}]:[]),[{section:"RPC proxy"},{type:"bundle-input",name:"rpc_proxy_count",caption:"RPC proxy count",extras:{format:"Number",withoutDetailedBar:!0,hasClear:!0},tooltip:(0,Un.fs)((0,U.f2)(be.Ay.docsUrls["dynamic-tables:cross-dc"],"Help")),validator:In(N)},{type:"bundle-table-field",name:"rpc_proxy_resource_guarantee",caption:"Instance configuration",fullWidth:!0,extras:{data:x}},{section:"Tablet node"},{type:"bundle-input",name:"tablet_node_count",caption:"Tablet node count",extras:{format:"Number",withoutDetailedBar:!0,hasClear:!0},tooltip:(0,Un.fs)((0,U.f2)(be.Ay.docsUrls["dynamic-tables:cross-dc"],"Help")),validator:In(N)},{type:"bundle-table-field",name:"tablet_node_resource_guarantee",caption:"Instance configuration",fullWidth:!0,extras:function(e,t){var n=t.form;return{data:w,onRadioClick:function(t){var a,o=t.type||"",l=(null==c?void 0:c.tablet_node_sizes[o].default_config.memory_limits)||{},s=(null==c?void 0:c.tablet_node_sizes[o].default_config.cpu_limits)||{},i=(null==c||null===(a=c.tablet_node_sizes[o].default_config.memory_limits)||void 0===a?void 0:a.reserved)||void 0,u=Pn(e.memory_limits,l,"memory_limits"),d=Pn(e.cpu_limits,s,"cpu_limits");u.reserved=i,n.change("memory_limits",(0,r.A)((0,r.A)({},En.defaults.memory_limits),u)),n.change("cpu_limits",(0,r.A)((0,r.A)({},En.defaults.cpu_limits),d))}}}}])},k={name:"resources",title:"Resources",type:"tab-vertical",size:"s",fields:[{name:"tablet_count",type:"bundle-input",caption:"Tablet count",extras:{format:"Number",withoutDetailedBar:!0,progress:{usage:h}},validator:Dn},{name:"tablet_static_memory",type:"bundle-input",caption:"Tablet static memory",extras:{format:"Bytes",progress:{usage:_}},validator:Dn,tooltip:(0,j.jsx)("span",{children:"Tablet static memory limit is based on hardware resources. Do not increase it unless you fully understand what you are doing. In case of emergency consider adding new tablet cells to the bundle, consulting with Components/Nodes page and increasing the limit only when new nodes are added to the bundle."})}]},T={name:"memory_limits",title:"Memory",type:"tab-vertical",size:"s",visibilityCondition:{when:"resources.tablet_node_resource_guarantee",isActive:function(e){return void 0!==e}},fields:[{name:"memory_reset",type:"bundle-title",caption:"Memory",touched:!0,extras:function(e,t){var n,a=t.form,o=null===(n=e.resources)||void 0===n?void 0:n.tablet_node_resource_guarantee,l=function(){if(o&&o.type&&c){var e=o.type,t=c.tablet_node_sizes[e].default_config.memory_limits;a.change("memory_limits",(0,r.A)((0,r.A)({},En.defaults.memory_limits),t))}};if(!o)return{params:[],onReset:l};var s=o.memory,i=En.keys.memory_limits.reduce((function(t,n){var r,a=null==e||null===(r=e.memory_limits)||void 0===r?void 0:r[n];return"number"!=typeof a||isNaN(a)?t:t+a}),0);return{params:zn("Bytes",s,i),onReset:l}}},{name:"reserved",type:"bundle-input",caption:"Reserved",extras:{format:"Bytes",disabled:!0},tooltip:(0,Un.fs)((0,U.f2)(be.Ay.docsUrls["bundle-controller:reserved-memory"],"Help"))},{name:"tablet_static",type:"bundle-input",caption:"Tablet static",extras:{format:"Bytes",hasClear:!0},validator:Dn},{name:"tablet_dynamic",type:"bundle-input",caption:"Tablet dynamic",extras:{format:"Bytes",hasClear:!0},validator:Dn},{name:"compressed_block_cache",type:"bundle-input",caption:"Compressed block cache",extras:{format:"Bytes",hasClear:!0},validator:Dn},{name:"uncompressed_block_cache",type:"bundle-input",caption:"Uncompressed block cache",extras:{format:"Bytes",hasClear:!0},validator:Dn},{name:"versioned_chunk_meta",type:"bundle-input",caption:"Versioned chunk meta",extras:{format:"Bytes",hasClear:!0},validator:Dn},{name:"lookup_row_cache",type:"bundle-input",caption:"Lookup row cache",extras:{format:"Bytes",hasClear:!0},validator:Dn},{name:"key_filter_block_cache",type:"bundle-input",caption:"Key filter block cache",extras:{format:"Bytes",hasClear:!0},validator:Dn}]},L={name:"cpu_limits",title:"Thread pools",type:"tab-vertical",size:"s",visibilityCondition:{when:"resources.tablet_node_resource_guarantee",isActive:function(e){return void 0!==e}},fields:[{name:"threadPool_reset",type:"bundle-title",caption:"vCPU",extras:function(e,t){var n,a=t.form,o=null===(n=e.resources)||void 0===n?void 0:n.tablet_node_resource_guarantee;if(!o||!o.type||!c)return{params:[],onReset:function(){}};var l=o.vcpu;return{params:zn("vCores",l),onReset:function(){var e=o.type;if(e){var t=c.tablet_node_sizes[e].default_config.cpu_limits;a.change("cpu_limits",(0,r.A)((0,r.A)({},En.defaults.cpu_limits),t))}}}}},{name:"lookup_thread_pool_size",type:"bundle-input",caption:"Lookup thread pool size",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn},{name:"query_thread_pool_size",type:"bundle-input",caption:"Query thread pool size",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn},{name:"write_thread_pool_size",type:"bundle-input",caption:"Write thread pool size",extras:{postfix:"threads",format:"Number",hasClear:!0},validator:Dn}]},S=[C];m?S.push(B,T,L):S.push(k);var F=(0,p.wA)(),z=function(){var e=(0,Ut.A)(Ht().mark((function e(t){var n;return Ht().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}return e.abrupt("return",{});case 2:return n=On(t),e.prev=3,e.next=6,F(bt({bundleName:a,data:n}));case 6:return e.abrupt("return",void 0);case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("return",(0,Nn.Ln)(e.t0));case 12:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t){return e.apply(this,arguments)}}();return An()(l)?null:(0,j.jsx)(Nn.yZ,{className:qn("dialog"),headerProps:{title:a},size:"l",initialValues:y,visible:n,onAdd:z,onClose:function(){F((function(e){e({type:u.Or,data:{bundleName:void 0,loaded:!0,visibleEditor:!1}})}))},fields:S,validate:Mn.bind(null,null==s?void 0:s.resource_quota)})}function Mn(e,t){var n,r,a,o,l,s,i,c={resources:{info:void 0},memory_limits:{memory_reset:void 0}},u=t.resources,d=Object.values(t.memory_limits||{}).reduce((function(e,t){return"number"!=typeof t?e:e+t}),0),m=u.tablet_node_resource_guarantee;c.memory_limits.memory_reset=d>(null!==(n=null==m?void 0:m.memory)&&void 0!==n?n:0)?"The sum of the memory limits exceeds the allowed values":void 0;var h=u.rpc_proxy_count,p=void 0===h?0:h,b=u.tablet_node_count,_=void 0===b?0:b,v=(null!==(r=null==m?void 0:m.vcpu)&&void 0!==r?r:0)*_+(null!==(a=null===(o=u.rpc_proxy_resource_guarantee)||void 0===o?void 0:o.vcpu)&&void 0!==a?a:0)*p,f=[];v>(null==e?void 0:e.vcpu)&&f.push("".concat(ct.A.format.Number(v/1e3)," cpu required"));var y=(null!==(l=null==m?void 0:m.memory)&&void 0!==l?l:0)*_+(null!==(s=null===(i=u.rpc_proxy_resource_guarantee)||void 0===i?void 0:i.memory)&&void 0!==s?s:0)*p;return y>(null==e?void 0:e.memory)&&f.push("".concat(ct.A.format.Bytes(y)," memory requried")),c.resources.info=f.length?f.join(", "):void 0,c}var Vn=n(26264);function Wn(e){return function(t){return t({type:u.cP}),t({type:u.LJ,data:{bundleName:e,visibleEditor:!0}}),H.Qq.get(H.Vu.chaosCellBundlesEditData,{path:"//sys/chaos_cell_bundles/".concat(e),attributes:["resource_usage","resource_limits","options","abc"]}).then((function(e){t({type:u.sP,data:{data:e}})})).catch((function(e){t({type:u.VA,data:e})}))}}var Qn=["bundle","health","tabletCells","enable_bundle_balancer","changelog_account","actions"],Yn={setBundlesSortState:function(e){return{type:u.lr,data:{bundlesSort:e}}},setActiveBundle:Ue,showCellBundleEditor:Wn};const Kn=(0,p.Ng)((function(e){return{loading:(0,Ie.l9)(e),loaded:(0,Ie.um)(e),data:(0,Ie.v8)(e),total:(0,Ie.sD)(e),sortState:(0,Ie.dz)(e),cluster:(0,q.dB)(e),allowPerBundleAccounting:!1,mode:(0,Ie.tC)(e),pathPrefix:"//sys/chaos_cell_bundles/",columns:Qn,activeBundleLink:R.pu,writeableByName:{get:function(){return!0}}}}),Yn)(at);var Gn=["default"],Xn={setTabletsBundlesNameFilter:function(e){return{type:u.lr,data:{bundlesNameFilter:e}}},setTabletsBundlesAccountFilter:function(e){return{type:u.lr,data:{bundlesAccountFilter:e}}},setTabletsBundlesTagNodeFilter:function(e){return{type:u.lr,data:{bundlesTagNodeFilter:e}}},setTabletsFirstBundleAsActive:function(){return function(e,t){var n=t(),r=(0,Ie.v8)(n),a=(0,E.A)(r,1)[0];if(a){var o=(0,q.dB)(n);e(Ue(a.bundle)),(0,M.Q)().push((0,R.d7)(o,a.bundle))}}},setTabletsPartial:Pe};const $n=(0,p.Ng)((function(e){return{accountFilter:(0,Ie.px)(e),bundlesTableMode:(0,Ie.tC)(e),nameFilter:(0,Ie.p1)(e),tagNodeFilter:(0,Ie.QJ)(e),modes:Gn}}),Xn)(Bt);function Zn(){var e=(0,p.wA)(),t=o.useCallback((function(t){e(function(e){return function(t,n){var r=(0,Ie.DO)(e,(0,Ie.UI)(n())),a=(0,Ie.U5)(r);P()(a||"")}}(t))}),[e]);return o.useEffect((function(){e(Ue(""))}),[e]),(0,j.jsx)(m.A,{children:(0,j.jsx)(h.Ay,{toolbar:(0,j.jsx)($n,{}),content:(0,j.jsx)(Kn,{copyHostListToClipboard:t})})})}var Jn=n(50073),er=n(9772),tr=n(60680),nr=n(84656),rr=n(44187),ar=(0,l.A)("chaos-editor"),or=[{value:"general",text:"General",show:!0},{value:"resources",text:"Resources",show:!0}];function lr(e){var t=e.bundleEditorData,n=e.resourceType,r=e.setBundleQuota,a=t.data,l=he.Ay.getValue(a,"/@resource_limits/".concat(n)),s=he.Ay.getValue(a,"/@resource_usage/".concat(n)),i=o.useState(!1),c=(0,E.A)(i,2),u=c[0],d=c[1],m=o.useCallback((function(){d(!u)}),[u,d]),h=(0,U.z)(s,l,sr[n]),p=h.value,b=void 0===p?0:p,_=h.theme,v=h.text;return(0,j.jsxs)("div",{className:ar("item"),children:[(0,j.jsxs)("div",{className:ar("name-usage"),children:[(0,j.jsx)("div",{className:ar("name"),children:(0,j.jsx)(tr.yN,{children:ct.A.format.Readable(n)})}),(0,j.jsx)(ue.k,{className:ar("progress"),value:b,theme:_,text:v}),(0,j.jsx)(Ke.A,{view:"flat-secondary",onClick:m,children:(0,j.jsx)(oe.A,{awesome:"pencil"})})]}),u&&(0,j.jsx)(ir,{bundleEditorData:t,resourceType:n,setBundleQuota:r,toggleVisibility:m})]})}var sr={tablet_count:"Number",tablet_static_memory:"Bytes"};function ir(e){var t=e.bundleEditorData,n=e.resourceType,r=e.setBundleQuota,a=e.toggleVisibility,l=t.bundleName,s=void 0===l?"":l,i=t.data,c=he.Ay.getValue(i,"/@resource_limits/".concat(n)),u=he.Ay.getValue(i,"/@resource_usage/".concat(n)),d=(0,p.wA)(),m=o.useCallback((function(e){d(r({bundleName:s,resourceType:n,limit:e}))}),[n]);return(0,j.jsx)(er.A,{format:sr[n],limit:c,onHide:a,onSave:m,getInfoByName:function(){return{limit:c,total:u}},currentAccount:s,parentOfCurrentAccount:"",max:1/0})}function cr(e){var t=e.bundleEditorData,n=e.setBunndleAttributes;return(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)(ur,{bundleEditorData:t,setBunndleAttributes:n}),(0,j.jsx)(dr,{attributeName:"changelog_account",bundleEditorData:t,setBunndleAttributes:n}),(0,j.jsx)(dr,{attributeName:"snapshot_account",bundleEditorData:t,setBunndleAttributes:n})]})}function ur(e){var t=e.bundleEditorData,n=e.setBunndleAttributes,r=t.bundleName,a=t.data,l=he.Ay.getValue(a,"/@abc/slug"),s=(0,p.d4)(Cn.d),i=(0,p.wA)(),c=o.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,a=e.slug;if(!r)throw new Error("Name of bundle cannot be empty");i(n(r,{attributes:{abc:t&&a?{id:t,slug:a}:void 0}}))}),[]),u=be.Ay.renderControlAbcService({value:{slug:l},onChange:c,placeholder:"Select ABC service...",disabled:!s});return u?(0,j.jsx)(rr.o,{header:"ABC Service",children:(0,j.jsx)(j.Fragment,{children:u})}):null}function dr(e){var t=e.attributeName,n=e.bundleEditorData,r=e.setBunndleAttributes,l=n.bundleName,s=n.data,i=he.Ay.getValue(s,"/@options/".concat(t)),c=(0,p.d4)(Cn.d),u=(0,p.wA)(),d=o.useCallback((function(e){if(!l)throw new Error("Name of bundle cannot be empty");u(r(l,{options:(0,a.A)({},t,e)}))}),[]);return(0,j.jsx)(rr.o,{header:"".concat(ee()(t)," account"),children:(0,j.jsx)(nr.Dk,{value:i||"",onChange:d,disabled:!c,allowRootAccount:!0})})}var mr=function(e){return e.chaosCellBundleEditor},hr={hideBundleEditor:function(){return function(e){e({type:u.LJ,data:{bundleName:void 0,loaded:!0,visibleEditor:!1}})}},setBundleQuota:function(e){return function(t){var n=e.bundleName,r=e.resourceType,a=e.limit,o=ct.A.format.Readable(r);return(0,U.fI)(mt().v3.set({path:"//sys/chaos_cell_bundles/".concat(n,"/@resource_limits/").concat(r)},a),{toasterName:"edit_bundle_".concat(n),successContent:"Set quota limit for ".concat(o),errorContent:"Cannot set quota limit for ".concat(o)}).then((function(){t(Wn(n))}))}},setBunndleAttributes:function(e,t){return function(n){console.log(t);var r=t.attributes,a=t.options,o="//sys/chaos_cell_bundles/".concat(e);return(0,U.fI)(H.Qq.executeBatch(H.Vu.chaosCellBundlesSetAttrs,{requests:[].concat((0,b.A)(S()(r,(function(e,t){return(0,ut.Gy)("".concat(o,"/@").concat(t),e)}))),(0,b.A)(S()(a,(function(e,t){return(0,ut.Gy)("".concat(o,"/@options/").concat(t),e)}))))}),{toasterName:"update-bundle_".concat(e),successContent:"".concat(e," successfully updated"),errorContent:"".concat(e," cannot be updated"),batchType:"v3",errorTitle:"Failed to update bundle configuration"}).then((function(){n(Wn(e))}))}}};const pr=(0,p.Ng)((function(e){return{bundleEditorData:mr(e)}}),hr)((function(e){var t=e.bundleEditorData,n=e.hideBundleEditor,r=e.setBundleQuota,a=e.setBunndleAttributes,l=t.visibleEditor,s=t.bundleName,i=t.error,u=o.useState(or[0].value),d=(0,E.A)(u,2),m=d[0],h=d[1],b=(0,p.wA)(),_=o.useCallback((function(){b(n())}),[]);return l?(0,j.jsxs)(Jn.l,{open:!0,onClose:_,children:[(0,j.jsx)(Jn.l.Header,{caption:(0,j.jsx)(o.Fragment,{children:s})}),(0,j.jsx)(Jn.l.Divider,{}),(0,j.jsxs)(Jn.l.Body,{className:ar("body"),children:[(0,j.jsx)("div",{className:ar("body-tabs"),children:(0,j.jsx)(c.A,{items:or,size:"m",layout:"vertical",active:m,onTabChange:h})}),(0,j.jsxs)("div",{className:ar("body-tab-content"),children:["resources"===m&&(0,j.jsxs)(o.Fragment,{children:[(0,j.jsx)(lr,{bundleEditorData:t,resourceType:"tablet_count",setBundleQuota:r}),(0,j.jsx)(lr,{bundleEditorData:t,resourceType:"tablet_static_memory",setBundleQuota:r}),i&&(0,j.jsx)(qe.A,{error:i})]}),"general"===m&&(0,j.jsx)(cr,{bundleEditorData:t,setBunndleAttributes:a})]})]})]}):null}));var br={setTabletsPartial:Pe};const _r=(0,p.Ng)((function(e){return{activeBundle:(0,Ie.JP)(e),activeBundleHosts:(0,Ie.GR)(e),idFilter:(0,Ie.Xj)(e),bundleFilter:(0,Ie.uo)(e),hostFilter:(0,Ie.yb)(e),bundles:(0,Ie.zQ)(e),hosts:(0,Ie.RC)(e)}}),br)(k);var vr=["id","bundle","health","peerAddress","state","actions"],fr={setTabletsPartial:Pe,setTabletsActiveBundle:Ue};const yr=(0,p.Ng)((function(e){return{cluster:(0,q.dB)(e),loading:(0,Ie.l9)(e),loaded:(0,Ie.um)(e),data:(0,Ie.jU)(e),sortState:(0,Ie.Nd)(e),columns:vr,activeBundleLink:R.pu,attributesPath:R.Dr,cellNavigationLink:R.t8}}),fr)(Le);function gr(){return(0,j.jsx)(m.A,{children:(0,j.jsx)(h.Ay,{toolbar:(0,j.jsx)(_r,{}),content:(0,j.jsx)(yr,{})})})}var Ar=n(35441),xr=n(62250),wr=(0,n(33882).A)(o.lazy((0,Ut.A)(Ht().mark((function e(){return Ht().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([n.e(8096),n.e(2209),n.e(3266),n.e(7164),n.e(6733),n.e(3990),n.e(3735),n.e(8356),n.e(1830)]).then(n.bind(n,87277));case 2:return e.t0=e.sent.TabletErrorsByBundle,e.abrupt("return",{default:e.t0});case 4:case"end":return e.stop()}}),e)}))))),Nr=n(31229),Cr=(0,l.A)("tablets"),jr=o.memo(Tr);function Br(){var e,t=(0,d.W5)(),n=(0,p.d4)(q.dB),a=(0,p.d4)(D.Mm),l=(0,p.d4)(D.OR),s=((0,p.d4)(D.EA)||{}).enable_bundle_controller,c=void 0!==s&&s,m=(0,p.wA)(),h=o.useCallback((function(){Promise.all([m((function(e){e({type:u.CQ});var t=[{command:"list",parameters:(0,r.A)({path:"//sys/chaos_cells",attributes:["health","id","peers","status","tablet_cell_bundle"]},Q.v)},{command:"get",parameters:(0,r.A)({path:"//sys/chaos_cell_bundles",attributes:["health","id","options"]},Q.v)}];return H.Qq.executeBatch(H.Vu.chaosCellBundles,{requests:t}).then((function(t){var n=(0,E.A)(t,2),r=n[0].output,a=n[1].output,o=(0,U.$7)(t,"Tablet cell bundles cannot be loaded");if(o)throw o;var l=(0,R.VY)(r),s=(0,R.Th)(l,a);e({type:u.CZ,data:{cells:l,bundles:s}})})).catch((function(t){e({type:u.jo,data:t})}))})),m(K())])}),[m]);(0,De.Tt)(h);var b=(0,p.d4)(D.nX).get(l),_=c||b,v=function(e,t){return o.useMemo((function(){return i()(u.R_,(function(t,n){return n===u.R_.CHAOS_CELLS?t[n]={show:!1}:t[n]={show:n===u.R_.TABLET_CELLS||Boolean(e)},t}),{})}),[e,t])}(l,c),f=v[u.R_.STATISTICS];f.show=f.show&&Boolean(be.Ay.getStatisticsComponentForBundle());var y=v[u.R_.MONITOR],g=null!==(e=be.Ay.getMonitoringForBundle())&&void 0!==e?e:{},A=g.component,x=g.urlTemplate,w=g.title;y.show=y.show&&Boolean(A||x),x&&(y.external=!0,y.routed=!1,y.url=(0,Ar.j)(x,{ytCluster:n,ytTabletCellBundle:l}));var N=v[u.R_.INSTANCES];N.show=N.show&&c;var C=v[u.R_.PROXIES];C.show=C.show&&c;var B=v[u.R_.TABLET_ERRORS];return B.show=B.show&&(0,Nr.FG)().allowTabletErrorsAPI,(0,j.jsxs)("div",{className:"elements-page__content",children:[(0,j.jsxs)("section",{className:Cr(null,"elements-main-section"),children:[(0,j.jsx)("div",{className:Cr("content"),children:(0,j.jsxs)("div",{className:Cr("heading"),children:[(0,j.jsx)(kr,{allowEdit:_,activeBundle:l,cluster:n}),(0,j.jsx)("div",{className:Cr("tabs"),children:(0,j.jsx)(jr,{activeBundle:l,showSettings:v,monitoringTitle:w})})]})}),a&&(0,j.jsx)(qe.A,{error:a}),(0,j.jsx)("div",{className:Cr("tab-viewer"),children:(0,j.jsxs)(d.dO,{children:[N&&(0,j.jsx)(d.qh,{path:"".concat(t.path,"/").concat(u.R_.INSTANCES),component:fn}),C&&(0,j.jsx)(d.qh,{path:"".concat(t.path,"/").concat(u.R_.PROXIES),component:yn}),B.show&&(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_ERRORS),render:function(){return(0,j.jsx)(wr,{bundle:l})}}),(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_CELLS),component:Re}),(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.CHAOS_CELL_BUNDLES,"/").concat(u.R_.CHAOS_CELLS),component:gr}),f.show&&(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.STATISTICS),component:zt}),y.show&&A&&(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.MONITOR),render:function(){return(0,j.jsx)(Ot,{component:A})}}),(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.ACL),render:function(){return(0,j.jsx)(Pt,{className:Cr("acl-tab")})}}),(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.TABLET_CELL_BUNDLES),component:Lt}),(0,j.jsx)(d.qh,{path:"/".concat(n,"/").concat(Vn.YW.CHAOS_CELL_BUNDLES),component:Zn}),(0,j.jsx)(d.rd,{from:"/".concat(n,"/").concat(Vn.YW.TABLET_CELL_BUNDLES,"/*"),to:t.path})]})})]}),(0,j.jsx)(Hn,{}),(0,j.jsx)(pr,{})]})}function kr(e){var t=e.activeBundle,n=e.allowEdit,r=e.cluster,a=(0,p.wA)(),l=(0,p.d4)(q.qp),s=o.useCallback((function(){t&&a(pt(t))}),[t,a]);return(0,j.jsxs)(o.Fragment,{children:[t&&(0,j.jsx)("div",{className:"elements-heading elements-heading_size_l",children:(0,j.jsxs)("div",{className:Cr("bundle-name"),children:[(0,j.jsxs)("div",{className:Cr("bundle-name-left"),children:[t,(0,j.jsx)(Ge.A,{className:Cr("dashboard-link"),theme:"ghost",url:(0,_t.Ut)(r,t)})]}),l&&n&&(0,j.jsx)("div",{className:Cr("tabs-edit-btn"),children:(0,j.jsxs)(Ke.A,{className:Cr("edit-btn"),size:"m",onClick:s,children:[(0,j.jsx)(oe.A,{awesome:"pencil"}),"Edit Bundle"]})})]})}),(0,j.jsx)(sn,{})]})}function Tr(e){var t=e.activeBundle,n=e.showSettings,o=e.monitoringTitle,l=void 0===o?"Monitoring":o,s=(0,d.W5)(),i=s.params.cluster,m=t?(0,Oe._4)(s.url,u.R_,n,void 0,(0,a.A)({},u.R_.MONITOR,l)):function(e,t){var n=(0,Oe._4)(e,{});return n.items=[{value:Vn.YW.TABLET_CELL_BUNDLES,text:"Tablet cell bundles",show:!0,url:"/".concat(t,"/").concat(Vn.YW.TABLET_CELL_BUNDLES)},{value:u.R_.TABLET_CELLS,text:"Tablet cells",show:!0,url:"/".concat(t,"/").concat(Vn.YW.TABLET_CELL_BUNDLES,"/").concat(u.R_.TABLET_CELLS)},{value:Vn.YW.CHAOS_CELL_BUNDLES,text:"Chaos cell bundles",show:!0,url:"/".concat(t,"/").concat(Vn.YW.CHAOS_CELL_BUNDLES)},{value:u.R_.CHAOS_CELLS,text:"Chaos cells",show:!0,url:"/".concat(t,"/").concat(Vn.YW.CHAOS_CELL_BUNDLES,"/").concat(u.R_.CHAOS_CELLS)}],n}(s.url,i);return(0,j.jsx)(c.A,(0,r.A)((0,r.A)({},m),{},{className:Cr("tabs"),routed:!0,routedPreserveLocation:!0,exactNavLink:!0,size:xr.jr}))}var Er=n(29228),Lr=n(79484),Sr=n(17777),Fr=(0,l.A)("tablet-cell-bundles-top-row-content");function zr(e){var t=e.isActiveBundleInFavourites,n=e.items,r=e.activeBundle,a=e.page,l=e.setActiveBundle,s=e.toggleFavourite,i=(0,p.d4)(q.dB),c=o.useCallback((function(e){l(e.path),e.path?(0,M.Q)().push("/".concat(i,"/").concat(a,"/").concat(u.R_.TABLET_CELLS,"?activeBundle=").concat(e.path)):(0,M.Q)().push("/".concat(i,"/").concat(a))}),[i,l]),d=o.useCallback((function(){s(r)}),[s]);return(0,j.jsx)(Lr.A,{className:Fr("favourites"),isActive:t,items:n,onItemClick:c,onToggle:d,toggleDisabled:!r,theme:"clear"})}function Rr(e){var t=e.className,n=e.bcItems,r=e.setActiveBundle,a=(0,d.W6)(),l=o.useCallback((function(e){r(e.toString())}),[r]),s=o.useMemo((function(){return n.map((function(e){var t=e.text||e.title||"";return(0,j.jsx)(Er.y,{href:e.href,children:t},t)}))}),[n]);return(0,j.jsx)(Er.B,{navigate:a.push,onAction:l,className:t,showRoot:!0,children:s})}const Or=function(e){var t=e.isActiveBundleInFavourites,n=e.favourites,r=e.toggleFavourite,a=e.activeBundle,o=e.activeBundleData,l=e.bcItems,s=e.page,i=e.setActiveBundle,c=(0,p.d4)(q.jU);return(0,j.jsxs)(Sr.K,{page:s,urlParams:{activeBundle:""},children:[(0,j.jsx)(zr,{isActiveBundleInFavourites:t,activeBundle:a,page:s,setActiveBundle:i,items:n,toggleFavourite:r}),(0,j.jsx)(Rr,{className:Fr("breadcrumbs"),bcItems:l,setActiveBundle:i}),be.Ay.renderTopRowExtraControlsForBundle({itemClassName:Fr("extra-control"),clusterUiConfig:c,bundle:o})]})};var Dr=n(82947),Ir={setActiveBundle:X,toggleFavourite:O.BO};const Pr=(0,p.Ng)((function(e){return{activeBundle:(0,D.OR)(e),activeBundleData:(0,D.EA)(e),bcItems:(0,D.tB)(e),page:Vn.YW.TABLET_CELL_BUNDLES,favourites:(0,Dr.NF)(e),isActiveBundleInFavourites:(0,Dr.YZ)(e)}}),Ir)(Or);var Ur={setActiveBundle:Ue};const qr=(0,p.Ng)((function(e){return{activeBundle:(0,Ie.JP)(e),activeBundleData:(0,Ie.vY)(e),bcItems:(0,Ie.K)(e),page:Vn.YW.CHAOS_CELL_BUNDLES,favourites:(0,Dr.jO)(e),isActiveBundleInFavourites:(0,Dr.sO)(e)}}),Ur)(Or)},27652:(e,t,n)=>{"use strict";n.d(t,{c:()=>s,w:()=>l});var r=n(53746),a=n.n(r),o=n(11843);function l(e){return new(a())(e).load(null,1e4)}function s(e){return function(t,n){var r=(0,o.Y)(n());return Promise.all([l(r.regular),l(r.monospace)]).then((function(){return e}))}}},94544:(e,t,n)=>{"use strict";n.d(t,{Af:()=>d,Ut:()=>i,Z3:()=>c});var r=n(13322),a=n(7787),o=n(26264),l=n(42265),s=n(44458);function i(e,t){return a.Ay.makeUrlForTabletCellBundleDashboard(e,t)}function c(e,t){var n=t?"/".concat(t,"/"):"";return"".concat(n).concat(o.YW.TABLET_CELL_BUNDLES,"/").concat(l.R_.TABLET_CELLS,"?id=").concat(e)}function u(e,t){return e.changelog_account===t.changelog_account&&e.snapshot_account===t.snapshot_account?0:e.changelog_account<t.changelog_account||e.snapshot_account<t.snapshot_account?-1:1}var d=function(e){var t=e.bundles,n=e.column,a=e.columnsSortable,o=e.order,l=[],i=(0,s.fA)(o),c=i.orderK,d=i.undefinedOrderK;if("changelog_account"===n)l=(0,r.A)(t).sort(u);else if("nodes"===n)l=(0,r.A)(t).sort((function(e,t){var n=e.nodes,r=void 0===n?[]:n,a=t.nodes,o=void 0===a?[]:a;return r.length-o.length}));else if(a.has(n))return(0,s.Uy)(t,[{key:n,orderK:c,undefinedOrderK:d}]);return o.includes("asc")?l:l.reverse()}},65986:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,o:()=>o});var r=n(29717);const a="gc-",o=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:a,e:"__",m:"_",v:"_"}))},65873:(e,t,n)=>{"use strict";n.d(t,{k:()=>d});var r=n(77810);const a=(0,n(21086).om)("progress");function o(e){const{text:t,offset:n=0}=e;return t?r.createElement("div",{className:a("text-inner"),style:{transform:`translateX(calc(var(--g-flow-direction) * ${-n}%))`}},t):null}function l({item:e}){const{value:t,color:n,className:o,theme:l,title:s,content:i,loading:c}=e,u={loading:c};return void 0===n&&(u.theme=l||"default"),Number.isFinite(t)?r.createElement("div",{className:a("item",u,o),style:{width:`${t}%`,backgroundColor:n},title:s},i):null}function s(e){return e<100?e-100:0}function i(e){const{theme:t,colorStops:n,colorStopsValue:r,value:a}=e;if(n){const e=n.find(((e,t)=>{const o="number"==typeof r?r:a,l=t>1?n[t-1].stop:0,s=t<n.length-1?e.stop:100;return o>=l&&o<=s}));return e?e.theme:t}return t}function c(e){const{stack:t,stackClassName:n,value:i,text:c}=e,u=s(i||function(e){return e.reduce(((e,{value:t})=>e+t),0)}(t));return r.createElement("div",{className:a("stack",n),style:{transform:`translateX(calc(var(--g-flow-direction) * ${u}%))`}},r.createElement("div",{className:a("item"),style:{width:-u+"%"}}),t.map(((e,t)=>r.createElement(l,{key:t,item:e}))),r.createElement(o,{offset:u,text:c}))}function u(e){const{value:t,loading:n,text:l}=e,c=s(t);return Number.isFinite(t)?r.createElement("div",{className:a("item",{theme:i(e),loading:n}),style:{transform:`translateX(calc(var(--g-flow-direction) * ${c}%))`}},r.createElement(o,{offset:c,text:l})):null}const d=r.forwardRef((function(e,t){const{text:n="",theme:o="default",size:l="m",loading:s=!1,className:i,qa:d}=e,m=Object.assign(Object.assign({},e),{text:n,theme:o,size:l,loading:s});return r.createElement("div",{ref:t,className:a({size:l},i),"data-qa":d},r.createElement("div",{className:a("text")},n),function(e){return void 0!==e.stack}(m)?r.createElement(c,Object.assign({},m)):r.createElement(u,Object.assign({},m)))}))},53746:e=>{!function(){function t(e,t){document.addEventListener?e.addEventListener("scroll",t,!1):e.attachEvent("scroll",t)}function n(e){this.g=document.createElement("div"),this.g.setAttribute("aria-hidden","true"),this.g.appendChild(document.createTextNode(e)),this.h=document.createElement("span"),this.i=document.createElement("span"),this.m=document.createElement("span"),this.j=document.createElement("span"),this.l=-1,this.h.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.i.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.j.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.m.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.h.appendChild(this.m),this.i.appendChild(this.j),this.g.appendChild(this.h),this.g.appendChild(this.i)}function r(e,t){e.g.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+t+";"}function a(e){var t=e.g.offsetWidth,n=t+100;return e.j.style.width=n+"px",e.i.scrollLeft=n,e.h.scrollLeft=e.h.scrollWidth+100,e.l!==t&&(e.l=t,!0)}function o(e,n){function r(){var e=o;a(e)&&null!==e.g.parentNode&&n(e.l)}var o=e;t(e.h,r),t(e.i,r),a(e)}function l(e,t,n){t=t||{},n=n||window,this.family=e,this.style=t.style||"normal",this.weight=t.weight||"normal",this.stretch=t.stretch||"normal",this.context=n}var s=null,i=null,c=null,u=null;function d(e){return null===u&&(u=!!e.document.fonts),u}function m(e,t){var n=e.style,r=e.weight;if(null===c){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(e){}c=""!==a.style.font}return[n,r,c?e.stretch:"","100px",t].join(" ")}l.prototype.load=function(e,t){var a=this,l=e||"BESbswy",c=0,u=t||3e3,h=(new Date).getTime();return new Promise((function(e,t){if(d(a.context)&&!function(e){return null===i&&(d(e)&&/Apple/.test(window.navigator.vendor)?(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent),i=!!e&&603>parseInt(e[1],10)):i=!1),i}(a.context)){var p=new Promise((function(e,t){!function n(){(new Date).getTime()-h>=u?t(Error(u+"ms timeout exceeded")):a.context.document.fonts.load(m(a,'"'+a.family+'"'),l).then((function(t){1<=t.length?e():setTimeout(n,25)}),t)}()})),b=new Promise((function(e,t){c=setTimeout((function(){t(Error(u+"ms timeout exceeded"))}),u)}));Promise.race([b,p]).then((function(){clearTimeout(c),e(a)}),t)}else!function(e){document.body?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t),e()})):document.attachEvent("onreadystatechange",(function t(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",t),e())}))}((function(){function i(){var t;(t=-1!=_&&-1!=v||-1!=_&&-1!=f||-1!=v&&-1!=f)&&((t=_!=v&&_!=f&&v!=f)||(null===s&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),s=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))),t=s&&(_==y&&v==y&&f==y||_==g&&v==g&&f==g||_==A&&v==A&&f==A)),t=!t),t&&(null!==x.parentNode&&x.parentNode.removeChild(x),clearTimeout(c),e(a))}var d=new n(l),p=new n(l),b=new n(l),_=-1,v=-1,f=-1,y=-1,g=-1,A=-1,x=document.createElement("div");x.dir="ltr",r(d,m(a,"sans-serif")),r(p,m(a,"serif")),r(b,m(a,"monospace")),x.appendChild(d.g),x.appendChild(p.g),x.appendChild(b.g),a.context.document.body.appendChild(x),y=d.g.offsetWidth,g=p.g.offsetWidth,A=b.g.offsetWidth,function e(){if((new Date).getTime()-h>=u)null!==x.parentNode&&x.parentNode.removeChild(x),t(Error(u+"ms timeout exceeded"));else{var n=a.context.document.hidden;!0!==n&&void 0!==n||(_=d.g.offsetWidth,v=p.g.offsetWidth,f=b.g.offsetWidth,i()),c=setTimeout(e,50)}}(),o(d,(function(e){_=e,i()})),r(d,m(a,'"'+a.family+'",sans-serif')),o(p,(function(e){v=e,i()})),r(p,m(a,'"'+a.family+'",serif')),o(b,(function(e){f=e,i()})),r(b,m(a,'"'+a.family+'",monospace'))}))}))},e.exports=l}()}}]);
|
2
|
+
//# sourceMappingURL=bundles.7fc5e9e7.chunk.js.map
|