Bundle embedded web app

This commit is contained in:
Owncast 2023-05-07 20:00:49 +00:00
parent fb36d32fa0
commit 0f69e38391
99 changed files with 75 additions and 73 deletions

2
static/web/404.html vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7365],{57365:function(e,t,n){function r(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}n.r(t),n.d(t,{r:function(){return b}});var a,i=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],c=["list","quote","bquote","eval","return","call","parse","deparse"],l=["if","else","repeat","while","function","for","in","next","break"],u=r(i),o=r(c),f=r(l),s=r(["if","else","repeat","while","function","for"]),p=/[+\-*\/^<>=!&|~$:]/;function m(e,t){a=null;var n=e.next();if("#"==n)return e.skipToEnd(),"comment";if("0"==n&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if("."==n&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(n))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==n||'"'==n)return t.tokenize=function(e,t){if(e.eat("\\")){var r,a=e.next();return"x"==a?e.match(/^[a-f0-9]{2}/i):("u"==a||"U"==a)&&e.eat("{")&&e.skipTo("}")?e.next():"u"==a?e.match(/^[a-f0-9]{4}/i):"U"==a?e.match(/^[a-f0-9]{8}/i):/[0-7]/.test(a)&&e.match(/^[0-7]{1,2}/),"string.special"}for(;null!=(r=e.next());){if(r==n){t.tokenize=m;break}if("\\"==r){e.backUp(1);break}}return"string"},"string";if("`"==n)return e.match(/[^`]+`/),"string.special";if("."==n&&e.match(/.(?:[.]|\d+)/))return"keyword";else if(/[a-zA-Z\.]/.test(n)){e.eatWhile(/[\w\.]/);var r=e.current();return u.propertyIsEnumerable(r)?"atom":f.propertyIsEnumerable(r)?(s.propertyIsEnumerable(r)&&!e.match(/\s*if(\s+|$)/,!1)&&(a="block"),"keyword"):o.propertyIsEnumerable(r)?"builtin":"variable"}else if("%"==n)return e.skipTo("%")&&e.next(),"variableName.special";else if("<"==n&&e.eat("-")||"<"==n&&e.match("<-")||"-"==n&&e.match(/>>?/))return"operator";else if("="==n&&t.ctx.argList)return"operator";else if(p.test(n))return"$"==n||e.eatWhile(p),"operator";else if(!/[\(\){}\[\];]/.test(n))return null;else return(a=n,";"==n)?"punctuation":null}function d(e,t,n){e.ctx={type:t,indent:e.indent,flags:0,column:n.column(),prev:e.ctx}}function k(e,t){var n=e.ctx;e.ctx={type:n.type,indent:n.indent,flags:n.flags|t,column:n.column,prev:n.prev}}function x(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}let b={name:"r",startState:function(e){return{tokenize:m,ctx:{type:"top",indent:-e,flags:2},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&((3&t.ctx.flags)==0&&(t.ctx.flags|=2),4&t.ctx.flags&&x(t),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"!=n&&(2&t.ctx.flags)==0&&k(t,1),(";"==a||"{"==a||"}"==a)&&"block"==t.ctx.type&&x(t),"{"==a?d(t,"}",e):"("==a?(d(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==a?d(t,"]",e):"block"==a?d(t,"block",e):a==t.ctx.type?x(t):"block"==t.ctx.type&&"comment"!=n&&k(t,4),t.afterIdent="variable"==n||"keyword"==n,n},indent:function(e,t,n){if(e.tokenize!=m)return 0;var r=t&&t.charAt(0),a=e.ctx,i=r==a.type;return(4&a.flags&&(a=a.prev),"block"==a.type)?a.indent+("{"==r?0:n.unit):1&a.flags?a.column+(i?0:1):a.indent+(i?0:n.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:i.concat(c,l)}}}}]);
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3032],{57365:function(e,t,n){function r(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}n.r(t),n.d(t,{r:function(){return b}});var a,i=["NULL","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","TRUE","FALSE"],c=["list","quote","bquote","eval","return","call","parse","deparse"],l=["if","else","repeat","while","function","for","in","next","break"],u=r(i),o=r(c),f=r(l),s=r(["if","else","repeat","while","function","for"]),p=/[+\-*\/^<>=!&|~$:]/;function m(e,t){a=null;var n=e.next();if("#"==n)return e.skipToEnd(),"comment";if("0"==n&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if("."==n&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(n))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==n||'"'==n)return t.tokenize=function(e,t){if(e.eat("\\")){var r,a=e.next();return"x"==a?e.match(/^[a-f0-9]{2}/i):("u"==a||"U"==a)&&e.eat("{")&&e.skipTo("}")?e.next():"u"==a?e.match(/^[a-f0-9]{4}/i):"U"==a?e.match(/^[a-f0-9]{8}/i):/[0-7]/.test(a)&&e.match(/^[0-7]{1,2}/),"string.special"}for(;null!=(r=e.next());){if(r==n){t.tokenize=m;break}if("\\"==r){e.backUp(1);break}}return"string"},"string";if("`"==n)return e.match(/[^`]+`/),"string.special";if("."==n&&e.match(/.(?:[.]|\d+)/))return"keyword";else if(/[a-zA-Z\.]/.test(n)){e.eatWhile(/[\w\.]/);var r=e.current();return u.propertyIsEnumerable(r)?"atom":f.propertyIsEnumerable(r)?(s.propertyIsEnumerable(r)&&!e.match(/\s*if(\s+|$)/,!1)&&(a="block"),"keyword"):o.propertyIsEnumerable(r)?"builtin":"variable"}else if("%"==n)return e.skipTo("%")&&e.next(),"variableName.special";else if("<"==n&&e.eat("-")||"<"==n&&e.match("<-")||"-"==n&&e.match(/>>?/))return"operator";else if("="==n&&t.ctx.argList)return"operator";else if(p.test(n))return"$"==n||e.eatWhile(p),"operator";else if(!/[\(\){}\[\];]/.test(n))return null;else return(a=n,";"==n)?"punctuation":null}function d(e,t,n){e.ctx={type:t,indent:e.indent,flags:0,column:n.column(),prev:e.ctx}}function k(e,t){var n=e.ctx;e.ctx={type:n.type,indent:n.indent,flags:n.flags|t,column:n.column,prev:n.prev}}function x(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}let b={name:"r",startState:function(e){return{tokenize:m,ctx:{type:"top",indent:-e,flags:2},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&((3&t.ctx.flags)==0&&(t.ctx.flags|=2),4&t.ctx.flags&&x(t),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"!=n&&(2&t.ctx.flags)==0&&k(t,1),(";"==a||"{"==a||"}"==a)&&"block"==t.ctx.type&&x(t),"{"==a?d(t,"}",e):"("==a?(d(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==a?d(t,"]",e):"block"==a?d(t,"block",e):a==t.ctx.type?x(t):"block"==t.ctx.type&&"comment"!=n&&k(t,4),t.afterIdent="variable"==n||"keyword"==n,n},indent:function(e,t,n){if(e.tokenize!=m)return 0;var r=t&&t.charAt(0),a=e.ctx,i=r==a.type;return(4&a.flags&&(a=a.prev),"block"==a.type)?a.indent+("{"==r?0:n.unit):1&a.flags?a.column+(i?0:1):a.indent+(i?0:n.unit)},languageData:{wordChars:".",commentTokens:{line:"#"},autocomplete:i.concat(c,l)}}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6559],{10887:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/chat/emojis",function(){return n(11779)}])},11779:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return T}});var i=n(85893),o=n(59652),s=n(85818),a=n(71577),r=n(71230),l=n(15746),c=n(94199),u=n(24093),d=n(28465),m=n(67294),h=n(5152),p=n.n(h),j=n(57520),f=n(81453),g=n(80693),y=n(91332),w=n(24044),x=n(34261);let{Meta:k}=o.Z,b=p()(()=>Promise.resolve().then(n.t.bind(n,40753,23)),{loadableGenerated:{webpack:()=>[40753]},ssr:!1}),{Title:E,Paragraph:Z}=s.Z,_=()=>{let[e,t]=(0,m.useState)([]),[n,s]=(0,m.useState)(!1),[h,p]=(0,m.useState)(null),[x,_]=(0,m.useState)(null),T=null,v=()=>{p(null),clearTimeout(T),T=null};async function B(){s(!0);try{let e=await (0,f.rQ)("/api/emoji");t(e)}catch(e){console.error("error fetching emojis",e)}s(!1)}async function N(e){let t="/".concat(e.split("/").slice(3).join("/"));console.log(t),s(!0),p((0,y.kg)(y.Jk,"Deleting emoji..."));try{let e=await (0,f.rQ)(f.Ff,{method:"POST",data:{name:t}});if(e instanceof Error)throw e;p((0,y.kg)(y.zv,"Emoji deleted")),T=setTimeout(v,w.sI)}catch(e){p((0,y.kg)(y.Un,"".concat(e))),s(!1),T=setTimeout(v,w.sI)}B()}async function P(){s(!0);try{p((0,y.kg)(y.Jk,"Converting emoji..."));let e=await new Promise((e,t)=>{if(!g.dr.includes(x.type)){let e="File type is not supported: ".concat(x.type);return t(e)}(0,g.y3)(x,t=>e({name:x.name,url:t}))});p((0,y.kg)(y.Jk,"Uploading emoji..."));let t=await (0,f.rQ)(f.Qc,{method:"POST",data:{name:e.name,data:e.url}});if(t instanceof Error)throw t;p((0,y.kg)(y.zv,"Emoji uploaded successfully!")),B()}catch(e){p((0,y.kg)(y.Un,"".concat(e)))}T=setTimeout(v,w.sI),s(!1)}return(0,m.useEffect)(()=>{B()},[]),(0,i.jsxs)("div",{children:[(0,i.jsx)(E,{children:"Emojis"}),(0,i.jsx)(Z,{children:"Here you can upload new custom emojis for usage in the chat. When uploading a new emoji, the filename will be used as emoji name."}),(0,i.jsx)("br",{}),(0,i.jsx)(d.Z,{name:"emoji",listType:"picture",className:"emoji-uploader",showUploadList:!1,accept:g.dr.join(","),beforeUpload:_,customRequest:P,disabled:n,children:(0,i.jsx)(a.Z,{type:"primary",disabled:n,children:"Upload new emoji"})}),(0,i.jsx)(j.Z,{status:h}),(0,i.jsx)("br",{}),(0,i.jsx)(r.Z,{children:e.map(e=>(0,i.jsx)(l.Z,{style:{padding:"10px"},children:(0,i.jsx)(o.Z,{style:{width:120,marginTop:16},actions:[],children:(0,i.jsx)(k,{description:[(0,i.jsxs)("div",{style:{display:"flex",justifyItems:"center",alignItems:"center",flexDirection:"column",gap:"20px"},children:[(0,i.jsx)(c.Z,{title:e.name,children:(0,i.jsx)(u.C,{style:{height:50,width:50},src:e.url})}),(0,i.jsx)(a.Z,{size:"small",type:"ghost",title:"Delete emoji",style:{position:"absolute",right:0,top:0,height:24,width:24,border:"none",color:"gray"},onClick:()=>N(e.url),icon:(0,i.jsx)(b,{})})]})]})})},e.name))}),(0,i.jsx)("br",{})]})};_.getLayout=function(e){return(0,i.jsx)(x.l,{page:e})};var T=_},80693:function(e,t,n){"use strict";n.d(t,{Z7:function(){return i},dr:function(){return o},kR:function(){return a},y3:function(){return s}});let i=2097152,o=["image/png","image/jpeg","image/gif"];function s(e,t){let n=new FileReader;n.addEventListener("load",()=>t(n.result)),n.readAsDataURL(e)}function a(e){let t=Math.floor(Math.log(e)/Math.log(1024)),n=1*Number((e/Math.pow(1024,t)).toFixed(2));return"".concat(n," ").concat(["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t])}}},function(e){e.O(0,[2074,173,5874,9151,2414,4931,5402,5257,1664,8014,5818,9915,4526,9961,2118,6356,6766,4261,9774,2888,179],function(){return e(e.s=10887)}),_N_E=e.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1774],{93645:function(e,t,n){"use strict";n.d(t,{u:function(){return i}});var r={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function i(e){return e?r[e]:r.trunc}},59910:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(19013),i=n(13882);function u(e,t){return(0,i.Z)(2,arguments),(0,r.Z)(e).getTime()-(0,r.Z)(t).getTime()}},11699:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(59910),i=n(13882),u=n(93645);function l(e,t,n){(0,i.Z)(2,arguments);var l=(0,r.Z)(e,t)/1e3;return(0,u.u)(null==n?void 0:n.roundingMethod)(l)}},23426:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/logs",function(){return n(97525)}])},86177:function(e,t,n){"use strict";n.d(t,{o:function(){return f}});var r=n(85893);n(67294);var i=n(85818),u=n(20550),l=n(54398),o=n(53731),a=n(58091);let{Title:c}=i.Z;function s(e,t){let n="black";return"warning"===t.level?n="orange":"error"===t.level&&(n="red"),(0,r.jsx)(u.Z,{color:n,children:e})}function d(e){return(0,r.jsx)(o.Z,{children:e})}let f=e=>{let{logs:t,pageSize:n}=e;return(null==t?void 0:t.length)?(0,r.jsxs)("div",{className:"logs-section",children:[(0,r.jsx)(c,{children:"Logs"}),(0,r.jsx)(l.Z,{size:"middle",dataSource:t,columns:[{title:"Level",dataIndex:"level",key:"level",filters:[{text:"Info",value:"info"},{text:"Warning",value:"warning"},{text:"Error",value:"Error"}],onFilter:(e,t)=>0===t.level.indexOf(e),render:s},{title:"Timestamp",dataIndex:"time",key:"time",render:e=>{let t=new Date(e);return(0,a.Z)(t,"pp P")},sorter:(e,t)=>new Date(e.time).getTime()-new Date(t.time).getTime(),sortDirections:["descend","ascend"],defaultSortOrder:"descend"},{title:"Message",dataIndex:"message",key:"message",render:d}],rowKey:e=>e.time,pagination:{pageSize:n||20}})]}):null}},97525:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(85893),i=n(67294),u=n(86177),l=n(81453),o=n(34261);function a(){let[e,t]=(0,i.useState)([]),n=async()=>{try{let e=await (0,l.rQ)(l.sG);t(e)}catch(e){console.log("==== error",e)}};return(0,i.useEffect)(()=>{let e=null;return setInterval(n,5e3),n(),e=setInterval(n,5e3),()=>{clearInterval(e)}},[]),(0,r.jsx)(u.o,{logs:e,pageSize:20})}a.getLayout=function(e){return(0,r.jsx)(o.l,{page:e})}}},function(e){e.O(0,[173,5874,9151,2414,4931,5402,5257,1664,8014,5818,9915,4041,3698,3013,4398,7940,3731,7765,4261,9774,2888,179],function(){return e(e.s=23426)}),_N_E=e.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8399,7533],{15746:function(e,n,t){"use strict";var s=t(21584);n.Z=s.Z},71230:function(e,n,t){"use strict";var s=t(92820);n.Z=s.Z},88054:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/embed/chat/readonly",function(){return t(85466)}])},85466:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return d}});var s=t(85893),i=t(4480),r=t(37068),a=t(92093),u=t(44974),c=t(21756),o=t(69183);function d(){let e=(0,i.sJ)(u.db),n=(0,i.sJ)(u.pH),t=(0,i.sJ)(u.di);return(0,s.jsx)("div",{children:(0,s.jsxs)(r.SV,{fallbackRender:e=>{let{error:n}=e;return(0,s.jsx)(o.A,{componentName:"ReadWriteChatEmbed",message:n.message})},children:[(0,s.jsx)(u.me,{}),(0,s.jsx)(c.Q,{}),e&&(0,s.jsx)(a.ChatContainer,{messages:n,usernameToHighlight:e.displayName,chatUserId:e.id,isModerator:!1,showInput:!1,height:"100vh",chatAvailable:t})]})})}}},function(e){e.O(0,[1272,8700,9151,2414,2332,8131,2259,2700,2093,9774,2888,179],function(){return e(e.s=88054)}),_N_E=e.O()}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long