owncast/static/web/_next/static/chunks/715-9359ecf17c9f1134.js
2023-01-10 09:04:12 +00:00

2 lines
13 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[715],{10274:function(t,n,e){e.d(n,{C:function(){return a},H:function(){return c}});var r=e(86500),o=e(48701),i=e(1350),s=e(90279),a=function(){function t(n,e){if(void 0===n&&(n=""),void 0===e&&(e={}),n instanceof t)return n;"number"==typeof n&&(n=(0,r.Yt)(n)),this.originalInput=n;var o,s=(0,i.uA)(n);this.originalInput=n,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(o=e.format)&&void 0!==o?o:s.format,this.gradientType=e.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=s.ok}return t.prototype.isDark=function(){return 128>this.getBrightness()},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},t.prototype.getLuminance=function(){var t=this.toRgb(),n=t.r/255,e=t.g/255,r=t.b/255;return .2126*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(t){return this.a=(0,s.Yq)(t),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){return 0===this.toHsl().s},t.prototype.toHsv=function(){var t=(0,r.py)(this.r,this.g,this.b);return{h:360*t.h,s:t.s,v:t.v,a:this.a}},t.prototype.toHsvString=function(){var t=(0,r.py)(this.r,this.g,this.b),n=Math.round(360*t.h),e=Math.round(100*t.s),o=Math.round(100*t.v);return 1===this.a?"hsv(".concat(n,", ").concat(e,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(e,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var t=(0,r.lC)(this.r,this.g,this.b);return{h:360*t.h,s:t.s,l:t.l,a:this.a}},t.prototype.toHslString=function(){var t=(0,r.lC)(this.r,this.g,this.b),n=Math.round(360*t.h),e=Math.round(100*t.s),o=Math.round(100*t.l);return 1===this.a?"hsl(".concat(n,", ").concat(e,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(e,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(t){return void 0===t&&(t=!1),(0,r.vq)(this.r,this.g,this.b,t)},t.prototype.toHexString=function(t){return void 0===t&&(t=!1),"#"+this.toHex(t)},t.prototype.toHex8=function(t){return void 0===t&&(t=!1),(0,r.s)(this.r,this.g,this.b,this.a,t)},t.prototype.toHex8String=function(t){return void 0===t&&(t=!1),"#"+this.toHex8(t)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),e=Math.round(this.b);return 1===this.a?"rgb(".concat(t,", ").concat(n,", ").concat(e,")"):"rgba(".concat(t,", ").concat(n,", ").concat(e,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var t=function(t){return"".concat(Math.round(100*(0,s.sh)(t,255)),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var t=function(t){return Math.round(100*(0,s.sh)(t,255))};return 1===this.a?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var t="#"+(0,r.vq)(this.r,this.g,this.b,!1),n=0,e=Object.entries(o.R);n<e.length;n++){var i=e[n],s=i[0];if(t===i[1])return s}return!1},t.prototype.toString=function(t){var n=Boolean(t);t=null!=t?t:this.format;var e=!1,r=this.a<1&&this.a>=0;return!n&&r&&(t.startsWith("hex")||"name"===t)?"name"===t&&0===this.a?this.toName():this.toRgbString():("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(n){void 0===n&&(n=10);var e=this.toHsl();return e.l+=n/100,e.l=(0,s.V2)(e.l),new t(e)},t.prototype.brighten=function(n){void 0===n&&(n=10);var e=this.toRgb();return e.r=Math.max(0,Math.min(255,e.r-Math.round(-(255*(n/100))))),e.g=Math.max(0,Math.min(255,e.g-Math.round(-(255*(n/100))))),e.b=Math.max(0,Math.min(255,e.b-Math.round(-(255*(n/100))))),new t(e)},t.prototype.darken=function(n){void 0===n&&(n=10);var e=this.toHsl();return e.l-=n/100,e.l=(0,s.V2)(e.l),new t(e)},t.prototype.tint=function(t){return void 0===t&&(t=10),this.mix("white",t)},t.prototype.shade=function(t){return void 0===t&&(t=10),this.mix("black",t)},t.prototype.desaturate=function(n){void 0===n&&(n=10);var e=this.toHsl();return e.s-=n/100,e.s=(0,s.V2)(e.s),new t(e)},t.prototype.saturate=function(n){void 0===n&&(n=10);var e=this.toHsl();return e.s+=n/100,e.s=(0,s.V2)(e.s),new t(e)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(n){var e=this.toHsl(),r=(e.h+n)%360;return e.h=r<0?360+r:r,new t(e)},t.prototype.mix=function(n,e){void 0===e&&(e=50);var r=this.toRgb(),o=new t(n).toRgb(),i=e/100,s={r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a};return new t(s)},t.prototype.analogous=function(n,e){void 0===n&&(n=6),void 0===e&&(e=30);var r=this.toHsl(),o=360/e,i=[this];for(r.h=(r.h-(o*n>>1)+720)%360;--n;)r.h=(r.h+o)%360,i.push(new t(r));return i},t.prototype.complement=function(){var n=this.toHsl();return n.h=(n.h+180)%360,new t(n)},t.prototype.monochromatic=function(n){void 0===n&&(n=6);for(var e=this.toHsv(),r=e.h,o=e.s,i=e.v,s=[],a=1/n;n--;)s.push(new t({h:r,s:o,v:i})),i=(i+a)%1;return s},t.prototype.splitcomplement=function(){var n=this.toHsl(),e=n.h;return[this,new t({h:(e+72)%360,s:n.s,l:n.l}),new t({h:(e+216)%360,s:n.s,l:n.l})]},t.prototype.onBackground=function(n){var e=this.toRgb(),r=new t(n).toRgb();return new t({r:r.r+(e.r-r.r)*e.a,g:r.g+(e.g-r.g)*e.a,b:r.b+(e.b-r.b)*e.a})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(n){for(var e=this.toHsl(),r=e.h,o=[this],i=360/n,s=1;s<n;s++)o.push(new t({h:(r+s*i)%360,s:e.s,l:e.l}));return o},t.prototype.equals=function(n){return this.toRgbString()===new t(n).toRgbString()},t}();function c(t,n){return void 0===t&&(t=""),void 0===n&&(n={}),new a(t,n)}},51784:function(t,n,e){e.d(n,{Z:function(){return f}});var r=e(87462),o=e(4942),i=e(15671),s=e(43144),a=e(60136),c=e(33643),u=e(67294),h=e(73935),l=e(94184),p=e.n(l),f=function(t){(0,a.Z)(e,t);var n=(0,c.Z)(e);function e(){var t;(0,i.Z)(this,e);for(var r=arguments.length,o=Array(r),s=0;s<r;s++)o[s]=arguments[s];return(t=n.call.apply(n,[this].concat(o))).closeTimer=null,t.close=function(n){n&&n.stopPropagation(),t.clearCloseTimer();var e=t.props,r=e.onClose,o=e.noticeKey;r&&r(o)},t.startCloseTimer=function(){t.props.duration&&(t.closeTimer=window.setTimeout(function(){t.close()},1e3*t.props.duration))},t.clearCloseTimer=function(){t.closeTimer&&(clearTimeout(t.closeTimer),t.closeTimer=null)},t}return(0,s.Z)(e,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(t){(this.props.duration!==t.duration||this.props.updateMark!==t.updateMark||this.props.visible!==t.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var t=this,n=this.props,e=n.prefixCls,i=n.className,s=n.closable,a=n.closeIcon,c=n.style,l=n.onClick,f=n.children,d=n.holder,v="".concat(e,"-notice"),g=Object.keys(this.props).reduce(function(n,e){return("data-"===e.substr(0,5)||"aria-"===e.substr(0,5)||"role"===e)&&(n[e]=t.props[e]),n},{}),m=u.createElement("div",(0,r.Z)({className:p()(v,i,(0,o.Z)({},"".concat(v,"-closable"),s)),style:c,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:l},g),u.createElement("div",{className:"".concat(v,"-content")},f),s?u.createElement("a",{tabIndex:0,onClick:this.close,className:"".concat(v,"-close")},a||u.createElement("span",{className:"".concat(v,"-close-x")})):null);return d?h.createPortal(m,d):m}}]),e}(u.Component);f.defaultProps={onClose:function(){},duration:1.5}},91127:function(t,n,e){e.r(n),e.d(n,{default:function(){return C}});var r=e(45987),o=e(87462),i=e(1413),s=e(15671),a=e(43144),c=e(60136),u=e(33643),h=e(67294),l=e(38135),p=e(94184),f=e.n(p),d=e(62874),v=e(51784),g=e(51550),m=["getContainer"],y=0,b=Date.now();function k(){var t=y;return y+=1,"rcNotification_".concat(b,"_").concat(t)}var M=function(t){(0,c.Z)(e,t);var n=(0,u.Z)(e);function e(){var t;(0,s.Z)(this,e);for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return(t=n.call.apply(n,[this].concat(o))).state={notices:[]},t.hookRefs=new Map,t.add=function(n,e){var r,o=null!==(r=n.key)&&void 0!==r?r:k(),s=(0,i.Z)((0,i.Z)({},n),{},{key:o}),a=t.props.maxCount;t.setState(function(t){var n=t.notices,r=n.map(function(t){return t.notice.key}).indexOf(o),i=n.concat();return -1!==r?i.splice(r,1,{notice:s,holderCallback:e}):(a&&n.length>=a&&(s.key=i[0].notice.key,s.updateMark=k(),s.userPassKey=o,i.shift()),i.push({notice:s,holderCallback:e})),{notices:i}})},t.remove=function(n){t.setState(function(t){return{notices:t.notices.filter(function(t){var e=t.notice,r=e.key,o=e.userPassKey;return(null!=o?o:r)!==n})}})},t.noticePropsMap={},t}return(0,a.Z)(e,[{key:"getTransitionName",value:function(){var t=this.props,n=t.prefixCls,e=t.animation,r=this.props.transitionName;return!r&&e&&(r="".concat(n,"-").concat(e)),r}},{key:"render",value:function(){var t=this,n=this.state.notices,e=this.props,r=e.prefixCls,s=e.className,a=e.closeIcon,c=e.style,u=[];return n.forEach(function(e,o){var s=e.notice,c=e.holderCallback,h=o===n.length-1?s.updateMark:void 0,l=s.key,p=s.userPassKey,f=(0,i.Z)((0,i.Z)((0,i.Z)({prefixCls:r,closeIcon:a},s),s.props),{},{key:l,noticeKey:p||l,updateMark:h,onClose:function(n){var e;t.remove(n),null===(e=s.onClose)||void 0===e||e.call(s)},onClick:s.onClick,children:s.content});u.push(l),t.noticePropsMap[l]={props:f,holderCallback:c}}),h.createElement("div",{className:f()(r,s),style:c},h.createElement(d.V,{keys:u,motionName:this.getTransitionName(),onVisibleChanged:function(n,e){var r=e.key;n||delete t.noticePropsMap[r]}},function(n){var e=n.key,s=n.className,a=n.style,c=n.visible,u=t.noticePropsMap[e],l=u.props,p=u.holderCallback;return p?h.createElement("div",{key:e,className:f()(s,"".concat(r,"-hook-holder")),style:(0,i.Z)({},a),ref:function(n){void 0!==e&&(n?(t.hookRefs.set(e,n),p(n,l)):t.hookRefs.delete(e))}}):h.createElement(v.Z,(0,o.Z)({},l,{className:f()(s,null==l?void 0:l.className),style:(0,i.Z)((0,i.Z)({},a),null==l?void 0:l.style),visible:c}))}))}}]),e}(h.Component);M.newInstance=void 0,M.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},M.newInstance=function(t,n){var e=t||{},i=e.getContainer,s=(0,r.Z)(e,m),a=document.createElement("div");i?i().appendChild(a):document.body.appendChild(a);var c=!1;(0,l.s)(h.createElement(M,(0,o.Z)({},s,{ref:function(t){c||(c=!0,n({notice:function(n){t.add(n)},removeNotice:function(n){t.remove(n)},component:t,destroy:function(){(0,l.v)(a),a.parentNode&&a.parentNode.removeChild(a)},useNotification:function(){return(0,g.Z)(t)}}))}})),a)};var C=M},51550:function(t,n,e){e.d(n,{Z:function(){return c}});var r=e(74902),o=e(87462),i=e(97685),s=e(67294),a=e(51784);function c(t){var n=s.useRef({}),e=s.useState([]),c=(0,i.Z)(e,2),u=c[0],h=c[1];return[function(e){var i=!0;t.add(e,function(t,e){var c=e.key;if(t&&(!n.current[c]||i)){var u=s.createElement(a.Z,(0,o.Z)({},e,{holder:t}));n.current[c]=u,h(function(t){var n=t.findIndex(function(t){return t.key===e.key});if(-1===n)return[].concat((0,r.Z)(t),[u]);var o=(0,r.Z)(t);return o[n]=u,o})}i=!1})},s.createElement(s.Fragment,null,u)]}},38135:function(t,n,e){e.d(n,{s:function(){return m},v:function(){return b}});var r,o,i=e(74165),s=e(15861),a=e(71002),c=e(1413),u=e(73935),h=(0,c.Z)({},r||(r=e.t(u,2))),l=h.version,p=h.render,f=h.unmountComponentAtNode;try{Number((l||"").split(".")[0])>=18&&(o=h.createRoot)}catch(d){}function v(t){var n=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;n&&"object"===(0,a.Z)(n)&&(n.usingClientEntryPoint=t)}var g="__rc_react_root__";function m(t,n){if(o){var e,r;e=n,v(!0),r=e[g]||o(e),v(!1),r.render(t),e[g]=r;return}p(t,n)}function y(){return(y=(0,s.Z)((0,i.Z)().mark(function t(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.resolve().then(function(){var t;null===(t=n[g])||void 0===t||t.unmount(),delete n[g]}));case 1:case"end":return t.stop()}},t)}))).apply(this,arguments)}function b(t){return k.apply(this,arguments)}function k(){return(k=(0,s.Z)((0,i.Z)().mark(function t(n){return(0,i.Z)().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(void 0!==o)){t.next=2;break}return t.abrupt("return",function(t){return y.apply(this,arguments)}(n));case 2:f(n);case 3:case"end":return t.stop()}},t)}))).apply(this,arguments)}}}]);
//# sourceMappingURL=715-9359ecf17c9f1134.js.map