!function(t){var e={};function i(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(r,o,function(e){return t[e]}.bind(null,o));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=2)}([function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){!function(t){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],r=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function o(t,i,r,o,n){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==e(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var s=t.getContext("2d");try{return s.getImageData(i,r,o,n)}catch(t){throw new Error("unable to access image data: "+t)}}function n(t,e,i,r,n,a){if(!(isNaN(a)||a<1)){a|=0;var h=o(t,e,i,r,n);h=s(h,0,0,r,n,a),t.getContext("2d").putImageData(h,e,i)}}function s(t,e,o,n,s,a){var h,u,c,f,l,d,m,b,p,w,x,y,v,S,k,B,C,O,z,R,I,P,E,F,j,A=t.data,W=2*a+1,_=n-1,L=s-1,M=a+1,G=M*(M+1)/2,N=new g,$=N;for(c=1;c>V,0!==E?(E=255/E,A[d]=(b*T>>V)*E,A[d+1]=(p*T>>V)*E,A[d+2]=(w*T>>V)*E):A[d]=A[d+1]=A[d+2]=0,b-=y,p-=v,w-=S,x-=k,y-=D.r,v-=D.g,S-=D.b,k-=D.a,f=m+((f=h+a+1)<_?f:_)<<2,b+=B+=D.r=A[f],p+=C+=D.g=A[f+1],w+=O+=D.b=A[f+2],x+=z+=D.a=A[f+3],D=D.next,y+=R=H.r,v+=I=H.g,S+=P=H.b,k+=E=H.a,B-=R,C-=I,O-=P,z-=E,H=H.next,d+=4;m+=n}for(h=0;h>V,E>0?(E=255/E,A[f]=(b*T>>V)*E,A[f+1]=(p*T>>V)*E,A[f+2]=(w*T>>V)*E):A[f]=A[f+1]=A[f+2]=0,b-=y,p-=v,w-=S,x-=k,y-=D.r,v-=D.g,S-=D.b,k-=D.a,f=h+((f=u+M)>$,P[d+1]=p*N>>$,P[d+2]=w*N>>$,b-=x,p-=y,w-=v,x-=M.r,y-=M.g,v-=M.b,f=m+((f=h+a+1)>$,P[f+1]=p*N>>$,P[f+2]=w*N>>$,b-=x,p-=y,w-=v,x-=M.r,y-=M.g,v-=M.b,f=h+((f=u+A)(chrome|firefox|safari))\/(?[0-9]+(\.[0-9]+)?)/i);if(e){var i=(e.groups.browser||"").toLowerCase(),r=parseFloat(e.groups.version),o={};for(var n in t){var s=t[n];for(var a in o[n]=!1,s)if(i==a){r>=s[a]&&(o[n]=!0);break}}return o}}async loadImage(t,e,i){try{await fetch(t)}catch(t){this.isCrosBlocked=!0,this.img.crossOrigin=null}this.source=t,this.xCenter=e||50,this.yCenter=i||50,this.img.src=t}generateBlurImage(){return new Promise((t,i)=>{let r=document.createElement("canvas");r.width=this.img.width,r.height=this.img.height,r.getContext("2d").drawImage(this.img,0,0),e.canvasRGBA(r,0,0,r.width,r.height,this.blurRadius),r.toBlob(e=>{this.blurSource=URL.createObjectURL(e),t()})})}async onImageLoaded(){this.imgRatio=this.img.width/this.img.height,this.hasBlurArea&&!this.cssFeature.backdropFilter&&(this.isCrosBlocked?this.blurSource=this.source:await this.generateBlurImage()),this.fixPosition(),this.loaded||(this.viewports.forEach(t=>{t.css({backgroundImage:"url('"+this.source+"')",backgroundAttachement:"fixed",opacity:1})}),this.blurWidgets.forEach(t=>{t.removeClass("bgimg-background-loading")}),this.cssFeature.backdropFilter||($("body").addClass("bgimg-fallback"),this.domStyle.setProperty("--bgimg-blur-image",`url('${this.blurSource}')`)),this.loaded=!0)}onWindowResize(){this.loaded&&this.fixPosition()}getOverflowSize(t,e,i){let r=e-t,o=e*i/100-t/2;return Math.max(0,Math.min(r,o))}fixPosition(){let t=window.innerWidth/window.innerHeight;this.imgRatio>t?(this.imgSize.height=window.innerHeight,this.imgSize.width=this.imgSize.height*this.imgRatio,this.imgOffset.top=0,this.imgOffset.left=-this.getOverflowSize(window.innerWidth,this.imgSize.width,this.xCenter)):(this.imgSize.width=window.innerWidth,this.imgSize.height=this.imgSize.width/this.imgRatio,this.imgOffset.left=0,this.imgOffset.top=-this.getOverflowSize(window.innerHeight,this.imgSize.height,this.yCenter)),this.fixViewportPosition()}fixViewportPosition(){this.viewports.forEach(t=>{t.css({backgroundSize:this.imgSize.width+"px "+this.imgSize.height+"px",backgroundPosition:this.imgOffset.left+"px "+this.imgOffset.top+"px"})}),this.hasBlurArea&&!this.cssFeature.backdropFilter&&(this.domStyle.setProperty("--bgimg-bg-size",`${this.imgSize.width}px ${this.imgSize.height}px`),this.domStyle.setProperty("--bgimg-bg-pos",`${this.imgOffset.left}px ${this.imgOffset.top}px`))}addViewport(t){t.css("opacity",0),this.viewports.push(t)}addBlurBackground(t){let e=["bgimg-background-blur","bgimg-background-loading"];this.cssFeature.backdropFilter&&e.push("bgimg-backdrop-blur"),t.addClass(e),this.hasBlurArea=!0,this.blurWidgets.push(t)}}}.call(this,i(0))}]);