Files
owncast/static/web/_next/static/chunks/pages/admin-1241aedb06db3b1b.js
2025-01-15 04:59:24 +00:00

1 line
32 KiB
JavaScript
Vendored

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6964],{64830:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return n(19711)}])},54495:function(e,t,n){"use strict";n.d(t,{o:function(){return p}});var a=n(85893),i=n(67294),r=n(23657),s=n(91624),l=n(27043),o=n(53731),c=n(12642),d=n(37039);let{Title:u}=r.default;function f(e,t){let n="black";return"warning"===t.level?n="orange":"error"===t.level&&(n="red"),(0,a.jsx)(s.Z,{color:n,children:e})}function m(e){return(0,a.jsx)(o.Z,{children:e})}let p=e=>{let{logs:t,initialPageSize:n}=e,{t:r}=(0,d.$G)(),[s,o]=(0,i.useState)(n);if(!(null==t?void 0:t.length))return null;let p=[{title:r("Level"),dataIndex:"level",key:"level",filters:[{text:r("Info"),value:"info"},{text:r("Warning"),value:"warning"},{text:r("Error"),value:"Error"}],onFilter:(e,t)=>0===t.level.indexOf(e),render:f},{title:r("Timestamp"),dataIndex:"time",key:"time",render:e=>{let t=new Date(e);return(0,c.WU)(t,"pp P")},sorter:(e,t)=>new Date(e.time).getTime()-new Date(t.time).getTime(),sortDirections:["descend","ascend"],defaultSortOrder:"descend"},{title:r("Message"),dataIndex:"message",key:"message",render:m}];return(0,a.jsxs)("div",{className:"logs-section",children:[(0,a.jsx)(u,{children:r("Logs")}),(0,a.jsx)(l.Z,{size:"middle",dataSource:t,columns:p,rowKey:e=>e.time,pagination:{pageSize:s},onChange:e=>{o(e.pageSize)}})]})}},48326:function(e,t,n){"use strict";n.d(t,{j:function(){return b}});var a=n(85893),i=n(3816),r=n(10227),s=n(78021),l=n(75543),o=n(23657),c=n(1461),d=n(56469),u=n(5152),f=n.n(u),m=n(41664),p=n.n(m),v=n(67294),h=n(37039),x=n(4481);let g=f()(()=>Promise.all([n.e(3247),n.e(7625)]).then(n.t.bind(n,17625,23)),{loadableGenerated:{webpack:()=>[17625]},ssr:!1}),y=f()(()=>Promise.all([n.e(3247),n.e(8527)]).then(n.t.bind(n,48527,23)),{loadableGenerated:{webpack:()=>[48527]},ssr:!1}),b=e=>{let{showTroubleshootButton:t}=e,{t:n}=(0,h.$G)(),{health:u}=(0,v.useContext)(x.a);if(!u)return null;let{healthy:f,healthPercentage:m,message:b,representation:w}=u,C="#3f8600",Z="info";return m<80?(C="#cf000f",Z="error"):m<30&&(C="#f0ad4e",Z="error"),(0,a.jsx)("div",{children:(0,a.jsxs)(i.default,{type:"inner",children:[(0,a.jsxs)(r.Z,{gutter:8,children:[(0,a.jsx)(s.Z,{span:12,children:(0,a.jsx)(l.Z,{title:n("Healthy Stream"),value:n(f?"Yes":"No"),valueStyle:{color:C},prefix:f?(0,a.jsx)(g,{}):(0,a.jsx)(y,{})})}),(0,a.jsx)(s.Z,{span:12,children:(0,a.jsx)(l.Z,{title:n("Playback Health"),value:m,valueStyle:{color:C},suffix:"%"})})]}),(0,a.jsx)(r.Z,{style:{display:w<100&&0!==w?"grid":"none"},children:(0,a.jsx)(o.default.Text,{type:"secondary",style:{textAlign:"center",fontSize:"0.7em",opacity:"0.3"},children:"".concat(n("Stream health represents")," ").concat(w,"% ").concat(n("of all known players. Other player status is unknown."))})}),(0,a.jsx)(r.Z,{gutter:16,style:{width:"100%",display:b?"grid":"none",marginTop:"10px"},children:(0,a.jsx)(s.Z,{span:24,children:(0,a.jsx)(c.Z,{message:b,type:Z,showIcon:!0,action:t&&(0,a.jsx)(p(),{passHref:!0,href:"/admin/stream-health",children:(0,a.jsx)(d.Z,{size:"small",type:"text",style:{color:"black"},children:n("TROUBLESHOOT")})})})})})]})})};b.defaultProps={showTroubleshootButton:!0}},3064:function(e,t,n){"use strict";let a=n(46594),i=n(88627),r=n(85408),s=n(57457);e.exports={translations:{en:a,es:i,de:r,fr:s},defaultLang:"en",useBrowserDefault:!0,languageDataStore:"query"}},64773:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var a=n(97685),i=n(67294);function r(){var e=i.useReducer(function(e){return e+1},0);return(0,a.Z)(e,2)[1]}},78021:function(e,t,n){"use strict";var a=n(78235);t.Z=a.Z},86560:function(e,t,n){"use strict";n.d(t,{default:function(){return I}});var a=n(87462),i=n(4942),r=n(67371),s=n(93967),l=n.n(s),o=n(74902),c=n(15671),d=n(43144),u=n(32531),f=n(29388),m=n(71002),p=n(22610),v=n(67294),h=n(96774),x=n.n(h),g=n(45987),y=n(89046),b=n(97685),w=v.forwardRef(function(e,t){var n,a=e.prefixCls,r=e.forceRender,s=e.className,o=e.style,c=e.children,d=e.isActive,u=e.role,f=v.useState(d||r),m=(0,b.Z)(f,2),p=m[0],h=m[1];return(v.useEffect(function(){(r||d)&&h(!0)},[r,d]),p)?v.createElement("div",{ref:t,className:l()("".concat(a,"-content"),(n={},(0,i.Z)(n,"".concat(a,"-content-active"),d),(0,i.Z)(n,"".concat(a,"-content-inactive"),!d),n),s),style:o,role:u},v.createElement("div",{className:"".concat(a,"-content-box")},c)):null});w.displayName="PanelContent";var C=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],Z=function(e){(0,u.Z)(n,e);var t=(0,f.Z)(n);function n(){var e;(0,c.Z)(this,n);for(var a=arguments.length,i=Array(a),r=0;r<a;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))).onItemClick=function(){var t=e.props,n=t.onItemClick,a=t.panelKey;"function"==typeof n&&n(a)},e.handleKeyPress=function(t){("Enter"===t.key||13===t.keyCode||13===t.which)&&e.onItemClick()},e.renderIcon=function(){var t=e.props,n=t.showArrow,a=t.expandIcon,i=t.prefixCls,r=t.collapsible;if(!n)return null;var s="function"==typeof a?a(e.props):v.createElement("i",{className:"arrow"});return s&&v.createElement("div",{className:"".concat(i,"-expand-icon"),onClick:"header"===r||"icon"===r?e.onItemClick:null},s)},e.renderTitle=function(){var t=e.props,n=t.header,a=t.prefixCls,i=t.collapsible;return v.createElement("span",{className:"".concat(a,"-header-text"),onClick:"header"===i?e.onItemClick:null},n)},e}return(0,d.Z)(n,[{key:"shouldComponentUpdate",value:function(e){return!x()(this.props,e)}},{key:"render",value:function(){var e,t,n=this.props,r=n.className,s=n.id,o=n.style,c=n.prefixCls,d=n.headerClass,u=n.children,f=n.isActive,m=n.destroyInactivePanel,p=n.accordion,h=n.forceRender,x=n.openMotion,b=n.extra,Z=n.collapsible,k=(0,g.Z)(n,C),j="disabled"===Z,N="header"===Z,S="icon"===Z,E=l()((e={},(0,i.Z)(e,"".concat(c,"-item"),!0),(0,i.Z)(e,"".concat(c,"-item-active"),f),(0,i.Z)(e,"".concat(c,"-item-disabled"),j),e),r),P={className:l()("".concat(c,"-header"),(t={},(0,i.Z)(t,d,d),(0,i.Z)(t,"".concat(c,"-header-collapsible-only"),N),(0,i.Z)(t,"".concat(c,"-icon-collapsible-only"),S),t)),"aria-expanded":f,"aria-disabled":j,onKeyPress:this.handleKeyPress};return N||S||(P.onClick=this.onItemClick,P.role=p?"tab":"button",P.tabIndex=j?-1:0),delete k.header,delete k.panelKey,delete k.onItemClick,delete k.showArrow,delete k.expandIcon,v.createElement("div",(0,a.Z)({},k,{className:E,style:o,id:s}),v.createElement("div",P,this.renderIcon(),this.renderTitle(),null!=b&&"boolean"!=typeof b&&v.createElement("div",{className:"".concat(c,"-extra")},b)),v.createElement(y.default,(0,a.Z)({visible:f,leavedClassName:"".concat(c,"-content-hidden")},x,{forceRender:h,removeOnLeave:m}),function(e,t){var n=e.className,a=e.style;return v.createElement(w,{ref:t,prefixCls:c,className:n,style:a,isActive:f,forceRender:h,role:p?"tabpanel":null},u)}))}}]),n}(v.Component);function k(e){var t=e;if(!Array.isArray(t)){var n=(0,m.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map(function(e){return String(e)})}Z.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};var j=function(e){(0,u.Z)(n,e);var t=(0,f.Z)(n);function n(e){(0,c.Z)(this,n),(a=t.call(this,e)).onClickItem=function(e){var t=a.state.activeKey;if(a.props.accordion)t=t[0]===e?[]:[e];else{var n=(t=(0,o.Z)(t)).indexOf(e);n>-1?t.splice(n,1):t.push(e)}a.setActiveKey(t)},a.getNewChild=function(e,t){if(!e)return null;var n=a.state.activeKey,i=a.props,r=i.prefixCls,s=i.openMotion,l=i.accordion,o=i.destroyInactivePanel,c=i.expandIcon,d=i.collapsible,u=e.key||String(t),f=e.props,m=f.header,p=f.headerClass,h=f.destroyInactivePanel,x=f.collapsible,g=!1;g=l?n[0]===u:n.indexOf(u)>-1;var y=null!=x?x:d,b={key:u,panelKey:u,header:m,headerClass:p,isActive:g,prefixCls:r,destroyInactivePanel:null!=h?h:o,openMotion:s,accordion:l,children:e.props.children,onItemClick:"disabled"===y?null:a.onClickItem,expandIcon:c,collapsible:y};return"string"==typeof e.type?e:(Object.keys(b).forEach(function(e){void 0===b[e]&&delete b[e]}),v.cloneElement(e,b))},a.getItems=function(){var e=a.props.children;return(0,p.Z)(e).map(a.getNewChild)},a.setActiveKey=function(e){"activeKey"in a.props||a.setState({activeKey:e}),a.props.onChange(a.props.accordion?e[0]:e)};var a,i=e.activeKey,r=e.defaultActiveKey;return"activeKey"in e&&(r=i),a.state={activeKey:k(r)},a}return(0,d.Z)(n,[{key:"shouldComponentUpdate",value:function(e,t){return!x()(this.props,e)||!x()(this.state,t)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,a=t.className,r=t.style,s=t.accordion,o=l()((e={},(0,i.Z)(e,n,!0),(0,i.Z)(e,a,!!a),e));return v.createElement("div",{className:o,style:r,role:s?"tablist":null},this.getItems())}}],[{key:"getDerivedStateFromProps",value:function(e){var t={};return"activeKey"in e&&(t.activeKey=k(e.activeKey)),t}}]),n}(v.Component);j.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1},j.Panel=Z,j.Panel;var N=n(97485),S=n(17399),E=n(99293),P=n(84476),O=function(e){var t,n=v.useContext(S.E_),s=n.getPrefixCls,o=n.direction,c=e.prefixCls,d=e.className,u=e.bordered,f=e.ghost,m=e.expandIconPosition,h=void 0===m?"start":m,x=s("collapse",c),g=v.useMemo(function(){return"left"===h?"start":"right"===h?"end":h},[h]),y=l()("".concat(x,"-icon-position-").concat(g),(0,i.Z)((0,i.Z)((0,i.Z)({},"".concat(x,"-borderless"),!(void 0===u||u)),"".concat(x,"-rtl"),"rtl"===o),"".concat(x,"-ghost"),!!f),void 0===d?"":d),b=(0,a.Z)((0,a.Z)({},E.ZP),{motionAppear:!1,leavedClassName:"".concat(x,"-content-hidden")});return v.createElement(j,(0,a.Z)({openMotion:b},e,{expandIcon:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.expandIcon,a=n?n(t):v.createElement(r.Z,{rotate:t.isActive?90:void 0});return(0,P.Tm)(a,function(){return{className:l()(a.props.className,"".concat(x,"-arrow"))}})},prefixCls:x,className:y}),(t=e.children,(0,p.Z)(t).map(function(e,t){var n;if(null===(n=e.props)||void 0===n?void 0:n.disabled){var i=e.key||String(t),r=e.props,s=r.disabled,l=r.collapsible,o=(0,a.Z)((0,a.Z)({},(0,N.Z)(e.props,["disabled"])),{key:i,collapsible:null!=l?l:s?"disabled":void 0});return(0,P.Tm)(e,o)}return e})))};O.Panel=function(e){var t=v.useContext(S.E_).getPrefixCls,n=e.prefixCls,r=e.className,s=e.showArrow,o=t("collapse",n),c=l()((0,i.Z)({},"".concat(o,"-no-arrow"),!(void 0===s||s)),void 0===r?"":r);return v.createElement(j.Panel,(0,a.Z)({},e,{prefixCls:o,className:c}))};var I=O},23061:function(e,t,n){"use strict";var a=n(67294),i=n(64773),r=n(98947);t.Z=function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,a.useRef)({}),n=(0,i.Z)();return(0,a.useEffect)(function(){var a=r.ZP.subscribe(function(a){t.current=a,e&&n()});return function(){return r.ZP.unsubscribe(a)}},[]),t.current}},10227:function(e,t,n){"use strict";var a=n(79338);t.Z=a.Z},62828:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var a=n(4942),i=n(87462),r=n(71002),s=n(93967),l=n.n(s),o=n(67294),c=n(17399),d=n(97485),u=function(e){var t=e.prefixCls,n=e.className,r=e.style,s=e.size,c=e.shape,d=l()((0,a.Z)((0,a.Z)({},"".concat(t,"-lg"),"large"===s),"".concat(t,"-sm"),"small"===s)),u=l()((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(t,"-circle"),"circle"===c),"".concat(t,"-square"),"square"===c),"".concat(t,"-round"),"round"===c)),f=o.useMemo(function(){return"number"==typeof s?{width:s,height:s,lineHeight:"".concat(s,"px")}:{}},[s]);return o.createElement("span",{className:l()(t,d,u,n),style:(0,i.Z)((0,i.Z)({},f),r)})},f=n(1413),m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},p=n(36936),v=o.forwardRef(function(e,t){return o.createElement(p.Z,(0,f.Z)((0,f.Z)({},e),{},{ref:t,icon:m}))}),h=n(74902),x=function(e){var t=function(t){var n=e.width,a=e.rows;return Array.isArray(n)?n[t]:(void 0===a?2:a)-1===t?n:void 0},n=e.prefixCls,a=e.className,i=e.style,r=e.rows,s=(0,h.Z)(Array(r)).map(function(e,n){return o.createElement("li",{key:n,style:{width:t(n)}})});return o.createElement("ul",{className:l()(n,a),style:i},s)},g=function(e){var t=e.prefixCls,n=e.className,a=e.width,r=e.style;return o.createElement("h3",{className:l()(t,n),style:(0,i.Z)({width:a},r)})};function y(e){return e&&"object"===(0,r.Z)(e)?e:{}}var b=function(e){var t=e.prefixCls,n=e.loading,r=e.className,s=e.style,d=e.children,f=e.avatar,m=void 0!==f&&f,p=e.title,v=void 0===p||p,h=e.paragraph,b=void 0===h||h,w=e.active,C=e.round,Z=o.useContext(c.E_),k=Z.getPrefixCls,j=Z.direction,N=k("skeleton",t);if(n||!("loading"in e)){var S=!!m,E=!!v,P=!!b;if(S){var O=(0,i.Z)((0,i.Z)({prefixCls:"".concat(N,"-avatar")},E&&!P?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),y(m));I=o.createElement("div",{className:"".concat(N,"-header")},o.createElement(u,(0,i.Z)({},O)))}if(E||P){if(E){var I,z,A,_,D=(0,i.Z)((0,i.Z)({prefixCls:"".concat(N,"-title")},!S&&P?{width:"38%"}:S&&P?{width:"50%"}:{}),y(v));A=o.createElement(g,(0,i.Z)({},D))}if(P){var T,F=(0,i.Z)((0,i.Z)({prefixCls:"".concat(N,"-paragraph")},(T={},S&&E||(T.width="61%"),!S&&E?T.rows=3:T.rows=2,T)),y(b));_=o.createElement(x,(0,i.Z)({},F))}z=o.createElement("div",{className:"".concat(N,"-content")},A,_)}var K=l()(N,(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(N,"-with-avatar"),S),"".concat(N,"-active"),w),"".concat(N,"-rtl"),"rtl"===j),"".concat(N,"-round"),C),r);return o.createElement("div",{className:K,style:s},I,z)}return void 0!==d?d:null};b.Button=function(e){var t=e.prefixCls,n=e.className,r=e.active,s=e.block,f=e.size,m=(0,o.useContext(c.E_).getPrefixCls)("skeleton",t),p=(0,d.Z)(e,["prefixCls"]),v=l()(m,"".concat(m,"-element"),(0,a.Z)((0,a.Z)({},"".concat(m,"-active"),r),"".concat(m,"-block"),void 0!==s&&s),n);return o.createElement("div",{className:v},o.createElement(u,(0,i.Z)({prefixCls:"".concat(m,"-button"),size:void 0===f?"default":f},p)))},b.Avatar=function(e){var t=e.prefixCls,n=e.className,r=e.active,s=e.shape,f=e.size,m=(0,o.useContext(c.E_).getPrefixCls)("skeleton",t),p=(0,d.Z)(e,["prefixCls","className"]),v=l()(m,"".concat(m,"-element"),(0,a.Z)({},"".concat(m,"-active"),r),n);return o.createElement("div",{className:v},o.createElement(u,(0,i.Z)({prefixCls:"".concat(m,"-avatar"),shape:void 0===s?"circle":s,size:void 0===f?"default":f},p)))},b.Input=function(e){var t=e.prefixCls,n=e.className,r=e.active,s=e.block,f=e.size,m=(0,o.useContext(c.E_).getPrefixCls)("skeleton",t),p=(0,d.Z)(e,["prefixCls"]),v=l()(m,"".concat(m,"-element"),(0,a.Z)((0,a.Z)({},"".concat(m,"-active"),r),"".concat(m,"-block"),s),n);return o.createElement("div",{className:v},o.createElement(u,(0,i.Z)({prefixCls:"".concat(m,"-input"),size:void 0===f?"default":f},p)))},b.Image=function(e){var t=e.prefixCls,n=e.className,i=e.style,r=e.active,s=(0,o.useContext(c.E_).getPrefixCls)("skeleton",t),d=l()(s,"".concat(s,"-element"),(0,a.Z)({},"".concat(s,"-active"),r),n);return o.createElement("div",{className:d},o.createElement("div",{className:l()("".concat(s,"-image"),n),style:i},o.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(s,"-image-svg")},o.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:"".concat(s,"-image-path")}))))},b.Node=function(e){var t=e.prefixCls,n=e.className,i=e.style,r=e.active,s=e.children,d=(0,o.useContext(c.E_).getPrefixCls)("skeleton",t),u=l()(d,"".concat(d,"-element"),(0,a.Z)({},"".concat(d,"-active"),r),n),f=null!=s?s:o.createElement(v,null);return o.createElement("div",{className:u},o.createElement("div",{className:l()("".concat(d,"-image"),n),style:i},f))};var w=b},91624:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var a=n(4942),i=n(87462),r=n(97685),s=n(69156),l=n(93967),o=n.n(l),c=n(97485),d=n(67294),u=n(17399),f=n(22781),m=n(51964),p=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)0>t.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]]);return n},v=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)0>t.indexOf(a[i])&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]]);return n},h=new RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),x=new RegExp("^(".concat(f.E.join("|"),")$")),g=d.forwardRef(function(e,t){var n=e.prefixCls,l=e.className,f=e.style,p=e.children,g=e.icon,y=e.color,b=e.onClose,w=e.closeIcon,C=e.closable,Z=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),k=d.useContext(u.E_),j=k.getPrefixCls,N=k.direction,S=d.useState(!0),E=(0,r.Z)(S,2),P=E[0],O=E[1];d.useEffect(function(){"visible"in Z&&O(Z.visible)},[Z.visible]);var I=function(){return!!y&&(h.test(y)||x.test(y))},z=(0,i.Z)({backgroundColor:y&&!I()?y:void 0},f),A=I(),_=j("tag",n),D=o()(_,(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(_,"-").concat(y),A),"".concat(_,"-has-color"),y&&!A),"".concat(_,"-hidden"),!P),"".concat(_,"-rtl"),"rtl"===N),l),T=function(e){e.stopPropagation(),null==b||b(e),!e.defaultPrevented&&("visible"in Z||O(!1))},F="onClick"in Z||p&&"a"===p.type,K=(0,c.Z)(Z,["visible"]),L=g||null,M=L?d.createElement(d.Fragment,null,L,d.createElement("span",null,p)):p,q=d.createElement("span",(0,i.Z)({},K,{ref:t,className:D,style:z}),M,void 0!==C&&C?w?d.createElement("span",{className:"".concat(_,"-close-icon"),onClick:T},w):d.createElement(s.Z,{className:"".concat(_,"-close-icon"),onClick:T}):null);return F?d.createElement(m.Z,null,q):q});g.CheckableTag=function(e){var t=e.prefixCls,n=e.className,r=e.checked,s=e.onChange,l=e.onClick,c=p(e,["prefixCls","className","checked","onChange","onClick"]),f=(0,d.useContext(u.E_).getPrefixCls)("tag",t),m=o()(f,(0,a.Z)((0,a.Z)({},"".concat(f,"-checkable"),!0),"".concat(f,"-checkable-checked"),r),n);return d.createElement("span",(0,i.Z)({},c,{className:m,onClick:function(e){null==s||s(!r),null==l||l(e)}}))};var y=g},19711:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return W}});var a=n(85893),i=n(67294),r=n(62828),s=n(75543),l=n(3816),o=n(10227),c=n(78021),d=n(71397),u=n(45662),f=n(29675),m=n(30797),p=n(12642),v=n(61913),h=n(5152),x=n.n(h),g=n(37039),y=n(4481),b=n(54495),w=n(23657),C=n(41664),Z=n.n(C),k=n(10907),j=n(86560),N=n(11992);let{Panel:S}=j.default,{Title:E,Link:P}=w.default,O=e=>{let{title:t,url:n,content_html:i,date_published:r,defaultOpen:s=!1}=e,{t:l}=(0,g.$G)(),o=new Date(r),c=(0,p.WU)(o,"MMM dd, yyyy, HH:mm");return(0,a.jsx)("article",{children:(0,a.jsx)(j.default,{defaultActiveKey:s?n:null,children:(0,a.jsxs)(S,{header:t,children:[(0,a.jsxs)("p",{className:"timestamp",children:[c," (",(0,a.jsx)(P,{href:"".concat("https://owncast.online").concat(n),target:"_blank",rel:"noopener noreferrer",children:l("Link")}),")"]}),(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})]},n)})})},I=()=>{let{t:e}=(0,g.$G)(),[t,n]=(0,i.useState)([]),[s,l]=(0,i.useState)(!0),o=async()=>{l(!1);try{let e=await (0,N.kg)("https://owncast.online/news/index.json");(null==e?void 0:e.items.length)>0&&n(e.items)}catch(e){console.log("==== error",e)}};(0,i.useEffect)(()=>{o()},[]);let c=s?(0,a.jsx)(r.Z,{loading:!0,active:!0}):null,d=s||0!==t.length?null:(0,a.jsx)("div",{children:e("No news.")});return(0,a.jsxs)("section",{className:"news-feed form-module",children:[(0,a.jsx)(E,{level:2,children:e("News & Updates from Owncast")}),c,t.map(e=>(0,i.createElement)(O,{...e,key:e.url,defaultOpen:1===t.length})),d]})},{Paragraph:z,Text:A}=w.default,{Title:_}=w.default,{Meta:D}=l.default,T=x()(()=>Promise.all([n.e(3247),n.e(5775)]).then(n.t.bind(n,85775,23)),{loadableGenerated:{webpack:()=>[85775]},ssr:!1}),F=x()(()=>Promise.all([n.e(3247),n.e(8173)]).then(n.t.bind(n,68173,23)),{loadableGenerated:{webpack:()=>[68173]},ssr:!1}),K=x()(()=>Promise.all([n.e(3247),n.e(4928)]).then(n.t.bind(n,54928,23)),{loadableGenerated:{webpack:()=>[54928]},ssr:!1}),L=x()(()=>Promise.all([n.e(3247),n.e(3535)]).then(n.t.bind(n,53535,23)),{loadableGenerated:{webpack:()=>[53535]},ssr:!1}),M=e=>{var t,r,s;let d,{logs:u=[],config:f}=e,m=(0,i.useContext)(y.a),{t:p}=(0,g.$G)(),{serverConfig:v}=m||{},{rtmpServerPort:h,streamKeyOverridden:x}=v,w=(null===(t=n.g.window)||void 0===t?void 0:t.location.hostname)||"";w&&h&&(d="rtmp://".concat(w.replace(/(^\w+:|^)\/\//,""),":").concat(h,"/live"));let C=[{icon:(0,a.jsx)(T,{twoToneColor:"#6f42c1"}),title:p("Use your broadcasting software"),content:(0,a.jsxs)("div",{children:[(0,a.jsx)("a",{href:"https://owncast.online/docs/broadcasting/?source=admin",target:"_blank",rel:"noopener noreferrer",children:p("Learn how to point your existing software to your new server and start streaming your content.")}),(0,a.jsxs)("div",{className:"stream-info-container",children:[(0,a.jsx)(A,{strong:!0,className:"stream-info-label",children:p("Streaming URL:")}),d&&(0,a.jsx)(z,{className:"stream-info-box",copyable:!0,children:d}),(0,a.jsx)(A,{strong:!0,className:"stream-info-label",children:p("Streaming Keys:")}),(0,a.jsx)(A,{strong:!0,className:"stream-info-box",children:x?(0,a.jsx)("span",{style:{paddingLeft:"10px",fontWeight:"normal"},children:p("Overridden via command line.")}):(0,a.jsxs)(Z(),{href:"/admin/config/server",children:[" ",p("View")," "]})})]})]})},{icon:(0,a.jsx)(K,{twoToneColor:"#f9826c"}),title:p("Embed your video onto other sites"),content:(0,a.jsx)("div",{children:(0,a.jsx)("a",{href:"https://owncast.online/docs/embed?source=admin",target:"_blank",rel:"noopener noreferrer",children:p("Learn how you can add your Owncast stream to other sites you control.")})})}];return(null==f?void 0:f.chatDisabled)||C.push({icon:(0,a.jsx)(F,{twoToneColor:"#0366d6"}),title:p("Chat is disabled"),content:(0,a.jsx)("span",{children:p("Chat will continue to be disabled until you begin a live stream.")})}),(null==f?void 0:null===(r=f.yp)||void 0===r?void 0:r.enabled)||C.push({icon:(0,a.jsx)(L,{twoToneColor:"#D18BFE"}),title:p("Find an audience on the Owncast Directory"),content:(0,a.jsxs)("div",{children:[p("List yourself in the Owncast Directory and show off your stream. Enable it in")," ",(0,a.jsx)(Z(),{href:"/admin/config/general/",children:p("settings.")})]})}),(null==f?void 0:null===(s=f.federation)||void 0===s?void 0:s.enabled)||C.push({icon:(0,a.jsx)("img",{alt:"fediverse",width:"20px",src:"/img/fediverse-color.png"}),title:p("Add your Owncast instance to the Fediverse"),content:(0,a.jsxs)("div",{children:[(0,a.jsx)(Z(),{href:"/admin/config-federation/",children:p("Enable Owncast social features")})," ",p("to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.")]})}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{children:(0,a.jsx)(c.Z,{span:12,offset:6,children:(0,a.jsxs)("div",{className:"offline-intro",children:[(0,a.jsx)("span",{className:"logo",children:(0,a.jsx)(k.C,{variant:"simple"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(_,{level:2,children:p("No stream is active")}),(0,a.jsx)("p",{children:p("You should start one.")})]})]})})}),(0,a.jsxs)(o.Z,{gutter:[16,16],className:"offline-content",children:[(0,a.jsx)(c.Z,{span:12,xs:24,sm:24,md:24,lg:12,className:"list-section",children:C.map(e=>(0,a.jsx)(l.default,{size:"small",bordered:!1,children:(0,a.jsx)(D,{avatar:e.icon,title:e.title,description:e.content})},e.title))}),(0,a.jsx)(c.Z,{span:12,xs:24,sm:24,md:24,lg:12,children:(0,a.jsx)(I,{})})]}),(0,a.jsx)(b.o,{logs:u,initialPageSize:5})]})};var q=n(48326),R=n(74040),U=n(25889);let B=x()(()=>Promise.all([n.e(3247),n.e(6681)]).then(n.t.bind(n,96681,23)),{loadableGenerated:{webpack:()=>[96681]},ssr:!1}),G=x()(()=>Promise.all([n.e(3247),n.e(1429)]).then(n.t.bind(n,25072,23)),{loadableGenerated:{webpack:()=>[25072]},ssr:!1});function H(e){return(0,a.jsxs)("ul",{className:"statistics-list",children:[(0,a.jsxs)("li",{children:[e.videoCodec||"Unknown"," @ ",e.videoBitrate||"Unknown"," kbps"]}),(0,a.jsxs)("li",{children:[e.framerate||"Unknown"," fps"]}),(0,a.jsxs)("li",{children:[e.width," x ",e.height]})]})}function W(){var e,t;let{t:n}=(0,g.$G)(),h=(0,i.useContext)(y.a),{broadcaster:x,serverConfig:w}=h||{},{remoteAddr:C,streamDetails:Z}=x||{},k=(null==Z?void 0:Z.encoder)||"Unknown encoder",[j,S]=(0,i.useState)([]),E=async()=>{try{let e=await (0,N.rQ)(N.WQ);S(e)}catch(e){console.log("==== error",e)}},P=()=>{E()};if((0,i.useEffect)(()=>{P();let e=null;return e=setInterval(P,N.NE),()=>{clearInterval(e)}},[]),(0,R.Qr)(w)||(0,R.Qr)(h))return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{active:!0}),(0,a.jsx)(r.Z,{active:!0}),(0,a.jsx)(r.Z,{active:!0})]});if(!x)return(0,a.jsx)(M,{logs:j,config:w});let O=null==h?void 0:null===(t=h.currentBroadcast)||void 0===t?void 0:null===(e=t.outputSettings)||void 0===e?void 0:e.map(e=>{let{audioPassthrough:t,videoPassthrough:i,audioBitrate:r,videoBitrate:l,framerate:o}=e,c=t?"".concat(Z.audioCodec||"Unknown",", ").concat(Z.audioBitrate," kbps"):"".concat(r||"Unknown"," kbps"),d=i?"".concat(Z.videoBitrate||"Unknown"," kbps, ").concat(Z.framerate," fps ").concat(Z.width," x ").concat(Z.height):"".concat(l||"Unknown"," kbps, ").concat(o," fps");return(0,a.jsxs)("div",{className:"stream-details-item-container",children:[(0,a.jsx)(s.Z,{className:"stream-details-item",title:n("Outbound Video Stream"),value:d}),(0,a.jsx)(s.Z,{className:"stream-details-item",title:n("Outbound Audio Stream"),value:c})]})}),{viewerCount:z,sessionPeakViewerCount:A}=h,_="".concat(Z.audioCodec,", ").concat(Z.audioBitrate||"Unknown"," kbps"),D=new Date(x.time);return(0,a.jsxs)("div",{className:"home-container",children:[(0,a.jsxs)("div",{className:"sections-container",children:[(0,a.jsx)("div",{className:"online-status-section",children:(0,a.jsxs)(l.default,{size:"small",type:"inner",className:"online-details-card",children:[(0,a.jsxs)(o.Z,{gutter:[16,16],align:"middle",children:[(0,a.jsx)(c.Z,{span:8,sm:24,md:8,children:(0,a.jsx)(s.Z,{title:"".concat(n("Stream started")," ").concat(function(e,t,n){var a,i,r,s,l,o,c,v,h,x;let g;let[y,b]=(0,f.d)(void 0,e,t),w=(0,u.j)(),C=null!==(o=(l=void 0,w.locale))&&void 0!==o?o:d._,Z=null!==(x=null!==(h=null!==(c=void 0,v=void 0!==c?c:null==n?void 0:null===(i=n.locale)||void 0===i?void 0:null===(a=i.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==v?v:w.weekStartsOn)&&void 0!==h?h:null===(s=w.locale)||void 0===s?void 0:null===(r=s.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==x?x:0,k=(0,m.w)(y,b);if(isNaN(k))throw RangeError("Invalid time value");g=k<-6?"other":k<-1?"lastWeek":k<0?"yesterday":k<1?"today":k<2?"tomorrow":k<7?"nextWeek":"other";let j=C.formatRelative(g,y,b,{locale:C,weekStartsOn:Z});return(0,p.WU)(y,j,{locale:C,weekStartsOn:Z})}(D,Date.now())),value:(0,v.Q)(D),prefix:(0,a.jsx)(G,{})})}),(0,a.jsx)(c.Z,{span:8,sm:24,md:8,children:(0,a.jsx)(s.Z,{title:n("Viewers"),value:z,prefix:(0,a.jsx)(B,{})})}),(0,a.jsx)(c.Z,{span:8,sm:24,md:8,children:(0,a.jsx)(s.Z,{title:n("Peak viewer count"),value:A,prefix:(0,a.jsx)(B,{})})})]}),(0,a.jsx)(q.j,{})]})}),(0,a.jsxs)(o.Z,{gutter:[16,16],className:"section stream-details-section",children:[(0,a.jsxs)(c.Z,{className:"stream-details",span:12,sm:24,md:24,lg:12,children:[(0,a.jsx)(l.default,{size:"small",title:n("Outbound Stream Details"),type:"inner",className:"outbound-details",children:O}),(0,a.jsxs)(l.default,{size:"small",title:n("Inbound Stream Details"),type:"inner",children:[(0,a.jsx)(s.Z,{className:"stream-details-item",title:n("Input"),value:"".concat(k," ").concat((0,R.t5)(C))}),(0,a.jsx)(s.Z,{className:"stream-details-item",title:n("Inbound Video Stream"),value:Z,formatter:H}),(0,a.jsx)(s.Z,{className:"stream-details-item",title:n("Inbound Audio Stream"),value:_})]})]}),(0,a.jsx)(c.Z,{span:12,xs:24,sm:24,md:24,lg:12,children:(0,a.jsx)(I,{})})]})]}),(0,a.jsx)("br",{}),(0,a.jsx)(b.o,{logs:j,initialPageSize:5})]})}W.getLayout=function(e){return(0,a.jsx)(U.l,{page:e})}},11163:function(e,t,n){e.exports=n(43079)},85408:function(e){"use strict";e.exports=JSON.parse('{"Notify":"Benachrichtigen","Powered by Owncast":"Betrieben von Owncast","Documentation":"Dokumentation","Contribute":"Beitragen","Source":"Quelle","Skip to player":"Zum Spieler springen","Skip to offline message":"Zur Offline-Nachricht springen","Skip to page content":"Direkt zum Hauptinhalt","Skip to footer":"Zum Footer springen","Chat will be available when the stream is live":"Chat ist verf\xfcgbar, wenn der Stream live ist.","Chat is offline":"Chat ist offline","Stay updated!":"Bleiben Sie auf dem Laufenden Ihrer T\xe4tigkeiten!","Click and never miss future streams!":"Klicke und verpasse niemals zuk\xfcnftige Streams!","This stream is offline":"Dieser Stream ist offline.","the next time goes live":"das n\xe4chste Mal geht live","Follow":"Folgen","on the Fediverse to see the next time goes live":"on the Fediverse to see the next time goes live","Last live ago":"Zuletzt live"}')},46594:function(e){"use strict";e.exports=JSON.parse('{"Notify":"Notify","Powered by Owncast":"Powered by Owncast","Documentation":"Documentation","Contribute":"Contribute","Source":"Source","Skip to player":"Skip to player","Skip to offline message":"Skip to offline message","Skip to page content":"Skip to page content","Skip to footer":"Skip to footer","Chat will be available when the stream is live":"Chat will be available when the stream is live.","Chat is offline":"Chat is offline","Stay updated!":"Stay updated!","Click and never miss future streams!":"Click and never miss future streams!","This stream is offline":"This stream is offline.","the next time goes live":"the next time {{streamer}} goes live","Follow":"Follow","on the Fediverse to see the next time goes live":"on the Fediverse to see the next time goes live","Last live ago":"Last live {{timeAgo}} ago"}')},88627:function(e){"use strict";e.exports=JSON.parse('{"Notify":"Notificar","Powered by Owncast":"Desarrollado por Owncast","Documentation":"Documentaci\xf3n","Contribute":"Contribuir","Source":"Fuente","Skip to player":"Skip to player","Skip to offline message":"Skip to offline message","Skip to page content":"Skip to page content","Skip to footer":"Skip to footer","Chat will be available when the stream is live":"Chat will be available when the stream is live.","Chat is offline":"Chat is offline","Stay updated!":"Stay updated!","Click and never miss future streams!":"Click and never miss future streams!","This stream is offline":"This stream is offline.","the next time goes live":"the next time {{streamer}} goes live","Follow":"Follow","on the Fediverse to see the next time goes live":"on the Fediverse to see the next time goes live","Last live ago":"Last live {{timeAgo}} ago"}')},57457:function(e){"use strict";e.exports=JSON.parse('{"Notify":"Avertir","Powered by Owncast":"Propuls\xe9 par Owncast","Documentation":"Documentation","Contribute":"Contribuer","Source":"Source","Skip to player":"Passer au joueur","Skip to offline message":"Aller au message d\'absence","Skip to page content":"Aller au contenu principal","Skip to footer":"Aller au pied de page","Chat will be available when the stream is live":"Le chat sera disponible quand le direct d\xe9butera.","Chat is offline":"Le chat est hors ligne","Stay updated!":"Restez \xe0 jour\xa0!","Click and never miss future streams!":"Cliquez et ne manquez jamais les futurs diffusions !","This stream is offline":"Ce serveur est hors-ligne.","the next time goes live":"la prochaine fois que diffuse en direct","Follow":"Suivre","on the Fediverse to see the next time goes live":"sur le F\xe9diverse pour voir la prochaine fois que lance un direct","Last live ago":"Derni\xe8re diffusion il y a"}')}},function(e){e.O(0,[83,1287,3800,7786,443,9904,3657,6167,2502,7528,9532,449,7043,4065,9307,2642,7039,1913,6179,1115,5889,2888,9774,179],function(){return e(e.s=64830)}),_N_E=e.O()}]);