PageSourceSearch

https://brickfilms.com/assets/LayoutAsync-eDGjVeha.js

js brickfilms.com collected 2026-10-01 11:33:09 UTC 8,057 bytes, 2 lines download raw bytes

1import{o as e,t}from"./rolldown-runtime-C0FnF6B9.js";import{m as n,t as r}from"./jsx-runtime-By_aJMXI.js";import{t as i}from"./react-DiVRNtpo.js";import{t as a}from"./prop-types-D9WxI36-.js";import{mt as o,pt as s}from"./index-C4Fz2al5.js";var c=t(((e,t)=>{(()=>{var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{default:()=>_,useKonami:()=>g});let r=i();var o=e.n(r);let s=a();var c=e.n(s);let l=function(){function e(e,t){this.t=t,this.fn=e,this.timerIntervalID=setInterval(this.fn,this.t)}return e.prototype.stop=function(){return this.timerIntervalID&&(clearInterval(this.timerIntervalID),this.timerIntervalID=null),this},e.prototype.start=function(){return this.timerIntervalID||(this.stop(),this.timerIntervalID=setInterval(this.fn,this.t)),this},e.prototype.reset=function(e){return this.t=e,this.stop().start()},e}(),u=function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length===t.length&&e.every((function(e,n){return e===t[n]}))};var d,f=[38,38,40,40,37,39,37,39,66,65],p=(d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},d(e,t)},function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);function n(){this.constructor=e}d(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}),m={action:c().func,className:c().string,code:c().arrayOf(c().number),disabled:c().bool,onTimeout:c().func,resetDelay:c().number,timeout:c().number},h=function(e){function t(t){var n=e.call(this,t)||this;return n.state={done:!1,input:[]},n.timeoutID=null,n.onKeyUp=n.onKeyUp.bind(n),n.resetInput=n.resetInput.bind(n),n}return p(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.resetDelay;document.addEventListener(`keyup`,this.onKeyUp);var n=Number(t);n!==0&&(this._timer=new l((function(){return e.resetInput()}),n))},t.prototype.shouldComponentUpdate=function(e,t){return this.props.className!==e.className||this.props.disabled!==e.disabled||this.state.done!==t.done},t.prototype.componentWillUnmount=function(){var e=this.props.resetDelay;this.timeoutID&&clearTimeout(this.timeoutID),e!==0&&this._timer.stop(),document.removeEventListener(`keyup`,this.onKeyUp)},t.prototype.onKeyUp=function(e){var t=this,n=this.state,r=n.done,i=n.input,a=this.props,o=a.action,s=a.code,c=a.disabled,l=a.onTimeout,d=a.resetDelay,f=a.timeout,p=Number(d);c||(p!==0&&this._timer.reset(p),i.push(e.keyCode),s&&i.splice(-s.length-1,i.length-s.length),this.setState({input:i},(function(){u(t.state.input,s)&&!r&&(p!==0&&t._timer.stop(),t.setState({done:!0},(function(){typeof o==`function`&&o()})),f&&(t.timeoutID=setTimeout((function(){t.setState({done:!1}),typeof l==`function`&&l()}),Number(f))))})))},t.prototype.resetInput=function(){this.setState({input:[]})},t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,r=e.disabled,i=this.state.done;return o().createElement(`div`,{className:`konami ${n??``}`,style:{display:!i||r?`none`:`block`}},t)},t}(o().Component);h.defaultProps={className:``,code:f,disabled:!1,resetDelay:1e3,children:null,action:null,onTimeout:null,timeout:0},h.propTypes=m;let g=function(e,t){var n=(t===void 0?{}:t).code,i=n===void 0?f:n,a=(0,r.useState)([]),o=a[0],s=a[1],c=(0,r.useCallback)((function(t){var n=o;n.push(t.keyCode),n.splice(-i.length-1,o.length-i.length),s(n),n.join(``).includes(i.join(``))&&e()}),[o,s,i,e]);(0,r.useEffect)((function(){return document.addEventListener(`keyup`,c),function(){document.removeEventListener(`keyup`,c)}}),[c])},_=h;t.exports=n})()})),l=e(i()),u=e(c());o();var d=class{constructor(e){s(this,`PARTICLES_COLOR`,`rgba(255, 255, 255, 0.3)`),s(this,`MAX_PARTICLES`,35),s(this,`SPAWN_RATE`,100),s(this,`PARTICLES_SPEED`,16),s(this,`PARTICLES_SIZE`,2),s(this,`TURBULENCES_X`,1),s(this,`TURBULENCES_Y`,.5),s(this,`TURBULENCES_SPEED`,1),s(this,`MAX_TIMESHIFT`,Math.PI/3),s(this,`STOP`,!0),this._parent=e,this._canvas=document.createElement(`canvas`),this._canvas.style.position=`absolute`,this._canvas.style.zIndex=-2,this._canvas.style.margin=`auto`,this._canvas.style.marginTop=`0px`,this._canvas.style.pointerEvents=`none`,this._canvas.style.top=0,this._canvas.style.left=0,this._canvas.style.right=0,this._canvas.style.bottom=0,this._ctx=this._canvas.getContext(`2d`),this._lastSpawn=this._lastLoop=Date.now(),this.updateCanvasSize(),this._parent.appendChild(this._canvas),this.particles=[],window.addEventListener(`resize`,this.updateCanvasSize.bind(this))}stop(){this.STOP=!0}start(){let e=this.STOP;this.STOP=!1,e===!0&&this.loop()}updateCanvasSize(){let e=this._parent.getBoundingClientRect();this.H=e.height,this.W=e.width,this._canvas.height=this.H,this._canvas.width=this.W}
1spawnParticle(){this.particles.push({x:Math.random()*this.W,y:-this.PARTICLES_SIZE,d:Math.random()+1,s:Math.random()*this.MAX_TIMESHIFT})}loop(){this.STOP?this._ctx.clearRect(0,0,this.W,this.H):(this.update(),this.draw(),requestAnimationFrame(this.loop.bind(this)))}update(){let e=Date.now(),t=e-this._lastLoop;for(let n in this.particles){let r=this.particles[n];r.y+=t/1e3*(this.PARTICLES_SPEED*r.d*(1.5+Math.sin(e*this.TURBULENCES_SPEED/1e3+r.s)*this.TURBULENCES_Y)),r.x+=t/1e3*(this.PARTICLES_SPEED*r.d*(Math.cos(e*this.TURBULENCES_SPEED/1e3+r.s)*this.TURBULENCES_X)),(r.y-r.d*4>this.H||r.x-r.d*4>this.W||r.x+r.d*4<0)&&this.particles.splice(n,1)}this._lastSpawn<=e-this.SPAWN_RATE&&this.particles.length<this.MAX_PARTICLES&&(this._lastSpawn=e,this.spawnParticle()),this._lastLoop=e}draw(){this._ctx.clearRect(0,0,this.W,this.H),this._ctx.fillStyle=this.PARTICLES_COLOR,this._ctx.beginPath();for(let e of this.particles)this._ctx.moveTo(e.x,e.y),this._ctx.arc(e.x,e.y,e.d*this.PARTICLES_SIZE,0,Math.PI*2,!0);this._ctx.fill()}},f={"joke-1":`_joke-1_1bm0v_7`,"joke-2":`_joke-2_1bm0v_23`,joke2:`_joke2_1bm0v_1`,"joke-3":`_joke-3_1bm0v_42`,joke3:`_joke3_1bm0v_1`,"joke-4":`_joke-4_1bm0v_68`,joke4:`_joke4_1bm0v_1`,"joke-5":`_joke-5_1bm0v_121`,joke5:`_joke5_1bm0v_1`,"joke-6":`_joke-6_1bm0v_142`,joke6:`_joke6_1bm0v_1`,"joke-7":`_joke-7_1bm0v_163`,"joke-8":`_joke-8_1bm0v_180`,"joke-9":`_joke-9_1bm0v_186`,"joke-10":`_joke-10_1bm0v_192`,joke10:`_joke10_1bm0v_1`,"joke-11":`_joke-11_1bm0v_214`,"joke-12":`_joke-12_1bm0v_220`,"joke-13":`_joke-13_1bm0v_244`,"joke-14":`_joke-14_1bm0v_251`},p=Math.floor(Math.random()*Object.keys(f).filter(e=>/^joke-/.test(e)).length)+1,m=()=>{let e=new Date;return e.getDate()===1&&e.getMonth()===3},h=({onObtainBadge:e})=>((0,l.useEffect)(()=>{let t=setInterval(async()=>{m()&&e(`a917d55b-46b3-4065-9b75-4f8ce7c02b8a`)},15e3);return()=>clearInterval(t)},[e]),m()&&(localStorage.getItem(n)?console.log(`🍣 No fun allowed`):[...document.documentElement.classList].some(e=>e===f[`joke-${p}`])||(console.log(`🎣 Joke #${p}`),document.documentElement.classList.forEach(e=>{for(let t of Object.keys(f))if(e===f[t]){document.documentElement.classList.remove(e);break}}),document.documentElement.classList.add(f[`joke-${p}`]))),null),g=r(),_=null,v=({currentUser:e,onObtainBadge:t})=>((0,l.useEffect)(()=>{let e=setInterval(async()=>{new Date().getHours()===4&&t(`ec033641-9d14-4e95-b623-4698b31f19a9`)},15e3);return()=>clearInterval(e)},[t]),(0,l.useLayoutEffect)(()=>{(new Date().getMonth()===11||new Date().getDate()<=6&&new Date().getMonth()===0)&&document.querySelector(`header`)&&(_||(_=new d(document.querySelector(`header`))),_.start())},[]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(u.default,{action:()=>t(`bbf75c71-8c09-4988-ab78-34068c97c474`)}),e&&(0,g.jsx)(h,{onObtainBadge:t})]}));export{v as default};
2//# sourceMappingURL=LayoutAsync-eDGjVeha.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.