1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1081],{31081:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return m}});var r=n(85893),o=n(37485),i=n(67294);function s(t,e){var n;let r;let o=(n=a(t,e),r=t.getTotalLength(),e.undraw?-(n*r):(1-n)*r);e.invert&&(o=-o),t.style.strokeDashoffset=o+""}function a(t,e){let n=window.innerHeight,r=t.getBoundingClientRect().top-e.offset,o=t.getBoundingClientRect().height,i=(-r+n*("top"===e.draw_origin?.25:"center"===e.draw_origin?.5:"bottom"===e.draw_origin?.75:e.draw_origin))/o*e.speed;return i>1?i=1:i<0&&(i=0),i}function l(t){return null==t?(console.error("SVG Path not found ~ Check id or class name"),!1):"path"!==t.tagName?(console.error(`${t.outerHTML} is not a path`),!1):!(0>=t.getTotalLength())&&"number"==typeof t.getTotalLength()||(console.error(`${t.outerHTML} has no length`),!1)}function u(t,e){let n=0;try{Object.keys(t).map(t=>{switch(t){case"invert":case"draw_origin":case"offset":case"speed":case"undraw":break;default:console.error(`Invalid option ~ '${t}'`),n++}}),"boolean"!=typeof t.invert&&(console.error(`Invalid invert option. Must be a boolean. Is currently ~ ${t.invert}`),n++),"top"!==t.draw_origin&&"center"!==t.draw_origin&&"bottom"!==t.draw_origin&&("number"!=typeof t.draw_origin||Number.isNaN(t.draw_origin))&&(console.error(`Invalid draw_origin option. Must be 'center', 'top', or 'bottom' or a number. Is currently ~ ${t.draw_origin}`),n++),"number"==typeof t.draw_origin&&t.draw_origin<0?(console.error(`Invalid draw_origin option. Must be a number greater than or equal to 0. Is currently ~ ${t.draw_origin}`),n++):"number"==typeof t.draw_origin&&t.draw_origin>1&&(console.error(`Invalid draw_origin option. Must be a number less than or equal to 1. Is currently ~ ${t.draw_origin}`),n++),("number"!=typeof t.offset||Number.isNaN(t.offset))&&(console.error(`Invalid offset option. Must be a number. Is currently ~ ${typeof t.offset} ~ ${t.offset}`),n++),("number"!=typeof t.speed||t.speed<=0||Number.isNaN(t.speed))&&(console.error(`Invalid speed option. Must be a number greater than 0. Is currently ~ ${t.speed}`),n++),"boolean"!=typeof t.undraw&&(console.error(`Invalid undraw option. Must be a boolean. Is currently ~ ${t.undraw}`),n++),n>0&&console.error(`Found ${n} errors in animation options ~ ${JSON.stringify(e)}`)}catch(t){console.error(`Error validating options ~ ${t}`),n++}return n}function c(t){let e=t.getTotalLength();t.style.strokeDasharray=e+" "+e,t.style.strokeDashoffset=e+""}var g={invert:!1,draw_origin:"center",offset:0,speed:1,undraw:!1};Object.freeze(g);var h=class{constructor(t,e){this.animationFrame=0,this.isActive=!0,this.isObservable=!0,this.svgPath=t,this.options=e,this.prevBoundingRectTop=t.getBoundingClientRect().top,c(t),s(t,e),d(this)}animate(){this.isActive||(this.isActive=!0,d(this))}stopAnimating(){this.isActive=!1,this.animationFrame=0}redraw(){s(this.svgPath,this.options)}changeOptions(t){let e={...this.options,...t};return!(u(e,t)>0)&&(this.options=e,!0)}changeSvgPath(t){return!!l(t)&&(this.svgPath=t,this.prevBoundingRectTop=t.getBoundingClientRect().top,c(t),!0)}getOptions(){return this.options}getSvgPath(){return this.svgPath}getPercentageDrawn(){return this.options.undraw?100*(1-a(this.svgPath,this.options)):100*a(this.svgPath,this.options)}clear(){this.svgPath.style.strokeDashoffset=`${this.svgPath.getTotalLength()}`}fill(){this.svgPath.style.strokeDashoffset="0"}remove(){this.stopAnimating()}},d=t=>{t.prevBoundingRectTop!==t.svgPath.getBoundingClientRect().top&&(s(t.svgPath,t.options),t.prevBoundingRectTop=t.svgPath.getBoundingClientRect().top),t.isActive&&t.isObservable?t.animationFrame=requestAnimationFrame(function(){d(t)}):cancelAnimationFrame(t.animationFrame)},p=class{constructor(){this.options=g,this.animationFrame=0,this.prevBoundingRectTop=0,this.isActive=!0,this.isObservable=!0,console.error("Scroll Svg Class Empty ~ Seems to be an error with your input."),this.svgPath=document.createElementNS("http://www.w3.org/2000/svg","path")}animate(){}stopAnimating(){}redraw(){}changeOptions(t){return!1}changeSvgPath(t){return!1}getOptions(){return g}getSvgPath(){return console.error("Invalid input to scrollSvg. Returning an empty SVGPathElement."),this.svgPath}getPercentageDrawn(){return 0}clear(){}fill(){}remove(){}},v=n(2386),f=n.n(v);function m(t){let{block:e}=t;return(0,i.useEffect)(()=>{let t=function(t,e=g){if(!l(t))return new p;let n={...g,...e};return u(n,e)>0?new p:new h(t,n)}(document.querySelector("#"+e.attrs.animated_svg_id),{invert:!1,draw_origin:"bottom",offset:0,speed:1,undraw:!1});document.addEventListener("scroll",function e(){100==t.getPercentageDrawn()&&(t.stopAnimating(),document.removeEventListener("scroll",e))})},[]),(0,r.jsx)(o.Z,{block:e,className:f().holder,children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:e.attrs.content}})})}},2386:function(t){t.exports={holder:"animated-svg_holder__qmwTR"}}}]); 2//# sourceMappingURL=1081.ff59397219a3a243.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.