(()=>{"use strict";const e=new Set;function t(e,t,i){e.clearRect(0,0,i.sizePx,i.sizePx),e.beginPath(),e.arc(i.sizePx/2,i.sizePx/2,i.sizePx/2-i.drawingRelativePx,-.5*Math.PI,-.5*Math.PI+2*Math.PI*y(t)),e.stroke()}function i(e,i,a){t(e,1,a),e.beginPath(),e.arc(a.sizePx/2,a.sizePx/2,a.sizePx/2-a.drawingRelativePx,0,2*Math.PI),e.clip();const n=-13*a.drawingRelativePx,o=l*a.drawingRelativePx;let r=n;r=i<.35?n+(o-n)/2*y(i/.35):i<.65?n+(o-n)/2:n+(o-n)/2+(o-n)/2*y((i-.65)/.35),e.beginPath(),e.moveTo(13*a.drawingRelativePx,r),e.lineTo(13*a.drawingRelativePx,7*a.drawingRelativePx+r),e.lineTo(10*a.drawingRelativePx,7*a.drawingRelativePx+r),e.lineTo(16*a.drawingRelativePx,13*a.drawingRelativePx+r),e.lineTo(22*a.drawingRelativePx,7*a.drawingRelativePx+r),e.lineTo(19*a.drawingRelativePx,7*a.drawingRelativePx+r),e.lineTo(19*a.drawingRelativePx,r),e.lineTo(13*a.drawingRelativePx,r),e.closePath(),e.fill()}function a(e,i,a){t(e,1,a);for(const t of x){const n=Math.max(0,Math.min((y(i)-t.delay)/t.duration,1));switch(t.type){case"rect":o(e,t.x1,t.y1,t.x2,t.y2,n,a);continue;case"line":r(e,t.x1,t.y1,t.x2,t.y2,n,a);continue}}}function n(e,i,n,o){t(i,1,o),n<.5&&a(i,1,o);const r=o.iteration%2?"rotateY":"rotateX",l=Math.round(180*y(n));e.style.transform=`${r}(${l}deg)`}function o(e,t,i,a,n,o,r){const l=t*r.drawingRelativePx,d=i*r.drawingRelativePx,x=(a-t)*r.drawingRelativePx,y=(n-i)*r.drawingRelativePx;e.globalAlpha=o,e.fillRect(l+x*(1-o)/2,d+y*(1-o)/2,x*o,y*o),e.globalAlpha=1}function r(e,t,i,a,n,o,r){e.beginPath(),e.moveTo(t*r.drawingRelativePx,(i+.5)*r.drawingRelativePx),e.lineTo((t+(a-t)*o)*r.drawingRelativePx,(i+.5+(n-i)*o)*r.drawingRelativePx),e.stroke()}const l=32,d=[{from:-8/33,to:0,type:"drawCircle"},{from:0,to:11/33,type:"drawArrow"},{from:12/33,to:24/33,type:"drawShapes"},{from:25/33,to:32/33,type:"rotate"}],x=[{type:"rect",x1:7,y1:7,x2:14,y2:14,delay:0,duration:.625},{type:"line",x1:15,x2:22,y1:7,y2:7,delay:.15,duration:.675},{type:"line",x1:15,x2:25,y1:9,y2:9,delay:.175,duration:.8},{type:"line",x1:15,x2:26,y1:11,y2:11,delay:.125,duration:.575},{type:"line",x1:15,x2:20,y1:13,y2:13,delay:.15,duration:.6},{type:"line",x1:7,x2:25,y1:15,y2:15,delay:0,duration:1},{type:"line",x1:7,x2:26,y1:17,y2:17,delay:0,duration:.65},{type:"line",x1:7,x2:17,y1:19,y2:19,delay:0,duration:.775},{type:"line",x1:7,x2:25,y1:21,y2:21,delay:0,duration:1},{type:"line",x1:7,x2:24,y1:23,y2:23,delay:0,duration:.825},{type:"line",x1:7,x2:19,y1:25,y2:25,delay:0,duration:.875}];function y(e){function t(e){return Math.pow(e,4)}const i=Math.max(0,Math.min(1,e));return i<.5?t(2*i)/2:1-t(-2*i+2)/2}!function(o,{drawCircle:r=!0,drawDurationMs:x=3300,color:y="#ddd",sizePx:c=64}={}){const s=null==o?void 0:o.getContext("2d");if(!o||!s||e.has(o))return;e.add(o);const w=window.devicePixelRatio??1;o.style.cssText=`\n    position: absolute;\n    top: calc(50% - ${c/2}px);\n    left: calc(50% - ${c/2}px);\n    height: ${c}px;\n    width: ${c};\n  `,o.width=c*w,o.height=c*w,s.fillStyle=y,s.strokeStyle=y,s.lineWidth=c/l*w;const P=Date.now()+(r?x/33*8:0),u=()=>{const r=Math.ceil((Date.now()-P)/x),y=(Date.now()-P)%x/x;!function(e,o,r){o.save();try{e.style.transform="";for(const l of d)if(r.p>=l.from&&r.p<=l.to){const d=(r.p-l.from)/(l.to-l.from);switch(l.type){case"drawCircle":return void t(o,d,r);case"drawArrow":return void i(o,d,r);case"drawShapes":return void a(o,d,r);case"rotate":return void n(e,o,d,r)}}}finally{o.restore()}}(o,s,{p:y,iteration:r,sizePx:c*w,drawingRelativePx:c*w/l}),o.isConnected?requestAnimationFrame(u):e.delete(o)};u()}(document.getElementById("throbber"))})();
//# sourceMappingURL=throbber.b453da04069e3faa5138.js.map