earthnut 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackgroundRipple/index.cjs +1 -1
- package/BackgroundRipple/index.mjs +1 -1
- package/README.md +15 -0
- package/customHooks/useRipples/buildBackground/create-background-color.d.ts +3 -0
- package/customHooks/useRipples/buildBackground/create-linear-gradient.d.ts +3 -0
- package/customHooks/useRipples/buildBackground/default-background/index.d.ts +1 -1
- package/customHooks/useRipples/buildBackground/loadImage.d.ts +1 -1
- package/customHooks/useRipples/buildBackground/type.d.ts +4 -0
- package/customHooks/useRipples/buildBackground/utils/bindImage.d.ts +2 -1
- package/customHooks/useRipples/rippersData/fadeData.d.ts +16 -2
- package/customHooks/useRipples/rippersData/renderData.d.ts +2 -0
- package/customHooks/useRipples/rippersData/useOptions.d.ts +1 -1
- package/customHooks/useRipples/types.d.ts +5 -5
- package/index.cjs +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -2
- package/useRipples/index.cjs +1 -1
- package/useRipples/index.mjs +1 -1
package/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"a-type-of-js";import*as t from"xcn";import*as r from"react";import*as n from"a-element-inline-style";import*as i from"a-js-tools";var o={56:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},a=[],u=0;u<e.length;u++){var l=e[u],s=n.base?l[0]+n.base:l[0],c=o[s]||0,f="".concat(s," ").concat(c);o[s]=c+1;var d=r(f),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var h=i(p,n);n.byIndex=u,t.splice(u,0,{identifier:f,updater:h,references:1})}a.push(f)}return a}function i(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var o=n(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var u=r(o[a]);t[u].references--}for(var l=n(e,i),s=0;s<o.length;s++){var c=r(o[s]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=l}}},109:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(601),i=r.n(n),o=r(314),a=r.n(o)()(i());a.push([e.id,".en-ripple-container{width:100%;height:100%;position:relative;top:0px;left:0px;z-index:1}",""]);const u=a},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},153:(e,t,r)=>{r.d(t,{z:()=>T});var n=r(649),i=r(707),o=r(362),a=r(411),u=r(72),l=r.n(u),s=r(825),c=r.n(s),f=r(659),d=r.n(f),p=r(56),h=r.n(p),y=r(540),m=r.n(y),v=r(113),g=r.n(v),b=r(109),w={};function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}w.styleTagTransform=g(),w.setAttributes=h(),w.insert=d().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=m(),l()(b.A,w),b.A&&b.A.locals&&b.A.locals;var R=["children","style"];function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T=(0,n.forwardRef)((function(e,t){var r=e.children,u=e.style,l=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,R),s=(0,n.useRef)(null),c=(0,i.n)(s,l);return function(e,t){(0,n.useEffect)((function(){if(t.option&&e.current){var r=t.option;Object.keys(e.current.defaults).forEach((function(t){!(0,o.isUndefined)(r[t])&&e.current&&e.current.set(t,r[t])}))}}),[t.option])}(c,l),(0,n.useImperativeHandle)(t,(function(){return{toggleState:function(){var e;null===(e=c.current)||void 0===e||e.changePlayingState()},get state(){var e,t;return null!==(e=null===(t=c.current)||void 0===t?void 0:t.options.playingState)&&void 0!==e&&e},pause:function(){var e;null===(e=c.current)||void 0===e||e.pause()},set:function(e){if(!(0,o.isUndefined)(e))for(var t=Object.keys(e),r=0,n=t.length;r<n;r++){var i,a=t[r];null===(i=c.current)||void 0===i||i.set(a,e[a])}}}})),n.default.createElement("div",{className:(0,a.xcn)("en-ripple-container"),style:P({backgroundRepeat:"round"},u)},n.default.createElement("canvas",{ref:s,"data-earthnut-ui":"canvas"}),r)}));T.displayName="en-background-ripple"},195:(e,t,r)=>{r.d(t,{t:()=>i});var n=r(649);function i(e){var t=(0,n.useRef)(!1);return(0,n.useEffect)((function(){var r=e.current;if(r){var n=function(){return t.current=!0},i=function(){return t.current=!1};return r.addEventListener("compositionstart",n),r.addEventListener("compositionend",i),function(){r.removeEventListener("compositionstart",n),r.removeEventListener("compositionend",i)}}}),[]),t}},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var u=0;u<this.length;u++){var l=this[u][0];null!=l&&(a[l]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},362:(t,r,n)=>{var i,o;t.exports=(i={isBoolean:()=>e.isBoolean,isEmptyArray:()=>e.isEmptyArray,isFalse:()=>e.isFalse,isNull:()=>e.isNull,isNumber:()=>e.isNumber,isTrue:()=>e.isTrue,isUndefined:()=>e.isUndefined,isZero:()=>e.isZero},o={},n.d(o,i),o)},363:(e,t,r)=>{r.d(t,{wb:()=>B,Ht:()=>A,zE:()=>j,n5:()=>R,AX:()=>O,PE:()=>B,A1:()=>A,cZ:()=>j,KL:()=>R,nb:()=>O});var n=r(649),i=r(411),o=r(72),a=r.n(o),u=r(825),l=r.n(u),s=r(659),c=r.n(s),f=r(56),d=r.n(f),p=r(540),h=r.n(p),y=r(113),m=r.n(y),v=r(384),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=c().bind(null,"head"),g.domAPI=l(),g.insertStyleElement=h(),a()(v.A,g);const b=v.A&&v.A.locals?v.A.locals:void 0;var w=["className","children","height","noSticky"];function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}var R=n.default.forwardRef((function(e,t){var r=e.className,o=e.children,a=(e.height,e.noSticky,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,w));return n.default.createElement("div",E({ref:t,className:(0,i.xcn)(b["en-layout-header"],r)},a,{"data-earthnut-ui":"layout-header"}),o)}));R.displayName="LayoutHeader";var S=["className","width","right","full"];function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(null,arguments)}var O=n.default.forwardRef((function(e,t){var r=e.className,o=(e.width,e.right,e.full,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,S));return n.default.createElement("div",P({className:(0,i.xcn)(b["en-layout-side"],r),ref:t},o,{"data-earthnut-ui":"layout-side-bar"}))}));O.displayName="LayoutSideBar";var T=["className"];function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(null,arguments)}var A=n.default.forwardRef((function(e,t){var r=e.className,o=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,T);return n.default.createElement("main",x({ref:t,className:(0,i.xcn)(b["en-layout-main"],r)},o,{"data-earthnut-ui":"layout-content"}))}));A.displayName="LayoutContent";var k=["className","height"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(null,arguments)}var j=n.default.forwardRef((function(e,t){var r=e.className,o=(e.height,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,k));return n.default.createElement("div",D({ref:t},o,{className:(0,i.xcn)(b["en-layout-footer"],r),"data-earthnut-ui":"layout-footer"}))}));j.displayName="LayoutFooter";var _=r(362);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}var I=["className","children","style","width","height"];function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N.apply(null,arguments)}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){U(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r){return(t=function(e){var t=function(e){if("object"!=F(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=F(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==F(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var B=n.forwardRef((function(e,t){var r,o,a,u,l=e.className,s=e.children,c=e.style,f=e.width,d=void 0===f?"100vw":f,p=e.height,h=void 0===p?"100vh":p,y=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,I),m="simple",v="",g=!1,w=!1,E=!1,S=!1,P=150,T="2.8rem",x="2rem",k=!1;n.Children.forEach(s,(function(e){if(n.isValidElement(e))if(g||e.type!==R)if(w||e.type!==O)E||e.type!==A?E||e.type!==B?S||e.type!==j||(x=e.props.height||x,u=e,S=!0):(a=n.createElement("main",{"data-earthnut-ui":"layout-content",className:(0,i.xcn)(b["en-layout-main"])},e),E=!0):(a=e,E=!0);else{var t=e.props;P=t.width||P,m=t.right&&t.full?"side-right-full":t.right?"side-right":t.full?"side-full":"simple",k=(0,_.isTrue)(t.full),o=e,w=!0}else{var l=e.props;T=l.height||T,v=l.noSticky?b["en-layout-header-no-sticky"]:"",r=e,g=!0}}));var D=g&&w&&E&&S&&b["en-layout-".concat(m,"-all")]||g&&E&&w&&b["en-layout-".concat(m,"-no-footer")]||w&&E&&S&&b["en-layout-".concat(m,"-no-header")]||E&&S&&b["en-layout-only-footer"]||E&&g&&b["en-layout-only-header"]||E&&w&&(k=!0)&&b["en-layout-".concat(m,"-only-side")]||"";return n.createElement("div",N({ref:t,className:(0,i.xcn)(b["en-layout"],k&&b["en-layout-side-full"],D,v,l),style:C({"--layout-width":X(d),"--layout-height":X(h),"--layout-side-bar-width":X(P),"--layout-header-height":X(T),"--layout-footer-height":X(x)},c)},y,{"data-earthnut-ui":"layout"}),/side.*full/.test(m)?n.createElement(n.Fragment,null,o,r,a,u):n.createElement(n.Fragment,null,r,S?n.createElement("div",{className:(0,i.xcn)(b["en-layout-content"]),"data-earthnut-ui":"layout-with-foot-content"},o,a):n.createElement(n.Fragment,null,o,a),u))}));function X(e){return(0,_.isNumber)(e)||parseInt(e)===Number(e)?e+"px":e||0}B.displayName="Layout"},384:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(601),i=r.n(n),o=r(314),a=r.n(o)()(i());a.push([e.id,'.LcdTDTWWkxGZFXQc8XNV{width:var(--layout-width);height:var(--layout-height);overflow-x:hidden;overflow-y:auto}.CxCt7n1zXeDfFdmgQAme{grid-area:header;position:sticky;top:0px;left:0px;z-index:10;height:var(--layout-header-height);box-shadow:0 4px 13px -3px rgba(0,0,0,.1019607843);overflow:hidden}.E2socS6t6fugHzd2ATQy{position:sticky;left:0;z-index:8;grid-area:side;overflow-x:hidden;overflow-y:auto}.k2yu7eCpEzToH_ynBglg{grid-area:content}.zWuykaXyereS6ELF7SHy{grid-area:footer;height:var(--layout-footer-height);box-shadow:0 -1px 13px 0px rgba(0,0,0,.1019607843);overflow:hidden}.O6AnGNbL5r3nPmEFEv73>.CxCt7n1zXeDfFdmgQAme{position:relative;z-index:2}.O6AnGNbL5r3nPmEFEv73.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy,.O6AnGNbL5r3nPmEFEv73.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy{top:0;min-height:calc(var(--layout-height) - var(--layout-footer-height) - var(--layout-header-height));max-height:var(--layout-height)}.O6AnGNbL5r3nPmEFEv73.Wz4q5vQzeOw8RbDr0rOF>.E2socS6t6fugHzd2ATQy,.O6AnGNbL5r3nPmEFEv73.GkLVEZcHiQyvuSh0RLU5>.E2socS6t6fugHzd2ATQy{top:0;min-height:calc(var(--layout-height) - var(--layout-footer-height));max-height:var(--layout-height)}.rZPYzoPjyQP7sDeJbPjp>.E2socS6t6fugHzd2ATQy{top:0;height:var(--layout-height)}.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u,.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u{display:grid;grid-template-rows:calc(var(--layout-height) - var(--layout-header-height) - var(--layout-footer-height)) auto;min-height:calc(100% - var(--layout-header-height) - var(--layout-footer-height))}.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy,.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy{top:var(--layout-header-height);min-height:calc(var(--layout-height) - var(--layout-header-height) - var(--layout-footer-height));max-height:calc(var(--layout-height) - var(--layout-header-height))}.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u,.UhPmIL0kNAGv5201kGbo>.r_iQ4e7myBc0DSPRkp2u{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side content" ". content"}.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u,.Nkg7pjNAPCenCQZY8gLg>.r_iQ4e7myBc0DSPRkp2u{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"content side" "content ."}.XRYEv9hWhdcl2OHap6fQ,.SmA7SjLAZLofOenJZAWg{display:grid;grid-template-rows:var(--layout-header-height) auto var(--layout-footer-height);gap:0px}.XRYEv9hWhdcl2OHap6fQ{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side header" "side content" "side footer"}.SmA7SjLAZLofOenJZAWg{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"header side" "content side" "footer side"}.UhPmIL0kNAGv5201kGbo>.r_iQ4e7myBc0DSPRkp2u,.Nkg7pjNAPCenCQZY8gLg>.r_iQ4e7myBc0DSPRkp2u{display:grid;grid-template-rows:auto}.UhPmIL0kNAGv5201kGbo>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy,.Nkg7pjNAPCenCQZY8gLg>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy{top:0;min-height:calc(var(--layout-height) - var(--layout-footer-height));max-height:var(--layout-height)}.UT3CcVcTx9pLwV2GGFGi,.tzvYxycvFA9rcOf26LP7{display:grid;grid-template-rows:auto var(--layout-footer-height);gap:0px}.UT3CcVcTx9pLwV2GGFGi{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side content" "side footer"}.tzvYxycvFA9rcOf26LP7{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"content side" "footer side"}.Wz4q5vQzeOw8RbDr0rOF,.GkLVEZcHiQyvuSh0RLU5{display:grid;grid-template-rows:var(--layout-header-height) auto;min-height:calc(100% - var(--layout-header-height));gap:0px}.Wz4q5vQzeOw8RbDr0rOF>.E2socS6t6fugHzd2ATQy,.GkLVEZcHiQyvuSh0RLU5>.E2socS6t6fugHzd2ATQy{top:var(--layout-header-height);height:calc(var(--layout-height) - var(--layout-header-height))}.Wz4q5vQzeOw8RbDr0rOF{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"header header" "side content" ". content"}.GkLVEZcHiQyvuSh0RLU5{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"header header" "content side" "content ."}.cFlRZr9kGWMtc0nRYCWE,.DzmD_4Su8YXCKKIwXjG1{display:grid;grid-template-rows:var(--layout-header-height) auto;gap:0px}.cFlRZr9kGWMtc0nRYCWE>.k2yu7eCpEzToH_ynBglg,.DzmD_4Su8YXCKKIwXjG1>.k2yu7eCpEzToH_ynBglg{min-height:calc(var(--layout-height) - var(--layout-header-height))}.cFlRZr9kGWMtc0nRYCWE{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side header" "side content"}.DzmD_4Su8YXCKKIwXjG1{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"header side" "content side"}.sm5xSKZmdrGS3a6b5rcN{display:grid;grid-template-rows:auto var(--layout-footer-height);grid-template-columns:1fr;gap:0px;grid-template-areas:"content" "footer"}.qxhkwYH_Y7uyvMDH8JyZ{display:grid;grid-template-rows:var(--layout-header-height) auto;grid-template-columns:1fr;gap:0px;grid-template-areas:"header" "content"}.sAEoDcBqMzkziXXvgv8X,.jxy4KSYJK23WN2rx2CDS,.wVTitTPpRyG8XfbxJGhy,.mKVYywd6gr5_u2naW5_u{display:grid;grid-template-rows:100%;grid-template-columns:var(--layout-side-bar-width) auto;gap:0px;grid-template-areas:"side content" ". content"}.mKVYywd6gr5_u2naW5_u,.jxy4KSYJK23WN2rx2CDS{grid-template-areas:"content side" "content .";grid-template-columns:auto var(--layout-side-bar-width)}',""]),a.locals={"en-layout":"LcdTDTWWkxGZFXQc8XNV","en-layout-header":"CxCt7n1zXeDfFdmgQAme","en-layout-side":"E2socS6t6fugHzd2ATQy","en-layout-main":"k2yu7eCpEzToH_ynBglg","en-layout-footer":"zWuykaXyereS6ELF7SHy","en-layout-header-no-sticky":"O6AnGNbL5r3nPmEFEv73","en-layout-simple-all":"ognI7wqsq0lXqSVkJ0cj","en-layout-content":"r_iQ4e7myBc0DSPRkp2u","en-layout-side-right-all":"Sax5A5AqDPokwTlrUZu5","en-layout-simple-no-footer":"Wz4q5vQzeOw8RbDr0rOF","en-layout-side-right-no-footer":"GkLVEZcHiQyvuSh0RLU5","en-layout-side-full":"rZPYzoPjyQP7sDeJbPjp","en-layout-simple-no-header":"UhPmIL0kNAGv5201kGbo","en-layout-side-right-no-header":"Nkg7pjNAPCenCQZY8gLg","en-layout-side-full-all":"XRYEv9hWhdcl2OHap6fQ","en-layout-side-right-full-all":"SmA7SjLAZLofOenJZAWg","en-layout-side-full-no-header":"UT3CcVcTx9pLwV2GGFGi","en-layout-side-right-full-no-header":"tzvYxycvFA9rcOf26LP7","en-layout-side-full-no-footer":"cFlRZr9kGWMtc0nRYCWE","en-layout-side-right-full-no-footer":"DzmD_4Su8YXCKKIwXjG1","en-layout-only-footer":"sm5xSKZmdrGS3a6b5rcN","en-layout-only-header":"qxhkwYH_Y7uyvMDH8JyZ","en-layout-simple-only-side":"sAEoDcBqMzkziXXvgv8X","en-layout-side-right-only-side":"jxy4KSYJK23WN2rx2CDS","en-layout-side-full-only-side":"wVTitTPpRyG8XfbxJGhy","en-layout-side-right-full-only-side":"mKVYywd6gr5_u2naW5_u"};const u=a},411:(e,r,n)=>{var i,o;e.exports=(i={xcn:()=>t.xcn},o={},n.d(o,i),o)},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},552:(e,t,r)=>{r.d(t,{O:()=>i});var n=r(649);function i(){var e=(0,n.useRef)(void 0);return(0,n.useEffect)((function(){return function(){e.current&&clearTimeout(e.current)}}),[]),e}},601:e=>{e.exports=function(e){return e[1]}},615:(e,t,r)=>{r.d(t,{M:()=>i});var n=r(649);function i(){var e=(0,n.useRef)(0);return(0,n.useEffect)((function(){return function(){e.current&&window.cancelAnimationFrame(e.current)}}),[]),e}},649:(e,t,n)=>{var i,o;e.exports=(i={Children:()=>r.Children,Fragment:()=>r.Fragment,createElement:()=>r.createElement,default:()=>r.default,forwardRef:()=>r.forwardRef,isValidElement:()=>r.isValidElement,useEffect:()=>r.useEffect,useImperativeHandle:()=>r.useImperativeHandle,useRef:()=>r.useRef},o={},n.d(o,i),o)},659:e=>{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},707:(e,t,r)=>{r.d(t,{n:()=>We});var o=r(649);const a=(u={setStyle:()=>n.setStyle},l={},r.d(l,u),l);var u,l,s=r(362);function c(e,t,r,n){function i(e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,a={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(a.id,i(r.VERTEX_SHADER,e)),r.attachShader(a.id,i(r.FRAGMENT_SHADER,t)),r.linkProgram(a.id),!r.getProgramParameter(a.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(a.id));r.useProgram(a.id),r.enableVertexAttribArray(0);for(var u=e+t,l=/uniform (\w+) (\w+)/g;!(0,s.isNull)(o=l.exec(u));){var c=o[2];a.locations[c]=r.getUniformLocation(a.id,c)}return a}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(t||0)),r.bindTexture(r.TEXTURE_2D,e)}function d(){var e=this,t=function(){return e.initState=!1,null};if(!this.gl)return t();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce((function(e,t){var n=r.getExtension(t);return n&&e.push([t,n]),e}),[]));if(!n.OES_texture_float)return t();var i=[];function o(e,t,r){var i="OES_texture_"+e,o=i+"_linear",a=o in n;return{type:t,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var l=null,s=0;s<i.length;s++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[s].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[s];break}return l}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function y(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}var g=y((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),m(this,"canvas",void 0),m(this,"gl",void 0),m(this,"config",void 0),m(this,"initState",!0),this.canvas=t;var r=t.getContext("webgl");if((0,s.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(d,this,[])}));const b=(e=>{var t={};return r.d(t,e),t})({debounce:()=>i.debounce,enArr:()=>i.enArr,getRandomInt:()=>i.getRandomInt});var w,E={imageUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P(n.key),n)}}function P(e){var t=function(e){if("object"!=R(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==R(t)?t:t+""}function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,x(n.key),n)}}function x(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function A(e,t,r){return e.set(D(e,t),r),r}function k(e,t){return e.get(D(e,t))}function D(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function j(e){return function(e){if(Array.isArray(e))return _(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.freeze(E),new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(){};return Object.setPrototypeOf(t,this),Object.defineProperties(t,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),t},(t=[{key:"clear",value:function(){}}])&&S(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())({name:"earthnut",type:!1});var F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t={list:[],diameter:48,radius:0,cells:0};t.diameter%2!=0&&t.diameter++;var r=t.diameter,n=t.list,i=r/2;t.radius=i,t.cells=Math.pow(r,2);for(var o=0;o<r;o++){n[o]=[];for(var a=0;a<r;a++)n[o][a]=[0,0,0,0]}for(var u=0;u<=i;u++)for(var l=u;l<=i;l++){var s=n[u][l],c=function(){return(0,b.getRandomInt)(255,190)};s[0]=c(),s[1]=c(),s[2]=c(),s[3]=Math.ceil(Math.sqrt(Math.pow(u,2)+Math.pow(l,2)))<=i?(0,b.getRandomInt)(120,180):(0,b.getRandomInt)(160,240)}for(var f=0;f<=i;f++)for(var d=0;d<=f;d++)n[f][d]=n[d][f];for(var p=i;p<r;p++)for(var h=0;h<=i;h++)n[p][h]=n[r-p][h];for(var y=0;y<i;y++)for(var m=i;m<r;m++)n[y][m]=n[y][r-m];for(var v=i;v<r;v++)for(var g=i;g<r;g++)n[v][g]=n[v][r-g];var w=e%r;return t.list=[].concat(j(n.slice(w)),j(n.slice(0,w))),t},I=new(w=new WeakMap,function(){return e=function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(this,w,1),t=this,r="data",n=F(),(r=x(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n},(t=[{key:"build",value:function(){k(w,this)>100&&A(w,this,0),this.data=F(A(w,this,k(w,this)+3))}}])&&T(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function N(e,t){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,s.isNull)(i)||(0,s.isNull)(o)?r:(r.width=n.width=e,r.height=n.height=t,i.clearRect(0,0,e,t),o.clearRect(0,0,e,t),i.globalAlpha=1,i.putImageData(function(e,t){Date.now();for(var r=new ImageData(e,t),n=r.data,i=I.data,o=i.diameter,a=i.list,u=e*o,l=0;l<n.length;l+=4){var s=l/4%u,c=s%e%o,f=Math.floor(s/e),d=a[c][f];n[l]=d[0],n[l+1]=d[1],n[l+2]=d[2],n[l+3]=d[3]}return r}(e,t),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,e,t),o.drawImage(r,0,0,e,t),o.globalCompositeOperation="source-over",n)}function L(){var e=this.fadeData,t=e.backgroundInfo,r=t.width,n=t.height;I.build(),e.toBeList.push(N(r,n)),e.run()}function C(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if((0,s.isNull)(t))Reflect.apply(L,this,[]);else{var i,o,a=t.lastUseStyle,u=n.backgroundInfo,l=u.width,c=u.height,f=r.imageUrl||(i=a.backgroundImage,o=/url\(["']?([^"']*)["']?\)/.exec(i),(0,s.isNull)(o)?null:o[1]);if(t.imageSource=f,f){var d=function(e,t,r){var n=new Image(t,r);return n.width=t,n.height=r,n.src=e,n}(f,l,c);d.onload=function(){clearTimeout(n.transparentId),n.toBeList=n.toBeList.filter((function(e){return"img"===e.tagName.toLowerCase()&&e.getAttribute("src")!==f&&e.width===l&&e.height===c})),n.toBeList.push(d),n.run()},d.onerror=function(){Reflect.apply(L,e,[])},d.crossOrigin=r.crossOrigin}else Reflect.apply(L,this,[])}}function U(){var e=this.renderData;if(!(0,s.isNull)(e)){var t=e.parentElement;t&&[["background-image","none"],["background-color","transparent"]].forEach((function(e){return t.style.setProperty(e[0],e[1],"important")}))}}function B(e){var t=window.getComputedStyle(e),r=e.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:t.backgroundColor,backgroundImage:t.backgroundImage,backgroundSize:t.backgroundSize,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundClip:t.backgroundClip,backgroundOrigin:t.backgroundOrigin,backgroundAttachment:t.backgroundAttachment,position:t.position}}function X(e){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(e)}function z(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,W(n.key),n)}}function M(e,t,r){return t&&z(e.prototype,t),r&&z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function G(e,t,r){return(t=W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(e){var t=function(e){if("object"!=X(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==X(t)?t:t+""}var H=M((function e(t,r,n){var i,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),G(this,"quad",null),G(this,"lastRaindropsFallTime",0),G(this,"parentElement",void 0),G(this,"mutationObserver",void 0),G(this,"resizeObserver",void 0),G(this,"renderProgram",void 0),G(this,"imageSource",""),G(this,"dropProgram",void 0),G(this,"updateProgram",void 0),G(this,"textures",[]),G(this,"backgroundTexture",[]),G(this,"textureDelta",void 0),G(this,"framebuffers",[]),G(this,"bufferWriteIndex",0),G(this,"bufferReadIndex",1),G(this,"originStyle",void 0),G(this,"lastUseStyle",void 0),G(this,"events",{}),G(this,"animationFrameId",0),this.parentElement=null!==(i=t.parentElement)&&void 0!==i?i:document.body,Reflect.apply(U,n,[]),this.originStyle=this.lastUseStyle=B(this.parentElement),this.mutationObserver=new MutationObserver((function(e){e.forEach((function(e){var t,i;if(e.target===o.parentElement&&"attributes"===e.type&&n.options.visible){var a=Object.values(o.lastUseStyle),u=B(o.parentElement),l=Object.values(u);if((0,s.isEmptyArray)(b.enArr.difference(a,l)))return;var c="none"===(i=u.backgroundImage)||""===i,f="rgba(0, 0, 0, 0)"===(t=u.backgroundColor)||"#ffffffff"===t||"transport"===t;if(c&&f)return;o.lastUseStyle=u,Reflect.apply(r,n,[]),Reflect.apply(U,n,[])}}))})),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver((function(){Reflect.apply(r,n,[])})),this.resizeObserver.observe(this.parentElement)}));function Q(){var e=this.renderData,t=this.fadeData;if(!(0,s.isNull)(e)){var r,n,i,o=e.parentElement,a=window.getComputedStyle(o),u=a.backgroundSize,l=a.backgroundAttachment,c=a.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):Y(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],d={left:0,top:0,width:0,height:0};"fixed"===l?(d.height=window.innerHeight,d.left=window.screenX,d.top=window.screenY,d.width=window.innerWidth):(d.left=0,d.top=0,d.width=o.scrollWidth,d.height=o.scrollHeight);var p=t.backgroundInfo||{width:100,height:100},h=p.width,y=p.height;if("cover"===u){var m=Math.max(d.width/h,d.height/y);n=h*m,i=y*m}else if("contain"===u){var v=Math.min(d.width/h,d.height/y);n=h*v,i=y*v}else{var g=u.split(" ");n=g[0]||"",i=g[1]||n,Y(n)?n=d.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),Y(i)?i=d.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=h,i=y):("auto"===n&&(n=h*(Number(i)/y)),"auto"===i&&(i=y*(Number(n)/h)))}var b=f&&f[0]||"0%",w=f&&f[1]||"0%";b=Y(b)?(d.left+(d.width-Number(n))*parseFloat(b)/100).toString():(d.left+parseFloat(b)).toString(),w=Y(w)?(d.top+(d.height-Number(i))*parseFloat(w)/100).toString():(d.top+parseFloat(w)).toString(),e.renderProgram.uniforms.topLeft=new Float32Array([(o.offsetLeft-Number(b))/n,(o.offsetTop-Number(w))/i]),e.renderProgram.uniforms.bottomRight=new Float32Array([e.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,e.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var E=Math.max(this.canvas.width,this.canvas.height);e.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/E,this.canvas.height/E])}}function Y(e){return e.endsWith("%")}function q(){var e=this.gl,t=this.renderData;(0,s.isNull)(t)||(e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_FAN,0,4))}function Z(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,s.isNull)(t)){var n=t.textures,i=t.backgroundTexture,o=r.perturbance;e.bindFramebuffer(e.FRAMEBUFFER,null),e.viewport(0,0,this.canvas.width,this.canvas.height),e.enable(e.BLEND),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.useProgram(t.renderProgram.id),Reflect.apply(f,this,[i,0]),Reflect.apply(f,this,[n[0],1]),e.uniform1f(t.renderProgram.locations.perturbance,o),e.uniform2fv(t.renderProgram.locations.topLeft,t.renderProgram.uniforms.topLeft),e.uniform2fv(t.renderProgram.locations.bottomRight,t.renderProgram.uniforms.bottomRight),e.uniform2fv(t.renderProgram.locations.containerRatio,t.renderProgram.uniforms.containerRatio),e.uniform1i(t.renderProgram.locations.samplerBackground,0),e.uniform1i(t.renderProgram.locations.samplerRipples,1),Reflect.apply(q,this,[]),e.disable(e.BLEND)}}function V(){var e=this.renderData;if(!(0,s.isNull)(e)){var t=e.bufferWriteIndex,r=e.bufferReadIndex;e.bufferWriteIndex=1-t,e.bufferReadIndex=1-r}}function K(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,s.isNull)(t)){var n=t.updateProgram,i=t.textures,o=t.framebuffers,a=t.bufferWriteIndex,u=t.bufferReadIndex,l=r.resolution;e.viewport(0,0,l,l),e.bindFramebuffer(e.FRAMEBUFFER,o[a]),Reflect.apply(f,this,[i[u]]),e.useProgram(n.id),Reflect.apply(q,this,[]),Reflect.apply(V,this,[])}}function J(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,s.isNull)(t)){var i=t.parentElement,o=n.isTransitioning,a=r.running,u=r.idleFluctuations,l=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply(Q,this,[]),a?(l||(r.lastRunningState=!0,this.show()),u&&this.raindropsFall(),o&&this.fade(),Reflect.apply(K,this,[]),Reflect.apply(Z,this,[])):l&&(r.lastRunningState=!1,this.hide()),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(J,e,[])}))}}function $(e,t,r){var n=this.renderData;if(!(0,s.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,u=parseInt(o.borderTopWidth)||0,l=i.getBoundingClientRect(),c=e.clientX-l.left-a,f=e.clientY-l.top-u;this.drop(c,f,t,r)}}function ee(){var e=this,t=this.renderData,r=this.options;if(!(0,s.isNull)(t)){var n=t.parentElement,i=t.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(t.lastRaindropsFallTime=Date.now(),Reflect.apply($,e,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(e){for(var t=r.accelerating;t--;)o(e)},i.touchmove=i.touchstart=function(e){for(var t=e.touches,r=0;r<t.length;r++)o(t[r])},i.mousedown=function(e){return o(e,!0)},Object.keys(i).forEach((function(e){return null==n?void 0:n.addEventListener(e,i[e],{passive:!0})}))}}var te="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function re(){var e=this.gl,t=this.renderData;if(!(0,s.isNull)(t)){var r=t.textureDelta;t.dropProgram=c(te,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",e);var n=t.updateProgram=c(te,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);e.uniform2fv(n.locations.delta,r),t.renderProgram=c("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",e),e.uniform2fv(t.renderProgram.locations.delta,r)}}function ne(){var e=this.gl,t=this.renderData;if(!(0,s.isNull)(t)){var r=t.backgroundTexture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)}}function ie(e){var t=this.gl,r=this.renderData,n=this.fadeData;if(!(0,s.isNull)(r)){var i=r.backgroundTexture,o=n.backgroundInfo,a=o.width,u=o.height,l=function(e){return(0,s.isZero)(e&e-1)},c=l(a)&&l(u)?t.REPEAT:t.CLAMP_TO_EDGE;t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,c),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,c),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}}function oe(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,s.isNull)(t)&&this.config){var i=t.textures,o=t.framebuffers,a=r.resolution,u=this.gl,l=1/a;t.textureDelta=new Float32Array([l,l]),this.config.extensions.forEach((function(e){return u.getExtension(e)}));for(var c=this.config.arrayType,f=c?new c(a*a*4):null,d=this.config,p=0;p<2;p++){var h=u.createTexture(),y=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,y),u.bindTexture(u.TEXTURE_2D,h),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,d.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,d.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,u.RGBA,a,a,0,u.RGBA,d.type,f),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,h,0),i.push(h),o.push(y)}t.quad=u.createBuffer(),u.bindBuffer(u.ARRAY_BUFFER,t.quad),u.bufferData(u.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),u.STATIC_DRAW),Reflect.apply(re,this,[]),Reflect.apply(ne,this,[]),Reflect.apply(L,this,[]),Reflect.apply(C,this,[]),u.clearColor(0,0,0,0),u.blendFunc(u.SRC_ALPHA,u.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(ee,this,[]),Reflect.apply(ie,this,[n.lastDrawImage]),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(J,e,[])}))}}function ae(){var e=this.renderData,t=this.fadeData;if(!(0,s.isNull)(e)){var r=e.parentElement,n=t.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(C,this,[])}}function ue(){var e=this.renderData;if(!(0,s.isNull)(e)){var t=e.parentElement,r=e.originStyle;t.style.setProperty("background-image",r.inlineBackgroundImage),t.style.setProperty("background-color",r.inlineBackgroundColor)}}function le(){var e=this.renderData,t=this.fadeData;if(!(0,s.isNull)(e)){if(e.animationFrameId&&window.cancelAnimationFrame(e.animationFrameId),t.transparentId&&clearTimeout(t.transparentId),null!=e&&e.parentElement&&null!=e&&e.events){var r,n,i,o=e.parentElement,a=e.events;Object.keys(a).forEach((function(e){return o.removeEventListener&&o.removeEventListener(e,a[e])})),o.removeAttribute&&o.removeAttribute("data-ripples"),null===(r=e.mutationObserver)||void 0===r||r.takeRecords(),null===(n=e.mutationObserver)||void 0===n||n.disconnect(),e.mutationObserver=null,null===(i=e.resizeObserver)||void 0===i||i.disconnect(),e.resizeObserver=null}this.gl=null,Reflect.apply(ue,this,[]),Object.keys(e).forEach((function(t){return e[t]=null})),this.renderData=null,this.gl&&(this.gl=null)}}function se(e,t,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,s.isNull)(i)){var u=i.parentElement,l=i.dropProgram,c=i.textures,d=i.framebuffers,p=i.bufferWriteIndex,h=i.bufferReadIndex,y=o.resolution,m=u.offsetWidth,v=u.offsetHeight,g=Math.max(m,v);r/=g;var b=new Float32Array([(2*e-m)/g,(v-2*t)/g]);a.viewport(0,0,y,y),a.bindFramebuffer(a.FRAMEBUFFER,d[p]),Reflect.apply(f,this,[c[h]]),a.useProgram(l.id),a.uniform2fv(l.locations.center,b),a.uniform1f(l.locations.radius,r),a.uniform1f(l.locations.strength,n),Reflect.apply(q,this,[]),Reflect.apply(V,this,[])}}function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pe(n.key),n)}}function de(e,t,r){return(t=pe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pe(e){var t=function(e){if("object"!=ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:t+""}function he(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function ye(e,t){return e.get(ve(e,t))}function me(e,t,r){return e.set(ve(e,t),r),r}function ve(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var ge=new WeakMap,be=new WeakMap,we=new WeakMap,Ee=new WeakMap,Re=new WeakMap,Se=new WeakMap,Pe=new WeakMap,Oe=function(){return e=function e(t){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),he(this,ge,E.accelerating),he(this,be,E.interactive),he(this,we,E.resolution),he(this,Ee,E.perturbance),he(this,Re,E.dropRadius),de(this,"imageUrl",E.imageUrl),he(this,Se,E.idleFluctuations),he(this,Pe,E.raindropsTimeInterval),de(this,"crossOrigin","no-cors"),de(this,"visible",!1),de(this,"running",!1),de(this,"lastRunningState",!1),this.perturbance=t.perturbance,this.resolution=t.resolution,this.raindropsTimeInterval=t.raindropsTimeInterval,this.accelerating=t.accelerating,this.interactive=t.interactive,this.dropRadius=t.dropRadius,this.imageUrl=t.imageUrl,this.idleFluctuations=t.idleFluctuations,this.running=Boolean(null===(r=t.playingState)||void 0===r||r),this.crossOrigin=t.crossOrigin},(t=[{key:"accelerating",get:function(){return ye(ge,this)},set:function(e){e>100||e<2||me(ge,this,e)}},{key:"interactive",get:function(){return ye(be,this)},set:function(e){(0,s.isBoolean)(e)&&me(be,this,e)}},{key:"resolution",get:function(){return ye(we,this)},set:function(e){e<100||e>550||me(we,this,e)}},{key:"perturbance",get:function(){return ye(Ee,this)},set:function(e){e<1e-4||e>1||me(Ee,this,e)}},{key:"dropRadius",get:function(){return ye(Re,this)},set:function(e){!isFinite(e)||e<10||me(Re,this,e)}},{key:"idleFluctuations",get:function(){return ye(Se,this)},set:function(e){(0,s.isBoolean)(e)&&me(Se,this,e)}},{key:"raindropsTimeInterval",get:function(){return ye(Pe,this)},set:function(e){e<10||e>12e3||me(Pe,this,e)}},{key:"playingState",get:function(){return this.running},set:function(e){this.running=Boolean(null==e||e)}}])&&fe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Te(){var e=this,t=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Te,e,[]);r.drawProgress=0,r.isTransitioning=!0}),2*t.raindropsTimeInterval)}function xe(){var e=this.renderData,t=this.fadeData,r=t.toBeList,n=t.drawProgress,i=t.lastDrawImage,o=t.backgroundInfo;if(!(0,s.isNull)(e)&&!(0,s.isEmptyArray)(r)){if(t.drawProgress>1e3)return t.isTransitioning=!1,t.lastDrawImage=r.shift(),Reflect.apply(ie,this,[t.lastDrawImage]),void((0,s.isEmptyArray)(r)||Reflect.apply(Te,this,[]));t.drawProgress+=18;var a=document.createElement("canvas"),u=a.getContext("2d");if(!((0,s.isNull)(u)||(0,s.isNull)(i)||(0,s.isEmptyArray)(r))){var l=o.width,c=o.height;a.width=l,a.height=c,u.clearRect(0,0,l,c),u.drawImage(i,0,0,l,c),u.globalAlpha=n/1e3,u.drawImage(r[0],0,0,l,c),u.globalAlpha=1,Reflect.apply(ie,this,[a])}}}function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function ke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,je(n.key),n)}}function De(e,t,r){return(t=je(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function je(e){var t=function(e){if("object"!=Ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ae(t)?t:t+""}var _e=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),De(this,"backgroundInfo",{width:0,height:0}),De(this,"transparentId",setTimeout(Boolean)),De(this,"lastDrawImage",void 0),De(this,"toBeList",[]),De(this,"drawProgress",0),De(this,"isTransitioning",!1);var r,n,i=t.renderData;if((0,s.isNull)(i))r=10,n=10;else{var o=getComputedStyle(i.parentElement);r=parseInt(o.width),n=parseInt(o.height)}this.backgroundInfo={width:r,height:n},this.lastDrawImage=N(r,n)},(t=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}}])&&ke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Fe(e){return Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fe(e)}function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){Xe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ze(n.key),n)}}function Ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ce=function(){return!!e})()}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}function Be(e,t){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Be(e,t)}function Xe(e,t,r){return(t=ze(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ze(e){var t=function(e){if("object"!=Fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fe(t)?t:t+""}var Me=new WeakMap,Ge=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Xe(n=function(e,t,r){return t=Ue(t),function(e,t){if(t&&("object"==Fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ce()?Reflect.construct(t,r||[],Ue(e).constructor):t.apply(e,r))}(this,t,[e]),"renderData",null),Xe(n,"options",void 0),Xe(n,"fadeData",void 0),Xe(n,"defaults",E),Xe(n,"initialized",!1),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(n,Me,(0,b.debounce)(ae,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new Oe(Ne(Ne({},n.defaults),r)),n.renderData=new H(e,n.reloadBackground,n),n.fadeData=new _e(n),(0,s.isFalse)(n.initState)||(0,s.isNull)(e.parentElement)||(0,s.isNull)(n.config)||(0,s.isNull)(n.gl)?n.initState=!1:(function(e){var t=e.parentElement;e.width=t.clientWidth,e.height=t.clientHeight,(0,a.setStyle)(e,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(oe,n,[])),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Be(e,t)}(t,e),r=t,n=[{key:"raindropsFall",value:function(){var e=this.renderData,t=this.options,r=this.fadeData;if(!(0,s.isNull)(e)){var n=r.backgroundInfo,i=e.lastRaindropsFallTime,o=t.raindropsTimeInterval,a=t.dropRadius,u=Date.now();if(!(u-i<o)){e.lastRaindropsFallTime=u;var l=function(e){return(0,b.getRandomInt)(e)},c=n.width,f=n.height;this.drop(l(c),l(f),a,.03)}}}},{key:"drop",value:function(e,t,r,n){Reflect.apply(se,this,[e,t,r,n])}},{key:"fade",value:function(){Reflect.apply(xe,this,[])}},{key:"reloadBackground",value:function(){var e,t;(e=Me,t=this,e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))).call(this)}},{key:"destroy",value:function(){Reflect.apply(le,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(U,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(ue,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var e=this.options;e.running=!e.running}},{key:"set",value:function(e,t){"imageUrl"===e?(this.options.imageUrl=t,Reflect.apply(C,this,[])):this.options[e]=t}}],n&&Le(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(g);function We(e,t){var r=(0,o.useRef)(null);return(0,o.useEffect)((function(){if(!(0,s.isNull)(e.current))return r.current=new Ge(e.current,t&&t.option),function(){var e,t;return null!==(e=null===(t=r.current)||void 0===t?void 0:t.destroy())&&void 0!==e?e:void 0}}),[]),r}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,exports:{}};return o[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.nc=void 0;var l=u(153),s=u(363),c=u(195),f=u(552),d=u(615),p=u(707);const h=c.t,y=p.n,m=f.O;export{h as useInputIsComposing,y as useRipples,m as useTimeId};export const BackgroundRipple=l.z;export const EnLayout=s.wb;export const EnLayoutContent=s.Ht;export const EnLayoutFooter=s.zE;export const EnLayoutHeader=s.n5;export const EnLayoutSideBar=s.AX;export const Layout=s.PE;export const LayoutContent=s.A1;export const LayoutFooter=s.cZ;export const LayoutHeader=s.KL;export const LayoutSideBar=s.nb;export const useAnimationFrameId=d.M;
|
|
1
|
+
import*as e from"a-element-inline-style";import*as t from"a-js-tools";import*as r from"a-type-of-js";import*as n from"xcn";import*as i from"react";var o={56:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var o={},a=[],l=0;l<e.length;l++){var u=e[l],s=n.base?u[0]+n.base:u[0],c=o[s]||0,f="".concat(s," ").concat(c);o[s]=c+1;var d=r(f),p={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var h=i(p,n);n.byIndex=l,t.splice(l,0,{identifier:f,updater:h,references:1})}a.push(f)}return a}function i(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,i){var o=n(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var l=r(o[a]);t[l].references--}for(var u=n(e,i),s=0;s<o.length;s++){var c=r(o[s]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=u}}},78:(r,n,i)=>{i.d(n,{n:()=>qe});var o=i(649);const a=(l={setStyle:()=>e.setStyle},u={},i.d(u,l),u);var l,u,s=i(362);function c(e,t,r,n){function i(e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,a={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(a.id,i(r.VERTEX_SHADER,e)),r.attachShader(a.id,i(r.FRAGMENT_SHADER,t)),r.linkProgram(a.id),!r.getProgramParameter(a.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(a.id));r.useProgram(a.id),r.enableVertexAttribArray(0);for(var l=e+t,u=/uniform (\w+) (\w+)/g;!(0,s.isNull)(o=u.exec(l));){var c=o[2];a.locations[c]=r.getUniformLocation(a.id,c)}return a}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(t||0)),r.bindTexture(r.TEXTURE_2D,e)}function d(e){return"rgba(0, 0, 0, 0)"===e||"#ffffffff"===e||"transport"===e}function p(e){return"none"===e||""===e}function h(){var e=this,t=function(){return e.initState=!1,null};if(!this.gl)return t();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce((function(e,t){var n=r.getExtension(t);return n&&e.push([t,n]),e}),[]));if(!n.OES_texture_float)return t();var i=[];function o(e,t,r){var i="OES_texture_"+e,o=i+"_linear",a=o in n;return{type:t,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),l=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,l),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var u=null,s=0;s<i.length;s++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[s].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){u=i[s];break}return u}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,b(n.key),n)}}function m(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=b(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}var w=m((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),v(this,"canvas",void 0),v(this,"gl",void 0),v(this,"config",void 0),v(this,"initState",!0),this.canvas=t;var r=t.getContext("webgl");if((0,s.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(h,this,[])}));const E=(e=>{var t={};return i.d(t,e),t})({debounce:()=>t.debounce,enArr:()=>t.enArr,getRandomInt:()=>t.getRandomInt,getRandomString:()=>t.getRandomString});var R,S={imgUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T(n.key),n)}}function T(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function A(e){var t=function(e){if("object"!=x(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}function D(e,t,r){return e.set(_(e,t),r),r}function j(e,t){return e.get(_(e,t))}function _(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function I(e){return function(e){if(Array.isArray(e))return F(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.freeze(S),new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(){};return Object.setPrototypeOf(t,this),Object.defineProperties(t,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),t},(t=[{key:"clear",value:function(){}}])&&O(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())({name:"earthnut",type:!1});var L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t={list:[],diameter:48,radius:0,cells:0};t.diameter%2!=0&&t.diameter++;var r=t.diameter,n=t.list,i=r/2;t.radius=i,t.cells=Math.pow(r,2);for(var o=0;o<r;o++){n[o]=[];for(var a=0;a<r;a++)n[o][a]=[0,0,0,0]}for(var l=0;l<=i;l++)for(var u=l;u<=i;u++){var s=n[l][u],c=function(){return(0,E.getRandomInt)(255,190)};s[0]=c(),s[1]=c(),s[2]=c(),s[3]=Math.ceil(Math.sqrt(Math.pow(l,2)+Math.pow(u,2)))<=i?(0,E.getRandomInt)(120,180):(0,E.getRandomInt)(160,240)}for(var f=0;f<=i;f++)for(var d=0;d<=f;d++)n[f][d]=n[d][f];for(var p=i;p<r;p++)for(var h=0;h<=i;h++)n[p][h]=n[r-p][h];for(var y=0;y<i;y++)for(var g=i;g<r;g++)n[y][g]=n[y][r-g];for(var m=i;m<r;m++)for(var v=i;v<r;v++)n[m][v]=n[m][r-v];var b=e%r;return t.list=[].concat(I(n.slice(b)),I(n.slice(0,b))),t},N=new(R=new WeakMap,function(){return e=function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(this,R,1),t=this,r="data",n=L(),(r=A(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n},(t=[{key:"build",value:function(){j(R,this)>100&&D(R,this,0),this.data=L(D(R,this,j(R,this)+3))}}])&&k(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function C(e,t){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,s.isNull)(i)||(0,s.isNull)(o)?r:(r.width=n.width=e,r.height=n.height=t,i.clearRect(0,0,e,t),o.clearRect(0,0,e,t),i.globalAlpha=1,i.putImageData(function(e,t){Date.now();for(var r=new ImageData(e,t),n=r.data,i=N.data,o=i.diameter,a=i.list,l=e*o,u=0;u<n.length;u+=4){var s=u/4%l,c=s%e%o,f=Math.floor(s/e),d=a[c][f];n[u]=d[0],n[u+1]=d[1],n[u+2]=d[2],n[u+3]=d[3]}return r}(e,t),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,e,t),o.drawImage(r,0,0,e,t),o.globalCompositeOperation="source-over",n)}function U(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.fadeData,r=t.backgroundInfo,n=t.toBeList,i=r.width,o=r.height,a=(0,E.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});N.build(),n.push({resource:C(i,o),width:i,height:o,kind:"default",tag:a}),e&&t.run()}function B(){var e=this.renderData,t=this.fadeData,r=this.options;if((0,s.isNull)(e))return Reflect.apply(U,this,[]);var n=e.originStyle;if(d(n.backgroundColor)&&(!(0,s.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(U,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,s.isNull)(o))return Reflect.apply(U,this,[]);var a=t.backgroundInfo,l=a.width,u=a.height;i.width=l,i.height=u,o.clearRect(0,0,l,u);var c=(0,s.isArray)(r.imgUrl)&&1===r.imgUrl.length&&r.imgUrl[0]||n.backgroundColor;o.beginPath(),o.fillStyle=c,o.fillRect(0,0,l,u),o.fill(),t.isTransitioning?t.toBeList=[t.toBeList[0]]:t.toBeList=[];var f={resource:i,kind:"background-color",tag:c,width:l,height:u};t.toBeList.push(f),t.run()}function X(){var e=this.fadeData,t=this.renderData,r=this.options;if((0,s.isNull)(t))return Reflect.apply(B,this,[]);var n=t.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,s.isArray)(r.imgUrl))return Reflect.apply(B,this,[]);var i=(0,s.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map((function(e){return(e=e.trim()).endsWith(")")||(e+=")"),e})).filter((function(e){return e.startsWith("rgb")||e.startsWith("#")}));if(i.length<2)return Reflect.apply(B,this,[]);var o=document.createElement("canvas"),a=o.getContext("2d");if((0,s.isNull)(a))return Reflect.apply(B,this,[]);var l=e.backgroundInfo,u=l.width,c=l.height;o.width=u,o.height=c,a.fillStyle="#fff",a.fillRect(0,0,u,c);var f=a.createLinearGradient(0,0,0,c);i.forEach((function(e,t){return f.addColorStop(t/(i.length-1),e)})),a.fillStyle=f,a.fillRect(0,0,u,c),e.isTransitioning?e.toBeList=[e.toBeList[0]]:e.toBeList=[],e.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:u,height:c}),e.run()}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function M(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if((0,s.isNull)(t))Reflect.apply(X,this,[]);else{var i,o,a=t.lastUseStyle,l=n.backgroundInfo,u=l.width,c=l.height,f=(0,s.isString)(r.imgUrl)&&r.imgUrl||(i=a.backgroundImage,o=/url\(["']?([^"']*)["']?\)/.exec(i),(0,s.isNull)(o)?null:o[1]);if(t.imageSource=f,f){var d=function(e,t,r){var n=new Image(t,r);return n.width=t,n.height=r,n.src=e,n}(f,u,c);d.onload=function(){var e;clearTimeout(n.transparentId),n.isTransitioning?n.toBeList=[n.toBeList[0]].concat(function(e){if(Array.isArray(e))return z(e)}(e=n.toBeList.slice(1).filter((function(e){return"image"===e.kind&&(Math.abs(e.width-u)>2||Math.abs(e.height-c)>2||e.tag!==f)})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return z(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):n.toBeList=[],n.toBeList.push({resource:d,width:u,height:c,kind:"image",tag:f}),n.run()},d.onerror=function(){Reflect.apply(X,e,[])},d.crossOrigin=r.crossOrigin}else Reflect.apply(X,this,[])}}function W(){var e=this.renderData;if(!(0,s.isNull)(e)){var t=e.parentElement;t&&[["background-image","none"],["background-color","transparent"]].forEach((function(e){return t.style.setProperty(e[0],e[1],"important")}))}}function G(e){var t=window.getComputedStyle(e),r=e.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:t.backgroundColor,backgroundImage:t.backgroundImage,backgroundSize:t.backgroundSize,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundClip:t.backgroundClip,backgroundOrigin:t.backgroundOrigin,backgroundAttachment:t.backgroundAttachment,position:t.position,width:parseInt(t.width),height:parseInt(t.height)}}function H(){var e=this.renderData;if(!(0,s.isNull)(e)){var t=e.parentElement,r=e.originStyle;t.style.setProperty("background-image",r.inlineBackgroundImage),t.style.setProperty("background-color",r.inlineBackgroundColor)}}function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function Y(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Z(n.key),n)}}function q(e,t,r){return(t=Z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e){var t=function(e){if("object"!=Q(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q(t)?t:t+""}var V=function(){return e=function e(t,r,n){var i,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),q(this,"quad",null),q(this,"lastRaindropsFallTime",0),q(this,"parentElement",void 0),q(this,"mutationObserver",void 0),q(this,"resizeObserver",void 0),q(this,"renderProgram",void 0),q(this,"imageSource",""),q(this,"dropProgram",void 0),q(this,"updateProgram",void 0),q(this,"textures",[]),q(this,"backgroundTexture",[]),q(this,"textureDelta",void 0),q(this,"framebuffers",[]),q(this,"bufferWriteIndex",0),q(this,"bufferReadIndex",1),q(this,"originStyle",void 0),q(this,"lastUseStyle",void 0),q(this,"events",{}),q(this,"animationFrameId",0),this.parentElement=null!==(i=t.parentElement)&&void 0!==i?i:document.body,Reflect.apply(W,n,[]),this.originStyle=this.lastUseStyle=G(this.parentElement),this.mutationObserver=new MutationObserver((function(e){e.forEach((function(e){if(e.target===o.parentElement&&"attributes"===e.type&&n.options.visible){var t=Object.values(o.lastUseStyle),i=G(o.parentElement),a=Object.values(i);if((0,s.isEmptyArray)(E.enArr.difference(t,a)))return;var l=p(i.backgroundImage),u=d(i.backgroundColor);if(l&&u)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(W,n,[])}}))})),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver((function(e){e.forEach((function(e){if(e.target===o.parentElement){var t=G(o.parentElement);Math.abs(t.width-o.originStyle.width)<3&&Math.abs(t.height-o.originStyle.height)<3||Reflect.apply(r,n,[])}}))})),this.resizeObserver.observe(this.parentElement)},t=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(H,{renderData:this},[]),this.parentElement&&this.events){var e,t,r,n=this.parentElement,i=this.events;Object.keys(i).forEach((function(e){return n.removeEventListener&&n.removeEventListener(e,i[e])})),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(e=this.mutationObserver)||void 0===e||e.takeRecords(),null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],t&&Y(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function K(){var e=this.renderData,t=this.fadeData;if(!(0,s.isNull)(e)){var r,n,i,o=e.parentElement,a=window.getComputedStyle(o),l=a.backgroundSize,u=a.backgroundAttachment,c=a.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):J(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],d={left:0,top:0,width:0,height:0};"fixed"===u?(d.height=window.innerHeight,d.left=window.screenX,d.top=window.screenY,d.width=window.innerWidth):(d.left=0,d.top=0,d.width=o.scrollWidth,d.height=o.scrollHeight);var p=t.backgroundInfo||{width:100,height:100},h=p.width,y=p.height;if("cover"===l){var g=Math.max(d.width/h,d.height/y);n=h*g,i=y*g}else if("contain"===l){var m=Math.min(d.width/h,d.height/y);n=h*m,i=y*m}else{var v=l.split(" ");n=v[0]||"",i=v[1]||n,J(n)?n=d.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),J(i)?i=d.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=h,i=y):("auto"===n&&(n=h*(Number(i)/y)),"auto"===i&&(i=y*(Number(n)/h)))}var b=f&&f[0]||"0%",w=f&&f[1]||"0%";b=J(b)?(d.left+(d.width-Number(n))*parseFloat(b)/100).toString():(d.left+parseFloat(b)).toString(),w=J(w)?(d.top+(d.height-Number(i))*parseFloat(w)/100).toString():(d.top+parseFloat(w)).toString(),e.renderProgram.uniforms.topLeft=new Float32Array([(o.offsetLeft-Number(b))/n,(o.offsetTop-Number(w))/i]),e.renderProgram.uniforms.bottomRight=new Float32Array([e.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,e.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var E=Math.max(this.canvas.width,this.canvas.height);e.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/E,this.canvas.height/E])}}function J(e){return e.endsWith("%")}function $(){var e=this.gl,t=this.renderData;(0,s.isNull)(t)||(e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_FAN,0,4))}function ee(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,s.isNull)(t)){var n=t.textures,i=t.backgroundTexture,o=r.perturbance;e.bindFramebuffer(e.FRAMEBUFFER,null),e.viewport(0,0,this.canvas.width,this.canvas.height),e.enable(e.BLEND),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.useProgram(t.renderProgram.id),Reflect.apply(f,this,[i,0]),Reflect.apply(f,this,[n[0],1]),e.uniform1f(t.renderProgram.locations.perturbance,o),e.uniform2fv(t.renderProgram.locations.topLeft,t.renderProgram.uniforms.topLeft),e.uniform2fv(t.renderProgram.locations.bottomRight,t.renderProgram.uniforms.bottomRight),e.uniform2fv(t.renderProgram.locations.containerRatio,t.renderProgram.uniforms.containerRatio),e.uniform1i(t.renderProgram.locations.samplerBackground,0),e.uniform1i(t.renderProgram.locations.samplerRipples,1),Reflect.apply($,this,[]),e.disable(e.BLEND)}}function te(){var e=this.renderData;if(!(0,s.isNull)(e)){var t=e.bufferWriteIndex,r=e.bufferReadIndex;e.bufferWriteIndex=1-t,e.bufferReadIndex=1-r}}function re(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,s.isNull)(t)){var n=t.updateProgram,i=t.textures,o=t.framebuffers,a=t.bufferWriteIndex,l=t.bufferReadIndex,u=r.resolution;e.viewport(0,0,u,u),e.bindFramebuffer(e.FRAMEBUFFER,o[a]),Reflect.apply(f,this,[i[l]]),e.useProgram(n.id),Reflect.apply($,this,[]),Reflect.apply(te,this,[])}}function ne(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,s.isNull)(t)){var i=t.parentElement,o=n.isTransitioning,a=r.running,l=r.idleFluctuations,u=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply(K,this,[]),a?(u||(r.lastRunningState=!0,this.show()),l&&this.raindropsFall(),o&&this.fade(),Reflect.apply(re,this,[]),Reflect.apply(ee,this,[])):u&&(r.lastRunningState=!1,this.hide()),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(ne,e,[])}))}}function ie(e,t,r){var n=this.renderData;if(!(0,s.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,l=parseInt(o.borderTopWidth)||0,u=i.getBoundingClientRect(),c=e.clientX-u.left-a,f=e.clientY-u.top-l;this.drop(c,f,t,r)}}function oe(){var e=this,t=this.renderData,r=this.options;if(!(0,s.isNull)(t)){var n=t.parentElement,i=t.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(t.lastRaindropsFallTime=Date.now(),Reflect.apply(ie,e,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(e){for(var t=r.accelerating;t--;)o(e)},i.touchmove=i.touchstart=function(e){for(var t=e.touches,r=0;r<t.length;r++)o(t[r])},i.mousedown=function(e){return o(e,!0)},Object.keys(i).forEach((function(e){return null==n?void 0:n.addEventListener(e,i[e],{passive:!0})}))}}var ae="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function le(){var e=this.gl,t=this.renderData;if(!(0,s.isNull)(t)){var r=t.textureDelta;t.dropProgram=c(ae,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",e);var n=t.updateProgram=c(ae,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);e.uniform2fv(n.locations.delta,r),t.renderProgram=c("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",e),e.uniform2fv(t.renderProgram.locations.delta,r)}}function ue(){var e=this.gl,t=this.renderData;if(!(0,s.isNull)(t)){var r=t.backgroundTexture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)}}function se(e){var t=this.gl,r=this.renderData,n=this.fadeData;if(!(0,s.isNull)(r)){var i=r.backgroundTexture,o=n.backgroundInfo,a=o.width,l=o.height,u=function(e){return(0,s.isZero)(e&e-1)},c=u(a)&&u(l)?t.REPEAT:t.CLAMP_TO_EDGE;t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,c),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,c),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e.resource)}}function ce(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,s.isNull)(t)&&this.config){var i=t.textures,o=t.framebuffers,a=r.resolution,l=this.gl,u=1/a;t.textureDelta=new Float32Array([u,u]),this.config.extensions.forEach((function(e){return l.getExtension(e)}));for(var c=this.config.arrayType,f=c?new c(a*a*4):null,d=this.config,p=0;p<2;p++){var h=l.createTexture(),y=l.createFramebuffer();l.bindFramebuffer(l.FRAMEBUFFER,y),l.bindTexture(l.TEXTURE_2D,h),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,d.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,d.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,a,a,0,l.RGBA,d.type,f),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,h,0),i.push(h),o.push(y)}t.quad=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,t.quad),l.bufferData(l.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),l.STATIC_DRAW),Reflect.apply(le,this,[]),Reflect.apply(ue,this,[]),Reflect.apply(M,this,[]),l.clearColor(0,0,0,0),l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(oe,this,[]),Reflect.apply(se,this,[n.lastDrawImage]),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(ne,e,[])}))}}function fe(){var e=this.renderData,t=this.fadeData;if(!(0,s.isNull)(e)){var r=e.parentElement,n=t.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(M,this,[])}}function de(){var e=this.renderData,t=this.fadeData;(0,s.isNull)(e)||(e.destroy(),Object.keys(e).forEach((function(t){return e[t]=null})),this.renderData=null),t.destroy(),Object.keys(t).forEach((function(e){return t[e]=null})),this.fadeData=null,this.gl&&(this.gl=null)}function pe(e,t,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,s.isNull)(i)){var l=i.parentElement,u=i.dropProgram,c=i.textures,d=i.framebuffers,p=i.bufferWriteIndex,h=i.bufferReadIndex,y=o.resolution,g=l.offsetWidth,m=l.offsetHeight,v=Math.max(g,m);r/=v;var b=new Float32Array([(2*e-g)/v,(m-2*t)/v]);a.viewport(0,0,y,y),a.bindFramebuffer(a.FRAMEBUFFER,d[p]),Reflect.apply(f,this,[c[h]]),a.useProgram(u.id),a.uniform2fv(u.locations.center,b),a.uniform1f(u.locations.radius,r),a.uniform1f(u.locations.strength,n),Reflect.apply($,this,[]),Reflect.apply(te,this,[])}}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function ye(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,me(n.key),n)}}function ge(e,t,r){return(t=me(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function me(e){var t=function(e){if("object"!=he(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=he(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==he(t)?t:t+""}function ve(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function be(e,t){return e.get(Ee(e,t))}function we(e,t,r){return e.set(Ee(e,t),r),r}function Ee(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var Re=new WeakMap,Se=new WeakMap,Pe=new WeakMap,Oe=new WeakMap,Te=new WeakMap,xe=new WeakMap,ke=new WeakMap,Ae=function(){return e=function e(t){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ve(this,Re,S.accelerating),ve(this,Se,S.interactive),ve(this,Pe,S.resolution),ve(this,Oe,S.perturbance),ve(this,Te,S.dropRadius),ge(this,"imgUrl",S.imgUrl),ve(this,xe,S.idleFluctuations),ve(this,ke,S.raindropsTimeInterval),ge(this,"crossOrigin","no-cors"),ge(this,"visible",!1),ge(this,"running",!1),ge(this,"lastRunningState",!1),this.perturbance=t.perturbance,this.resolution=t.resolution,this.raindropsTimeInterval=t.raindropsTimeInterval,this.accelerating=t.accelerating,this.interactive=t.interactive,this.dropRadius=t.dropRadius,this.imgUrl=t.imgUrl,this.idleFluctuations=t.idleFluctuations,this.running=Boolean(null===(r=t.playingState)||void 0===r||r),this.crossOrigin=t.crossOrigin},(t=[{key:"accelerating",get:function(){return be(Re,this)},set:function(e){e>100||e<2||we(Re,this,e)}},{key:"interactive",get:function(){return be(Se,this)},set:function(e){(0,s.isBoolean)(e)&&we(Se,this,e)}},{key:"resolution",get:function(){return be(Pe,this)},set:function(e){e<100||e>550||we(Pe,this,e)}},{key:"perturbance",get:function(){return be(Oe,this)},set:function(e){e<1e-4||e>1||we(Oe,this,e)}},{key:"dropRadius",get:function(){return be(Te,this)},set:function(e){!isFinite(e)||e<10||we(Te,this,e)}},{key:"idleFluctuations",get:function(){return be(xe,this)},set:function(e){(0,s.isBoolean)(e)&&we(xe,this,e)}},{key:"raindropsTimeInterval",get:function(){return be(ke,this)},set:function(e){e<10||e>12e3||we(ke,this,e)}},{key:"playingState",get:function(){return this.running},set:function(e){this.running=Boolean(null==e||e)}}])&&ye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function De(){var e=this,t=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(De,e,[]);"image"!==r.lastDrawImage.kind&&r.run()}),2*t.raindropsTimeInterval)}function je(){var e=this.renderData,t=this.fadeData,r=this.options,n=t.toBeList;if((0,s.isNull)(e))return t.isTransitioning=!1,void Reflect.apply(De,this,[]);if((0,s.isEmptyArray)(n))return t.isTransitioning=!1,void Reflect.apply(De,this,[]);if(0===t.drawProgress&&n.forEach((function(e){})),t.drawProgress>1e3)if(t.isTransitioning=!1,t.lastDrawImage=n.shift(),Reflect.apply(se,this,[t.lastDrawImage]),(0,s.isEmptyArray)(n)){var i=e.lastUseStyle;(0,s.isNull)(r.imgUrl)&&d(i.backgroundColor)&&p(i.backgroundImage)&&(Reflect.apply(U,this,[!1]),Reflect.apply(De,this,[]))}else Reflect.apply(De,this,[]);else{var o=t.lastDrawImage,a=t.backgroundInfo;t.drawProgress+=18;var l=document.createElement("canvas"),u=l.getContext("2d");if(!((0,s.isNull)(u)||(0,s.isNull)(o.resource)||(0,s.isEmptyArray)(n))){var c=a.width,f=a.height;l.width=c,l.height=f,u.clearRect(0,0,c,f),u.drawImage(o.resource,0,0,c,f),u.globalAlpha=t.drawProgress/1e3,u.drawImage(n[0].resource,0,0,c,f),u.globalAlpha=1;var h={resource:l,width:c,height:f,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(se,this,[h]),n.length>1&&(t.lastDrawImage=h,n.shift(),t.drawProgress=0)}}}function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Le(n.key),n)}}function Fe(e,t,r){return(t=Le(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e){var t=function(e){if("object"!=_e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=_e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:t+""}var Ne=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Fe(this,"backgroundInfo",{width:0,height:0}),Fe(this,"transparentId",setTimeout(Boolean)),Fe(this,"lastDrawImage",void 0),Fe(this,"toBeList",[]),Fe(this,"drawProgress",0),Fe(this,"isTransitioning",!1);var r,n,i=t.renderData;if((0,s.isNull)(i))r=10,n=10;else{var o=getComputedStyle(i.parentElement);r=parseInt(o.width),n=parseInt(o.height)}this.backgroundInfo={width:r,height:n},this.lastDrawImage={resource:C(r,n),width:r,height:n,kind:"default",tag:""}},(t=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId)}}])&&Ie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(r),!0).forEach((function(t){Ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ue(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,He(n.key),n)}}function ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ze=function(){return!!e})()}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}function We(e,t){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},We(e,t)}function Ge(e,t,r){return(t=He(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function He(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}var Qe=new WeakMap,Ye=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ge(n=function(e,t,r){return t=Me(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ze()?Reflect.construct(t,r||[],Me(e).constructor):t.apply(e,r))}(this,t,[e]),"renderData",null),Ge(n,"options",void 0),Ge(n,"fadeData",void 0),Ge(n,"defaults",S),Ge(n,"initialized",!1),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(n,Qe,(0,E.debounce)(fe,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new Ae(Be(Be({},n.defaults),r)),n.renderData=new V(e,n.reloadBackground,n),n.fadeData=new Ne(n),(0,s.isFalse)(n.initState)||(0,s.isNull)(e.parentElement)||(0,s.isNull)(n.config)||(0,s.isNull)(n.gl)?n.initState=!1:(function(e){var t=e.parentElement;e.width=t.clientWidth,e.height=t.clientHeight,(0,a.setStyle)(e,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(ce,n,[])),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&We(e,t)}(t,e),r=t,n=[{key:"raindropsFall",value:function(){var e=this.renderData,t=this.options,r=this.fadeData;if(!(0,s.isNull)(e)){var n=r.backgroundInfo,i=e.lastRaindropsFallTime,o=t.raindropsTimeInterval,a=t.dropRadius,l=Date.now();if(!(l-i<o)){e.lastRaindropsFallTime=l;var u=function(e){return(0,E.getRandomInt)(e)},c=n.width,f=n.height;this.drop(u(c),u(f),a,.03)}}}},{key:"drop",value:function(e,t,r,n){Reflect.apply(pe,this,[e,t,r,n])}},{key:"fade",value:function(){Reflect.apply(je,this,[])}},{key:"reloadBackground",value:function(){var e,t;(e=Qe,t=this,e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))).call(this)}},{key:"destroy",value:function(){Reflect.apply(de,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(W,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(H,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var e=this.options;e.running=!e.running}},{key:"set",value:function(e,t){"imgUrl"===e?(this.options.imgUrl=t,Reflect.apply(M,this,[])):this.options[e]=t}}],n&&Xe(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(w);function qe(e,t){var r=(0,o.useRef)(null);return(0,o.useEffect)((function(){if(!(0,s.isNull)(e.current))return r.current=new Ye(e.current,t&&t.option),function(){var e,t;return null!==(e=null===(t=r.current)||void 0===t?void 0:t.destroy())&&void 0!==e?e:void 0}}),[]),r}},109:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(601),i=r.n(n),o=r(314),a=r.n(o)()(i());a.push([e.id,".en-ripple-container{width:100%;height:100%;position:relative;top:0px;left:0px;z-index:1}",""]);const l=a},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},153:(e,t,r)=>{r.d(t,{z:()=>T});var n=r(649),i=r(78),o=r(362),a=r(411),l=r(72),u=r.n(l),s=r(825),c=r.n(s),f=r(659),d=r.n(f),p=r(56),h=r.n(p),y=r(540),g=r.n(y),m=r(113),v=r.n(m),b=r(109),w={};function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}w.styleTagTransform=v(),w.setAttributes=h(),w.insert=d().bind(null,"head"),w.domAPI=c(),w.insertStyleElement=g(),u()(b.A,w),b.A&&b.A.locals&&b.A.locals;var R=["children","style"];function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T=(0,n.forwardRef)((function(e,t){var r=e.children,l=e.style,u=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,R),s=(0,n.useRef)(null),c=(0,i.n)(s,u);return function(e,t){(0,n.useEffect)((function(){if(t.option&&e.current){var r=t.option;Object.keys(e.current.defaults).forEach((function(t){!(0,o.isUndefined)(r[t])&&e.current&&e.current.set(t,r[t])}))}}),[t.option])}(c,u),(0,n.useImperativeHandle)(t,(function(){return{toggleState:function(){var e;null===(e=c.current)||void 0===e||e.changePlayingState()},get state(){var e,t;return null!==(e=null===(t=c.current)||void 0===t?void 0:t.options.playingState)&&void 0!==e&&e},pause:function(){var e;null===(e=c.current)||void 0===e||e.pause()},set:function(e){if(!(0,o.isUndefined)(e))for(var t=Object.keys(e),r=0,n=t.length;r<n;r++){var i,a=t[r];null===(i=c.current)||void 0===i||i.set(a,e[a])}}}})),n.default.createElement("div",{className:(0,a.xcn)("en-ripple-container"),style:P({backgroundRepeat:"round"},l)},n.default.createElement("canvas",{ref:s,"data-earthnut-ui":"canvas"}),r)}));T.displayName="en-background-ripple"},195:(e,t,r)=>{r.d(t,{t:()=>i});var n=r(649);function i(e){var t=(0,n.useRef)(!1);return(0,n.useEffect)((function(){var r=e.current;if(r){var n=function(){return t.current=!0},i=function(){return t.current=!1};return r.addEventListener("compositionstart",n),r.addEventListener("compositionend",i),function(){r.removeEventListener("compositionstart",n),r.removeEventListener("compositionend",i)}}}),[]),t}},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var l=0;l<this.length;l++){var u=this[l][0];null!=u&&(a[u]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);n&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},362:(e,t,n)=>{var i,o;e.exports=(i={isArray:()=>r.isArray,isBoolean:()=>r.isBoolean,isEmptyArray:()=>r.isEmptyArray,isFalse:()=>r.isFalse,isNull:()=>r.isNull,isNumber:()=>r.isNumber,isString:()=>r.isString,isTrue:()=>r.isTrue,isUndefined:()=>r.isUndefined,isZero:()=>r.isZero},o={},n.d(o,i),o)},363:(e,t,r)=>{r.d(t,{wb:()=>B,Ht:()=>k,zE:()=>j,n5:()=>R,AX:()=>O,PE:()=>B,A1:()=>k,cZ:()=>j,KL:()=>R,nb:()=>O});var n=r(649),i=r(411),o=r(72),a=r.n(o),l=r(825),u=r.n(l),s=r(659),c=r.n(s),f=r(56),d=r.n(f),p=r(540),h=r.n(p),y=r(113),g=r.n(y),m=r(384),v={};v.styleTagTransform=g(),v.setAttributes=d(),v.insert=c().bind(null,"head"),v.domAPI=u(),v.insertStyleElement=h(),a()(m.A,v);const b=m.A&&m.A.locals?m.A.locals:void 0;var w=["className","children","height","noSticky"];function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},E.apply(null,arguments)}var R=n.default.forwardRef((function(e,t){var r=e.className,o=e.children,a=(e.height,e.noSticky,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,w));return n.default.createElement("div",E({ref:t,className:(0,i.xcn)(b["en-layout-header"],r)},a,{"data-earthnut-ui":"layout-header"}),o)}));R.displayName="LayoutHeader";var S=["className","width","right","full"];function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P.apply(null,arguments)}var O=n.default.forwardRef((function(e,t){var r=e.className,o=(e.width,e.right,e.full,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,S));return n.default.createElement("div",P({className:(0,i.xcn)(b["en-layout-side"],r),ref:t},o,{"data-earthnut-ui":"layout-side-bar"}))}));O.displayName="LayoutSideBar";var T=["className"];function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},x.apply(null,arguments)}var k=n.default.forwardRef((function(e,t){var r=e.className,o=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,T);return n.default.createElement("main",x({ref:t,className:(0,i.xcn)(b["en-layout-main"],r)},o,{"data-earthnut-ui":"layout-content"}))}));k.displayName="LayoutContent";var A=["className","height"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(null,arguments)}var j=n.default.forwardRef((function(e,t){var r=e.className,o=(e.height,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,A));return n.default.createElement("div",D({ref:t},o,{className:(0,i.xcn)(b["en-layout-footer"],r),"data-earthnut-ui":"layout-footer"}))}));j.displayName="LayoutFooter";var _=r(362);function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}var F=["className","children","style","width","height"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(null,arguments)}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?N(Object(r),!0).forEach((function(t){U(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r){return(t=function(e){var t=function(e){if("object"!=I(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==I(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var B=n.forwardRef((function(e,t){var r,o,a,l,u=e.className,s=e.children,c=e.style,f=e.width,d=void 0===f?"100vw":f,p=e.height,h=void 0===p?"100vh":p,y=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,F),g="simple",m="",v=!1,w=!1,E=!1,S=!1,P=150,T="2.8rem",x="2rem",A=!1;n.Children.forEach(s,(function(e){if(n.isValidElement(e))if(v||e.type!==R)if(w||e.type!==O)E||e.type!==k?E||e.type!==B?S||e.type!==j||(x=e.props.height||x,l=e,S=!0):(a=n.createElement("main",{"data-earthnut-ui":"layout-content",className:(0,i.xcn)(b["en-layout-main"])},e),E=!0):(a=e,E=!0);else{var t=e.props;P=t.width||P,g=t.right&&t.full?"side-right-full":t.right?"side-right":t.full?"side-full":"simple",A=(0,_.isTrue)(t.full),o=e,w=!0}else{var u=e.props;T=u.height||T,m=u.noSticky?b["en-layout-header-no-sticky"]:"",r=e,v=!0}}));var D=v&&w&&E&&S&&b["en-layout-".concat(g,"-all")]||v&&E&&w&&b["en-layout-".concat(g,"-no-footer")]||w&&E&&S&&b["en-layout-".concat(g,"-no-header")]||E&&S&&b["en-layout-only-footer"]||E&&v&&b["en-layout-only-header"]||E&&w&&(A=!0)&&b["en-layout-".concat(g,"-only-side")]||"";return n.createElement("div",L({ref:t,className:(0,i.xcn)(b["en-layout"],A&&b["en-layout-side-full"],D,m,u),style:C({"--layout-width":X(d),"--layout-height":X(h),"--layout-side-bar-width":X(P),"--layout-header-height":X(T),"--layout-footer-height":X(x)},c)},y,{"data-earthnut-ui":"layout"}),/side.*full/.test(g)?n.createElement(n.Fragment,null,o,r,a,l):n.createElement(n.Fragment,null,r,S?n.createElement("div",{className:(0,i.xcn)(b["en-layout-content"]),"data-earthnut-ui":"layout-with-foot-content"},o,a):n.createElement(n.Fragment,null,o,a),l))}));function X(e){return(0,_.isNumber)(e)||parseInt(e)===Number(e)?e+"px":e||0}B.displayName="Layout"},384:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(601),i=r.n(n),o=r(314),a=r.n(o)()(i());a.push([e.id,'.LcdTDTWWkxGZFXQc8XNV{width:var(--layout-width);height:var(--layout-height);overflow-x:hidden;overflow-y:auto}.CxCt7n1zXeDfFdmgQAme{grid-area:header;position:sticky;top:0px;left:0px;z-index:10;height:var(--layout-header-height);box-shadow:0 4px 13px -3px rgba(0,0,0,.1019607843);overflow:hidden}.E2socS6t6fugHzd2ATQy{position:sticky;left:0;z-index:8;grid-area:side;overflow-x:hidden;overflow-y:auto}.k2yu7eCpEzToH_ynBglg{grid-area:content}.zWuykaXyereS6ELF7SHy{grid-area:footer;height:var(--layout-footer-height);box-shadow:0 -1px 13px 0px rgba(0,0,0,.1019607843);overflow:hidden}.O6AnGNbL5r3nPmEFEv73>.CxCt7n1zXeDfFdmgQAme{position:relative;z-index:2}.O6AnGNbL5r3nPmEFEv73.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy,.O6AnGNbL5r3nPmEFEv73.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy{top:0;min-height:calc(var(--layout-height) - var(--layout-footer-height) - var(--layout-header-height));max-height:var(--layout-height)}.O6AnGNbL5r3nPmEFEv73.Wz4q5vQzeOw8RbDr0rOF>.E2socS6t6fugHzd2ATQy,.O6AnGNbL5r3nPmEFEv73.GkLVEZcHiQyvuSh0RLU5>.E2socS6t6fugHzd2ATQy{top:0;min-height:calc(var(--layout-height) - var(--layout-footer-height));max-height:var(--layout-height)}.rZPYzoPjyQP7sDeJbPjp>.E2socS6t6fugHzd2ATQy{top:0;height:var(--layout-height)}.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u,.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u{display:grid;grid-template-rows:calc(var(--layout-height) - var(--layout-header-height) - var(--layout-footer-height)) auto;min-height:calc(100% - var(--layout-header-height) - var(--layout-footer-height))}.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy,.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy{top:var(--layout-header-height);min-height:calc(var(--layout-height) - var(--layout-header-height) - var(--layout-footer-height));max-height:calc(var(--layout-height) - var(--layout-header-height))}.ognI7wqsq0lXqSVkJ0cj>.r_iQ4e7myBc0DSPRkp2u,.UhPmIL0kNAGv5201kGbo>.r_iQ4e7myBc0DSPRkp2u{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side content" ". content"}.Sax5A5AqDPokwTlrUZu5>.r_iQ4e7myBc0DSPRkp2u,.Nkg7pjNAPCenCQZY8gLg>.r_iQ4e7myBc0DSPRkp2u{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"content side" "content ."}.XRYEv9hWhdcl2OHap6fQ,.SmA7SjLAZLofOenJZAWg{display:grid;grid-template-rows:var(--layout-header-height) auto var(--layout-footer-height);gap:0px}.XRYEv9hWhdcl2OHap6fQ{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side header" "side content" "side footer"}.SmA7SjLAZLofOenJZAWg{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"header side" "content side" "footer side"}.UhPmIL0kNAGv5201kGbo>.r_iQ4e7myBc0DSPRkp2u,.Nkg7pjNAPCenCQZY8gLg>.r_iQ4e7myBc0DSPRkp2u{display:grid;grid-template-rows:auto}.UhPmIL0kNAGv5201kGbo>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy,.Nkg7pjNAPCenCQZY8gLg>.r_iQ4e7myBc0DSPRkp2u>.E2socS6t6fugHzd2ATQy{top:0;min-height:calc(var(--layout-height) - var(--layout-footer-height));max-height:var(--layout-height)}.UT3CcVcTx9pLwV2GGFGi,.tzvYxycvFA9rcOf26LP7{display:grid;grid-template-rows:auto var(--layout-footer-height);gap:0px}.UT3CcVcTx9pLwV2GGFGi{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side content" "side footer"}.tzvYxycvFA9rcOf26LP7{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"content side" "footer side"}.Wz4q5vQzeOw8RbDr0rOF,.GkLVEZcHiQyvuSh0RLU5{display:grid;grid-template-rows:var(--layout-header-height) auto;min-height:calc(100% - var(--layout-header-height));gap:0px}.Wz4q5vQzeOw8RbDr0rOF>.E2socS6t6fugHzd2ATQy,.GkLVEZcHiQyvuSh0RLU5>.E2socS6t6fugHzd2ATQy{top:var(--layout-header-height);height:calc(var(--layout-height) - var(--layout-header-height))}.Wz4q5vQzeOw8RbDr0rOF{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"header header" "side content" ". content"}.GkLVEZcHiQyvuSh0RLU5{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"header header" "content side" "content ."}.cFlRZr9kGWMtc0nRYCWE,.DzmD_4Su8YXCKKIwXjG1{display:grid;grid-template-rows:var(--layout-header-height) auto;gap:0px}.cFlRZr9kGWMtc0nRYCWE>.k2yu7eCpEzToH_ynBglg,.DzmD_4Su8YXCKKIwXjG1>.k2yu7eCpEzToH_ynBglg{min-height:calc(var(--layout-height) - var(--layout-header-height))}.cFlRZr9kGWMtc0nRYCWE{grid-template-columns:var(--layout-side-bar-width) auto;grid-template-areas:"side header" "side content"}.DzmD_4Su8YXCKKIwXjG1{grid-template-columns:auto var(--layout-side-bar-width);grid-template-areas:"header side" "content side"}.sm5xSKZmdrGS3a6b5rcN{display:grid;grid-template-rows:auto var(--layout-footer-height);grid-template-columns:1fr;gap:0px;grid-template-areas:"content" "footer"}.qxhkwYH_Y7uyvMDH8JyZ{display:grid;grid-template-rows:var(--layout-header-height) auto;grid-template-columns:1fr;gap:0px;grid-template-areas:"header" "content"}.sAEoDcBqMzkziXXvgv8X,.jxy4KSYJK23WN2rx2CDS,.wVTitTPpRyG8XfbxJGhy,.mKVYywd6gr5_u2naW5_u{display:grid;grid-template-rows:100%;grid-template-columns:var(--layout-side-bar-width) auto;gap:0px;grid-template-areas:"side content" ". content"}.mKVYywd6gr5_u2naW5_u,.jxy4KSYJK23WN2rx2CDS{grid-template-areas:"content side" "content .";grid-template-columns:auto var(--layout-side-bar-width)}',""]),a.locals={"en-layout":"LcdTDTWWkxGZFXQc8XNV","en-layout-header":"CxCt7n1zXeDfFdmgQAme","en-layout-side":"E2socS6t6fugHzd2ATQy","en-layout-main":"k2yu7eCpEzToH_ynBglg","en-layout-footer":"zWuykaXyereS6ELF7SHy","en-layout-header-no-sticky":"O6AnGNbL5r3nPmEFEv73","en-layout-simple-all":"ognI7wqsq0lXqSVkJ0cj","en-layout-content":"r_iQ4e7myBc0DSPRkp2u","en-layout-side-right-all":"Sax5A5AqDPokwTlrUZu5","en-layout-simple-no-footer":"Wz4q5vQzeOw8RbDr0rOF","en-layout-side-right-no-footer":"GkLVEZcHiQyvuSh0RLU5","en-layout-side-full":"rZPYzoPjyQP7sDeJbPjp","en-layout-simple-no-header":"UhPmIL0kNAGv5201kGbo","en-layout-side-right-no-header":"Nkg7pjNAPCenCQZY8gLg","en-layout-side-full-all":"XRYEv9hWhdcl2OHap6fQ","en-layout-side-right-full-all":"SmA7SjLAZLofOenJZAWg","en-layout-side-full-no-header":"UT3CcVcTx9pLwV2GGFGi","en-layout-side-right-full-no-header":"tzvYxycvFA9rcOf26LP7","en-layout-side-full-no-footer":"cFlRZr9kGWMtc0nRYCWE","en-layout-side-right-full-no-footer":"DzmD_4Su8YXCKKIwXjG1","en-layout-only-footer":"sm5xSKZmdrGS3a6b5rcN","en-layout-only-header":"qxhkwYH_Y7uyvMDH8JyZ","en-layout-simple-only-side":"sAEoDcBqMzkziXXvgv8X","en-layout-side-right-only-side":"jxy4KSYJK23WN2rx2CDS","en-layout-side-full-only-side":"wVTitTPpRyG8XfbxJGhy","en-layout-side-right-full-only-side":"mKVYywd6gr5_u2naW5_u"};const l=a},411:(e,t,r)=>{var i,o;e.exports=(i={xcn:()=>n.xcn},o={},r.d(o,i),o)},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},552:(e,t,r)=>{r.d(t,{O:()=>i});var n=r(649);function i(){var e=(0,n.useRef)(void 0);return(0,n.useEffect)((function(){return function(){e.current&&clearTimeout(e.current)}}),[]),e}},601:e=>{e.exports=function(e){return e[1]}},615:(e,t,r)=>{r.d(t,{M:()=>i});var n=r(649);function i(){var e=(0,n.useRef)(0);return(0,n.useEffect)((function(){return function(){e.current&&window.cancelAnimationFrame(e.current)}}),[]),e}},649:(e,t,r)=>{var n,o;e.exports=(n={Children:()=>i.Children,Fragment:()=>i.Fragment,createElement:()=>i.createElement,default:()=>i.default,forwardRef:()=>i.forwardRef,isValidElement:()=>i.isValidElement,useEffect:()=>i.useEffect,useImperativeHandle:()=>i.useImperativeHandle,useRef:()=>i.useRef},o={},r.d(o,n),o)},659:e=>{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}},a={};function l(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={id:e,exports:{}};return o[e](r,r.exports,l),r.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.nc=void 0;var u=l(153),s=l(363),c=l(195),f=l(552),d=l(615),p=l(78);const h=c.t,y=p.n,g=f.O;export{h as useInputIsComposing,y as useRipples,g as useTimeId};export const BackgroundRipple=u.z;export const EnLayout=s.wb;export const EnLayoutContent=s.Ht;export const EnLayoutFooter=s.zE;export const EnLayoutHeader=s.n5;export const EnLayoutSideBar=s.AX;export const Layout=s.PE;export const LayoutContent=s.A1;export const LayoutFooter=s.cZ;export const LayoutHeader=s.KL;export const LayoutSideBar=s.nb;export const useAnimationFrameId=d.M;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"name": "earthnut",
|
|
12
|
-
"version": "0.0.
|
|
12
|
+
"version": "0.0.2",
|
|
13
13
|
"description": "earthnut 的 react ui",
|
|
14
14
|
"overrides": {
|
|
15
15
|
"css-loader": "6.11.0"
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"a-element-inline-style": "^0.0.1",
|
|
20
20
|
"a-js-tools": "^1.0.5",
|
|
21
21
|
"a-type-of-js": "^1.0.2",
|
|
22
|
-
"eslint-plugin-jsdoc": "^51.3.1",
|
|
23
22
|
"xcn": "^0.1.1"
|
|
24
23
|
},
|
|
25
24
|
"files": [
|
package/useRipples/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={570:e=>{e.exports=require("a-type-of-js")},953:e=>{e.exports=require("react")}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{useRipples:()=>Xe});var i=r(953);const o=require("a-element-inline-style");var a=r(570);function u(e,t,r,n){function i(e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,u={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(u.id,i(r.VERTEX_SHADER,e)),r.attachShader(u.id,i(r.FRAGMENT_SHADER,t)),r.linkProgram(u.id),!r.getProgramParameter(u.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(u.id));r.useProgram(u.id),r.enableVertexAttribArray(0);for(var l=e+t,s=/uniform (\w+) (\w+)/g;!(0,a.isNull)(o=s.exec(l));){var f=o[2];u.locations[f]=r.getUniformLocation(u.id,f)}return u}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(t||0)),r.bindTexture(r.TEXTURE_2D,e)}function s(){var e=this,t=function(){return e.initState=!1,null};if(!this.gl)return t();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce((function(e,t){var n=r.getExtension(t);return n&&e.push([t,n]),e}),[]));if(!n.OES_texture_float)return t();var i=[];function o(e,t,r){var i="OES_texture_"+e,o=i+"_linear",a=o in n;return{type:t,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var l=null,s=0;s<i.length;s++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[s].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[s];break}return l}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function p(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}var v=p((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),h(this,"canvas",void 0),h(this,"gl",void 0),h(this,"config",void 0),h(this,"initState",!0),this.canvas=t;var r=t.getContext("webgl");if((0,a.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(s,this,[])}));const m=require("a-js-tools");var g,b={imageUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function R(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P(n.key),n)}}function P(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(e,t,r){return e.set(_(e,t),r),r}function x(e,t){return e.get(_(e,t))}function _(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function O(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.freeze(b),new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(){};return Object.setPrototypeOf(t,this),Object.defineProperties(t,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),t},(t=[{key:"clear",value:function(){}}])&&E(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())({name:"earthnut",type:!1});var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t={list:[],diameter:48,radius:0,cells:0};t.diameter%2!=0&&t.diameter++;var r=t.diameter,n=t.list,i=r/2;t.radius=i,t.cells=Math.pow(r,2);for(var o=0;o<r;o++){n[o]=[];for(var a=0;a<r;a++)n[o][a]=[0,0,0,0]}for(var u=0;u<=i;u++)for(var l=u;l<=i;l++){var s=n[u][l],f=function(){return(0,m.getRandomInt)(255,190)};s[0]=f(),s[1]=f(),s[2]=f(),s[3]=Math.ceil(Math.sqrt(Math.pow(u,2)+Math.pow(l,2)))<=i?(0,m.getRandomInt)(120,180):(0,m.getRandomInt)(160,240)}for(var c=0;c<=i;c++)for(var p=0;p<=c;p++)n[c][p]=n[p][c];for(var h=i;h<r;h++)for(var d=0;d<=i;d++)n[h][d]=n[r-h][d];for(var v=0;v<i;v++)for(var g=i;g<r;g++)n[v][g]=n[v][r-g];for(var b=i;b<r;b++)for(var y=i;y<r;y++)n[b][y]=n[b][r-y];var E=e%r;return t.list=[].concat(O(n.slice(E)),O(n.slice(0,E))),t},A=new(g=new WeakMap,function(){return e=function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(this,g,1),t=this,r="data",n=k(),(r=P(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n},(t=[{key:"build",value:function(){x(g,this)>100&&S(g,this,0),this.data=k(S(g,this,x(g,this)+3))}}])&&T(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function F(e,t){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,a.isNull)(i)||(0,a.isNull)(o)?r:(r.width=n.width=e,r.height=n.height=t,i.clearRect(0,0,e,t),o.clearRect(0,0,e,t),i.globalAlpha=1,i.putImageData(function(e,t){Date.now();for(var r=new ImageData(e,t),n=r.data,i=A.data,o=i.diameter,a=i.list,u=e*o,l=0;l<n.length;l+=4){var s=l/4%u,f=s%e%o,c=Math.floor(s/e),p=a[f][c];n[l]=p[0],n[l+1]=p[1],n[l+2]=p[2],n[l+3]=p[3]}return r}(e,t),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,e,t),o.drawImage(r,0,0,e,t),o.globalCompositeOperation="source-over",n)}function I(){var e=this.fadeData,t=e.backgroundInfo,r=t.width,n=t.height;A.build(),e.toBeList.push(F(r,n)),e.run()}function j(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if((0,a.isNull)(t))Reflect.apply(I,this,[]);else{var i,o,u=t.lastUseStyle,l=n.backgroundInfo,s=l.width,f=l.height,c=r.imageUrl||(i=u.backgroundImage,o=/url\(["']?([^"']*)["']?\)/.exec(i),(0,a.isNull)(o)?null:o[1]);if(t.imageSource=c,c){var p=function(e,t,r){var n=new Image(t,r);return n.width=t,n.height=r,n.src=e,n}(c,s,f);p.onload=function(){clearTimeout(n.transparentId),n.toBeList=n.toBeList.filter((function(e){return"img"===e.tagName.toLowerCase()&&e.getAttribute("src")!==c&&e.width===s&&e.height===f})),n.toBeList.push(p),n.run()},p.onerror=function(){Reflect.apply(I,e,[])},p.crossOrigin=r.crossOrigin}else Reflect.apply(I,this,[])}}function U(){var e=this.renderData;if(!(0,a.isNull)(e)){var t=e.parentElement;t&&[["background-image","none"],["background-color","transparent"]].forEach((function(e){return t.style.setProperty(e[0],e[1],"important")}))}}function C(e){var t=window.getComputedStyle(e),r=e.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:t.backgroundColor,backgroundImage:t.backgroundImage,backgroundSize:t.backgroundSize,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundClip:t.backgroundClip,backgroundOrigin:t.backgroundOrigin,backgroundAttachment:t.backgroundAttachment,position:t.position}}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,X(n.key),n)}}function B(e,t,r){return t&&L(e.prototype,t),r&&L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(e,t,r){return(t=X(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X(e){var t=function(e){if("object"!=N(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}var W=B((function e(t,r,n){var i,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),M(this,"quad",null),M(this,"lastRaindropsFallTime",0),M(this,"parentElement",void 0),M(this,"mutationObserver",void 0),M(this,"resizeObserver",void 0),M(this,"renderProgram",void 0),M(this,"imageSource",""),M(this,"dropProgram",void 0),M(this,"updateProgram",void 0),M(this,"textures",[]),M(this,"backgroundTexture",[]),M(this,"textureDelta",void 0),M(this,"framebuffers",[]),M(this,"bufferWriteIndex",0),M(this,"bufferReadIndex",1),M(this,"originStyle",void 0),M(this,"lastUseStyle",void 0),M(this,"events",{}),M(this,"animationFrameId",0),this.parentElement=null!==(i=t.parentElement)&&void 0!==i?i:document.body,Reflect.apply(U,n,[]),this.originStyle=this.lastUseStyle=C(this.parentElement),this.mutationObserver=new MutationObserver((function(e){e.forEach((function(e){var t,i;if(e.target===o.parentElement&&"attributes"===e.type&&n.options.visible){var u=Object.values(o.lastUseStyle),l=C(o.parentElement),s=Object.values(l);if((0,a.isEmptyArray)(m.enArr.difference(u,s)))return;var f="none"===(i=l.backgroundImage)||""===i,c="rgba(0, 0, 0, 0)"===(t=l.backgroundColor)||"#ffffffff"===t||"transport"===t;if(f&&c)return;o.lastUseStyle=l,Reflect.apply(r,n,[]),Reflect.apply(U,n,[])}}))})),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver((function(){Reflect.apply(r,n,[])})),this.resizeObserver.observe(this.parentElement)}));function z(){var e=this.renderData,t=this.fadeData;if(!(0,a.isNull)(e)){var r,n,i,o=e.parentElement,u=window.getComputedStyle(o),l=u.backgroundSize,s=u.backgroundAttachment,f=u.backgroundPosition,c=/\s+/.test(r=f)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):G(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],p={left:0,top:0,width:0,height:0};"fixed"===s?(p.height=window.innerHeight,p.left=window.screenX,p.top=window.screenY,p.width=window.innerWidth):(p.left=0,p.top=0,p.width=o.scrollWidth,p.height=o.scrollHeight);var h=t.backgroundInfo||{width:100,height:100},d=h.width,v=h.height;if("cover"===l){var m=Math.max(p.width/d,p.height/v);n=d*m,i=v*m}else if("contain"===l){var g=Math.min(p.width/d,p.height/v);n=d*g,i=v*g}else{var b=l.split(" ");n=b[0]||"",i=b[1]||n,G(n)?n=p.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),G(i)?i=p.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=v):("auto"===n&&(n=d*(Number(i)/v)),"auto"===i&&(i=v*(Number(n)/d)))}var y=c&&c[0]||"0%",E=c&&c[1]||"0%";y=G(y)?(p.left+(p.width-Number(n))*parseFloat(y)/100).toString():(p.left+parseFloat(y)).toString(),E=G(E)?(p.top+(p.height-Number(i))*parseFloat(E)/100).toString():(p.top+parseFloat(E)).toString(),e.renderProgram.uniforms.topLeft=new Float32Array([(o.offsetLeft-Number(y))/n,(o.offsetTop-Number(E))/i]),e.renderProgram.uniforms.bottomRight=new Float32Array([e.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,e.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var R=Math.max(this.canvas.width,this.canvas.height);e.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/R,this.canvas.height/R])}}function G(e){return e.endsWith("%")}function H(){var e=this.gl,t=this.renderData;(0,a.isNull)(t)||(e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_FAN,0,4))}function q(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,a.isNull)(t)){var n=t.textures,i=t.backgroundTexture,o=r.perturbance;e.bindFramebuffer(e.FRAMEBUFFER,null),e.viewport(0,0,this.canvas.width,this.canvas.height),e.enable(e.BLEND),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.useProgram(t.renderProgram.id),Reflect.apply(l,this,[i,0]),Reflect.apply(l,this,[n[0],1]),e.uniform1f(t.renderProgram.locations.perturbance,o),e.uniform2fv(t.renderProgram.locations.topLeft,t.renderProgram.uniforms.topLeft),e.uniform2fv(t.renderProgram.locations.bottomRight,t.renderProgram.uniforms.bottomRight),e.uniform2fv(t.renderProgram.locations.containerRatio,t.renderProgram.uniforms.containerRatio),e.uniform1i(t.renderProgram.locations.samplerBackground,0),e.uniform1i(t.renderProgram.locations.samplerRipples,1),Reflect.apply(H,this,[]),e.disable(e.BLEND)}}function Y(){var e=this.renderData;if(!(0,a.isNull)(e)){var t=e.bufferWriteIndex,r=e.bufferReadIndex;e.bufferWriteIndex=1-t,e.bufferReadIndex=1-r}}function K(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,a.isNull)(t)){var n=t.updateProgram,i=t.textures,o=t.framebuffers,u=t.bufferWriteIndex,s=t.bufferReadIndex,f=r.resolution;e.viewport(0,0,f,f),e.bindFramebuffer(e.FRAMEBUFFER,o[u]),Reflect.apply(l,this,[i[s]]),e.useProgram(n.id),Reflect.apply(H,this,[]),Reflect.apply(Y,this,[])}}function V(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(t)){var i=t.parentElement,o=n.isTransitioning,u=r.running,l=r.idleFluctuations,s=r.lastRunningState,f=getComputedStyle(i);n.backgroundInfo={width:parseInt(f.width),height:parseInt(f.height)},Reflect.apply(z,this,[]),u?(s||(r.lastRunningState=!0,this.show()),l&&this.raindropsFall(),o&&this.fade(),Reflect.apply(K,this,[]),Reflect.apply(q,this,[])):s&&(r.lastRunningState=!1,this.hide()),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(V,e,[])}))}}function Z(e,t,r){var n=this.renderData;if(!(0,a.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),u=parseInt(o.borderLeftWidth)||0,l=parseInt(o.borderTopWidth)||0,s=i.getBoundingClientRect(),f=e.clientX-s.left-u,c=e.clientY-s.top-l;this.drop(f,c,t,r)}}function $(){var e=this,t=this.renderData,r=this.options;if(!(0,a.isNull)(t)){var n=t.parentElement,i=t.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(t.lastRaindropsFallTime=Date.now(),Reflect.apply(Z,e,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(e){for(var t=r.accelerating;t--;)o(e)},i.touchmove=i.touchstart=function(e){for(var t=e.touches,r=0;r<t.length;r++)o(t[r])},i.mousedown=function(e){return o(e,!0)},Object.keys(i).forEach((function(e){return null==n?void 0:n.addEventListener(e,i[e],{passive:!0})}))}}var J="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function Q(){var e=this.gl,t=this.renderData;if(!(0,a.isNull)(t)){var r=t.textureDelta;t.dropProgram=u(J,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",e);var n=t.updateProgram=u(J,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);e.uniform2fv(n.locations.delta,r),t.renderProgram=u("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",e),e.uniform2fv(t.renderProgram.locations.delta,r)}}function ee(){var e=this.gl,t=this.renderData;if(!(0,a.isNull)(t)){var r=t.backgroundTexture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)}}function te(e){var t=this.gl,r=this.renderData,n=this.fadeData;if(!(0,a.isNull)(r)){var i=r.backgroundTexture,o=n.backgroundInfo,u=o.width,l=o.height,s=function(e){return(0,a.isZero)(e&e-1)},f=s(u)&&s(l)?t.REPEAT:t.CLAMP_TO_EDGE;t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,f),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,f),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}}function re(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(t)&&this.config){var i=t.textures,o=t.framebuffers,u=r.resolution,l=this.gl,s=1/u;t.textureDelta=new Float32Array([s,s]),this.config.extensions.forEach((function(e){return l.getExtension(e)}));for(var f=this.config.arrayType,c=f?new f(u*u*4):null,p=this.config,h=0;h<2;h++){var d=l.createTexture(),v=l.createFramebuffer();l.bindFramebuffer(l.FRAMEBUFFER,v),l.bindTexture(l.TEXTURE_2D,d),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,p.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,p.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,u,u,0,l.RGBA,p.type,c),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,d,0),i.push(d),o.push(v)}t.quad=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,t.quad),l.bufferData(l.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),l.STATIC_DRAW),Reflect.apply(Q,this,[]),Reflect.apply(ee,this,[]),Reflect.apply(I,this,[]),Reflect.apply(j,this,[]),l.clearColor(0,0,0,0),l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply($,this,[]),Reflect.apply(te,this,[n.lastDrawImage]),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(V,e,[])}))}}function ne(){var e=this.renderData,t=this.fadeData;if(!(0,a.isNull)(e)){var r=e.parentElement,n=t.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(j,this,[])}}function ie(){var e=this.renderData;if(!(0,a.isNull)(e)){var t=e.parentElement,r=e.originStyle;t.style.setProperty("background-image",r.inlineBackgroundImage),t.style.setProperty("background-color",r.inlineBackgroundColor)}}function oe(){var e=this.renderData,t=this.fadeData;if(!(0,a.isNull)(e)){if(e.animationFrameId&&window.cancelAnimationFrame(e.animationFrameId),t.transparentId&&clearTimeout(t.transparentId),null!=e&&e.parentElement&&null!=e&&e.events){var r,n,i,o=e.parentElement,u=e.events;Object.keys(u).forEach((function(e){return o.removeEventListener&&o.removeEventListener(e,u[e])})),o.removeAttribute&&o.removeAttribute("data-ripples"),null===(r=e.mutationObserver)||void 0===r||r.takeRecords(),null===(n=e.mutationObserver)||void 0===n||n.disconnect(),e.mutationObserver=null,null===(i=e.resizeObserver)||void 0===i||i.disconnect(),e.resizeObserver=null}this.gl=null,Reflect.apply(ie,this,[]),Object.keys(e).forEach((function(t){return e[t]=null})),this.renderData=null,this.gl&&(this.gl=null)}}function ae(e,t,r,n){var i=this.renderData,o=this.options,u=this.gl;if(!(0,a.isNull)(i)){var s=i.parentElement,f=i.dropProgram,c=i.textures,p=i.framebuffers,h=i.bufferWriteIndex,d=i.bufferReadIndex,v=o.resolution,m=s.offsetWidth,g=s.offsetHeight,b=Math.max(m,g);r/=b;var y=new Float32Array([(2*e-m)/b,(g-2*t)/b]);u.viewport(0,0,v,v),u.bindFramebuffer(u.FRAMEBUFFER,p[h]),Reflect.apply(l,this,[c[d]]),u.useProgram(f.id),u.uniform2fv(f.locations.center,y),u.uniform1f(f.locations.radius,r),u.uniform1f(f.locations.strength,n),Reflect.apply(H,this,[]),Reflect.apply(Y,this,[])}}function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fe(n.key),n)}}function se(e,t,r){return(t=fe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fe(e){var t=function(e){if("object"!=ue(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ue(t)?t:t+""}function ce(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function pe(e,t){return e.get(de(e,t))}function he(e,t,r){return e.set(de(e,t),r),r}function de(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var ve=new WeakMap,me=new WeakMap,ge=new WeakMap,be=new WeakMap,ye=new WeakMap,Ee=new WeakMap,Re=new WeakMap,we=function(){return e=function e(t){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ce(this,ve,b.accelerating),ce(this,me,b.interactive),ce(this,ge,b.resolution),ce(this,be,b.perturbance),ce(this,ye,b.dropRadius),se(this,"imageUrl",b.imageUrl),ce(this,Ee,b.idleFluctuations),ce(this,Re,b.raindropsTimeInterval),se(this,"crossOrigin","no-cors"),se(this,"visible",!1),se(this,"running",!1),se(this,"lastRunningState",!1),this.perturbance=t.perturbance,this.resolution=t.resolution,this.raindropsTimeInterval=t.raindropsTimeInterval,this.accelerating=t.accelerating,this.interactive=t.interactive,this.dropRadius=t.dropRadius,this.imageUrl=t.imageUrl,this.idleFluctuations=t.idleFluctuations,this.running=Boolean(null===(r=t.playingState)||void 0===r||r),this.crossOrigin=t.crossOrigin},(t=[{key:"accelerating",get:function(){return pe(ve,this)},set:function(e){e>100||e<2||he(ve,this,e)}},{key:"interactive",get:function(){return pe(me,this)},set:function(e){(0,a.isBoolean)(e)&&he(me,this,e)}},{key:"resolution",get:function(){return pe(ge,this)},set:function(e){e<100||e>550||he(ge,this,e)}},{key:"perturbance",get:function(){return pe(be,this)},set:function(e){e<1e-4||e>1||he(be,this,e)}},{key:"dropRadius",get:function(){return pe(ye,this)},set:function(e){!isFinite(e)||e<10||he(ye,this,e)}},{key:"idleFluctuations",get:function(){return pe(Ee,this)},set:function(e){(0,a.isBoolean)(e)&&he(Ee,this,e)}},{key:"raindropsTimeInterval",get:function(){return pe(Re,this)},set:function(e){e<10||e>12e3||he(Re,this,e)}},{key:"playingState",get:function(){return this.running},set:function(e){this.running=Boolean(null==e||e)}}])&&le(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Te(){var e=this,t=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Te,e,[]);r.drawProgress=0,r.isTransitioning=!0}),2*t.raindropsTimeInterval)}function Pe(){var e=this.renderData,t=this.fadeData,r=t.toBeList,n=t.drawProgress,i=t.lastDrawImage,o=t.backgroundInfo;if(!(0,a.isNull)(e)&&!(0,a.isEmptyArray)(r)){if(t.drawProgress>1e3)return t.isTransitioning=!1,t.lastDrawImage=r.shift(),Reflect.apply(te,this,[t.lastDrawImage]),void((0,a.isEmptyArray)(r)||Reflect.apply(Te,this,[]));t.drawProgress+=18;var u=document.createElement("canvas"),l=u.getContext("2d");if(!((0,a.isNull)(l)||(0,a.isNull)(i)||(0,a.isEmptyArray)(r))){var s=o.width,f=o.height;u.width=s,u.height=f,l.clearRect(0,0,s,f),l.drawImage(i,0,0,s,f),l.globalAlpha=n/1e3,l.drawImage(r[0],0,0,s,f),l.globalAlpha=1,Reflect.apply(te,this,[u])}}}function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function xe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Oe(n.key),n)}}function _e(e,t,r){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oe(e){var t=function(e){if("object"!=Se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}var De=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),_e(this,"backgroundInfo",{width:0,height:0}),_e(this,"transparentId",setTimeout(Boolean)),_e(this,"lastDrawImage",void 0),_e(this,"toBeList",[]),_e(this,"drawProgress",0),_e(this,"isTransitioning",!1);var r,n,i=t.renderData;if((0,a.isNull)(i))r=10,n=10;else{var o=getComputedStyle(i.parentElement);r=parseInt(o.width),n=parseInt(o.height)}this.backgroundInfo={width:r,height:n},this.lastDrawImage=F(r,n)},(t=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}}])&&xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){Ne(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Le(n.key),n)}}function je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(je=function(){return!!e})()}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}function Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ce(e,t)}function Ne(e,t,r){return(t=Le(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e){var t=function(e){if("object"!=ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ke(t)?t:t+""}var Be=new WeakMap,Me=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ne(n=function(e,t,r){return t=Ue(t),function(e,t){if(t&&("object"==ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,je()?Reflect.construct(t,r||[],Ue(e).constructor):t.apply(e,r))}(this,t,[e]),"renderData",null),Ne(n,"options",void 0),Ne(n,"fadeData",void 0),Ne(n,"defaults",b),Ne(n,"initialized",!1),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(n,Be,(0,m.debounce)(ne,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new we(Fe(Fe({},n.defaults),r)),n.renderData=new W(e,n.reloadBackground,n),n.fadeData=new De(n),(0,a.isFalse)(n.initState)||(0,a.isNull)(e.parentElement)||(0,a.isNull)(n.config)||(0,a.isNull)(n.gl)?n.initState=!1:(function(e){var t=e.parentElement;e.width=t.clientWidth,e.height=t.clientHeight,(0,o.setStyle)(e,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(re,n,[])),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(t,e),r=t,(n=[{key:"raindropsFall",value:function(){var e=this.renderData,t=this.options,r=this.fadeData;if(!(0,a.isNull)(e)){var n=r.backgroundInfo,i=e.lastRaindropsFallTime,o=t.raindropsTimeInterval,u=t.dropRadius,l=Date.now();if(!(l-i<o)){e.lastRaindropsFallTime=l;var s=function(e){return(0,m.getRandomInt)(e)},f=n.width,c=n.height;this.drop(s(f),s(c),u,.03)}}}},{key:"drop",value:function(e,t,r,n){Reflect.apply(ae,this,[e,t,r,n])}},{key:"fade",value:function(){Reflect.apply(Pe,this,[])}},{key:"reloadBackground",value:function(){var e,t;(e=Be,t=this,e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))).call(this)}},{key:"destroy",value:function(){Reflect.apply(oe,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(U,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(ie,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var e=this.options;e.running=!e.running}},{key:"set",value:function(e,t){"imageUrl"===e?(this.options.imageUrl=t,Reflect.apply(j,this,[])):this.options[e]=t}}])&&Ie(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(v);function Xe(e,t){var r=(0,i.useRef)(null);return(0,i.useEffect)((function(){if(!(0,a.isNull)(e.current))return r.current=new Me(e.current,t&&t.option),function(){var e,t;return null!==(e=null===(t=r.current)||void 0===t?void 0:t.destroy())&&void 0!==e?e:void 0}}),[]),r}module.exports.earthnut=n})();
|
|
1
|
+
(()=>{"use strict";var t={570:t=>{t.exports=require("a-type-of-js")},953:t=>{t.exports=require("react")}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{useRipples:()=>Ht});var i=r(953);const o=require("a-element-inline-style");var a=r(570);function l(t,e,r,n){function i(t,e){var n=r.createShader(t);if(r.shaderSource(n,e),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,l={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(l.id,i(r.VERTEX_SHADER,t)),r.attachShader(l.id,i(r.FRAGMENT_SHADER,e)),r.linkProgram(l.id),!r.getProgramParameter(l.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(l.id));r.useProgram(l.id),r.enableVertexAttribArray(0);for(var u=t+e,s=/uniform (\w+) (\w+)/g;!(0,a.isNull)(o=s.exec(u));){var c=o[2];l.locations[c]=r.getUniformLocation(l.id,c)}return l}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(e||0)),r.bindTexture(r.TEXTURE_2D,t)}function s(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function c(t){return"none"===t||""===t}function f(){var t=this,e=function(){return t.initState=!1,null};if(!this.gl)return e();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce((function(t,e){var n=r.getExtension(e);return n&&t.push([e,n]),t}),[]));if(!n.OES_texture_float)return e();var i=[];function o(t,e,r){var i="OES_texture_"+t,o=i+"_linear",a=o in n;return{type:e,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),l=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,l),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var u=null,s=0;s<i.length;s++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[s].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){u=i[s];break}return u}function h(t){return h="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},h(t)}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function d(t,e,r){return e&&p(t.prototype,e),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t){var e=function(t){if("object"!=h(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==h(e)?e:e+""}var v=d((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),g(this,"canvas",void 0),g(this,"gl",void 0),g(this,"config",void 0),g(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,a.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(f,this,[])}));const y=require("a-js-tools");var b,E={imgUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};function w(t){return w="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},w(t)}function R(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T(n.key),n)}}function T(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}function S(t){return S="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},S(t)}function P(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,x(n.key),n)}}function x(t){var e=function(t){if("object"!=S(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==S(e)?e:e+""}function k(t,e,r){return t.set(D(t,e),r),r}function _(t,e){return t.get(D(t,e))}function D(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function O(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return I(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}Object.freeze(E),new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(){};return Object.setPrototypeOf(e,this),Object.defineProperties(e,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),e},(e=[{key:"clear",value:function(){}}])&&R(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}())({name:"earthnut",type:!1});var A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e={list:[],diameter:48,radius:0,cells:0};e.diameter%2!=0&&e.diameter++;var r=e.diameter,n=e.list,i=r/2;e.radius=i,e.cells=Math.pow(r,2);for(var o=0;o<r;o++){n[o]=[];for(var a=0;a<r;a++)n[o][a]=[0,0,0,0]}for(var l=0;l<=i;l++)for(var u=l;u<=i;u++){var s=n[l][u],c=function(){return(0,y.getRandomInt)(255,190)};s[0]=c(),s[1]=c(),s[2]=c(),s[3]=Math.ceil(Math.sqrt(Math.pow(l,2)+Math.pow(u,2)))<=i?(0,y.getRandomInt)(120,180):(0,y.getRandomInt)(160,240)}for(var f=0;f<=i;f++)for(var h=0;h<=f;h++)n[f][h]=n[h][f];for(var p=i;p<r;p++)for(var d=0;d<=i;d++)n[p][d]=n[r-p][d];for(var g=0;g<i;g++)for(var m=i;m<r;m++)n[g][m]=n[g][r-m];for(var v=i;v<r;v++)for(var b=i;b<r;b++)n[v][b]=n[v][r-b];var E=t%r;return e.list=[].concat(O(n.slice(E)),O(n.slice(0,E))),e},F=new(b=new WeakMap,function(){return t=function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),function(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}(this,b,1),e=this,r="data",n=A(),(r=x(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(){_(b,this)>100&&k(b,this,0),this.data=A(k(b,this,_(b,this)+3))}}])&&P(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function U(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,a.isNull)(i)||(0,a.isNull)(o)?r:(r.width=n.width=t,r.height=n.height=e,i.clearRect(0,0,t,e),o.clearRect(0,0,t,e),i.globalAlpha=1,i.putImageData(function(t,e){Date.now();for(var r=new ImageData(t,e),n=r.data,i=F.data,o=i.diameter,a=i.list,l=t*o,u=0;u<n.length;u+=4){var s=u/4%l,c=s%t%o,f=Math.floor(s/t),h=a[c][f];n[u]=h[0],n[u+1]=h[1],n[u+2]=h[2],n[u+3]=h[3]}return r}(t,e),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,t,e),o.drawImage(r,0,0,t,e),o.globalCompositeOperation="source-over",n)}function j(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.fadeData,r=e.backgroundInfo,n=e.toBeList,i=r.width,o=r.height,a=(0,y.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});F.build(),n.push({resource:U(i,o),width:i,height:o,kind:"default",tag:a}),t&&e.run()}function C(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,a.isNull)(t))return Reflect.apply(j,this,[]);var n=t.originStyle;if(s(n.backgroundColor)&&(!(0,a.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(j,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,a.isNull)(o))return Reflect.apply(j,this,[]);var l=e.backgroundInfo,u=l.width,c=l.height;i.width=u,i.height=c,o.clearRect(0,0,u,c);var f=(0,a.isArray)(r.imgUrl)&&1===r.imgUrl.length&&r.imgUrl[0]||n.backgroundColor;o.beginPath(),o.fillStyle=f,o.fillRect(0,0,u,c),o.fill(),e.isTransitioning?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var h={resource:i,kind:"background-color",tag:f,width:u,height:c};e.toBeList.push(h),e.run()}function N(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,a.isNull)(e))return Reflect.apply(C,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,a.isArray)(r.imgUrl))return Reflect.apply(C,this,[]);var i=(0,a.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||n.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map((function(t){return(t=t.trim()).endsWith(")")||(t+=")"),t})).filter((function(t){return t.startsWith("rgb")||t.startsWith("#")}));if(i.length<2)return Reflect.apply(C,this,[]);var o=document.createElement("canvas"),l=o.getContext("2d");if((0,a.isNull)(l))return Reflect.apply(C,this,[]);var u=t.backgroundInfo,s=u.width,c=u.height;o.width=s,o.height=c,l.fillStyle="#fff",l.fillRect(0,0,s,c);var f=l.createLinearGradient(0,0,0,c);i.forEach((function(t,e){return f.addColorStop(e/(i.length-1),t)})),l.fillStyle=f,l.fillRect(0,0,s,c),t.isTransitioning?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:s,height:c}),t.run()}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function B(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,a.isNull)(e))Reflect.apply(N,this,[]);else{var i,o,l=e.lastUseStyle,u=n.backgroundInfo,s=u.width,c=u.height,f=(0,a.isString)(r.imgUrl)&&r.imgUrl||(i=l.backgroundImage,o=/url\(["']?([^"']*)["']?\)/.exec(i),(0,a.isNull)(o)?null:o[1]);if(e.imageSource=f,f){var h=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(f,s,c);h.onload=function(){var t;clearTimeout(n.transparentId),n.isTransitioning?n.toBeList=[n.toBeList[0]].concat(function(t){if(Array.isArray(t))return L(t)}(t=n.toBeList.slice(1).filter((function(t){return"image"===t.kind&&(Math.abs(t.width-s)>2||Math.abs(t.height-c)>2||t.tag!==f)})))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return L(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):n.toBeList=[],n.toBeList.push({resource:h,width:s,height:c,kind:"image",tag:f}),n.run()},h.onerror=function(){Reflect.apply(N,t,[])},h.crossOrigin=r.crossOrigin}else Reflect.apply(N,this,[])}}function M(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement;e&&[["background-image","none"],["background-color","transparent"]].forEach((function(t){return e.style.setProperty(t[0],t[1],"important")}))}}function X(t){var e=window.getComputedStyle(t),r=t.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:e.backgroundColor,backgroundImage:e.backgroundImage,backgroundSize:e.backgroundSize,backgroundPosition:e.backgroundPosition,backgroundRepeat:e.backgroundRepeat,backgroundClip:e.backgroundClip,backgroundOrigin:e.backgroundOrigin,backgroundAttachment:e.backgroundAttachment,position:e.position,width:parseInt(e.width),height:parseInt(e.height)}}function W(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function G(t){return G="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},G(t)}function z(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,q(n.key),n)}}function H(t,e,r){return(e=q(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function q(t){var e=function(t){if("object"!=G(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==G(e)?e:e+""}var Y=function(){return t=function t(e,r,n){var i,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),H(this,"quad",null),H(this,"lastRaindropsFallTime",0),H(this,"parentElement",void 0),H(this,"mutationObserver",void 0),H(this,"resizeObserver",void 0),H(this,"renderProgram",void 0),H(this,"imageSource",""),H(this,"dropProgram",void 0),H(this,"updateProgram",void 0),H(this,"textures",[]),H(this,"backgroundTexture",[]),H(this,"textureDelta",void 0),H(this,"framebuffers",[]),H(this,"bufferWriteIndex",0),H(this,"bufferReadIndex",1),H(this,"originStyle",void 0),H(this,"lastUseStyle",void 0),H(this,"events",{}),H(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(M,n,[]),this.originStyle=this.lastUseStyle=X(this.parentElement),this.mutationObserver=new MutationObserver((function(t){t.forEach((function(t){if(t.target===o.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(o.lastUseStyle),i=X(o.parentElement),l=Object.values(i);if((0,a.isEmptyArray)(y.enArr.difference(e,l)))return;var u=c(i.backgroundImage),f=s(i.backgroundColor);if(u&&f)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(M,n,[])}}))})),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver((function(t){t.forEach((function(t){if(t.target===o.parentElement){var e=X(o.parentElement);Math.abs(e.width-o.originStyle.width)<3&&Math.abs(e.height-o.originStyle.height)<3||Reflect.apply(r,n,[])}}))})),this.resizeObserver.observe(this.parentElement)},e=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(W,{renderData:this},[]),this.parentElement&&this.events){var t,e,r,n=this.parentElement,i=this.events;Object.keys(i).forEach((function(t){return n.removeEventListener&&n.removeEventListener(t,i[t])})),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(t=this.mutationObserver)||void 0===t||t.takeRecords(),null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=null,null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}}}],e&&z(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function $(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r,n,i,o=t.parentElement,l=window.getComputedStyle(o),u=l.backgroundSize,s=l.backgroundAttachment,c=l.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):K(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],h={left:0,top:0,width:0,height:0};"fixed"===s?(h.height=window.innerHeight,h.left=window.screenX,h.top=window.screenY,h.width=window.innerWidth):(h.left=0,h.top=0,h.width=o.scrollWidth,h.height=o.scrollHeight);var p=e.backgroundInfo||{width:100,height:100},d=p.width,g=p.height;if("cover"===u){var m=Math.max(h.width/d,h.height/g);n=d*m,i=g*m}else if("contain"===u){var v=Math.min(h.width/d,h.height/g);n=d*v,i=g*v}else{var y=u.split(" ");n=y[0]||"",i=y[1]||n,K(n)?n=h.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),K(i)?i=h.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=g):("auto"===n&&(n=d*(Number(i)/g)),"auto"===i&&(i=g*(Number(n)/d)))}var b=f&&f[0]||"0%",E=f&&f[1]||"0%";b=K(b)?(h.left+(h.width-Number(n))*parseFloat(b)/100).toString():(h.left+parseFloat(b)).toString(),E=K(E)?(h.top+(h.height-Number(i))*parseFloat(E)/100).toString():(h.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([(o.offsetLeft-Number(b))/n,(o.offsetTop-Number(E))/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var w=Math.max(this.canvas.width,this.canvas.height);t.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/w,this.canvas.height/w])}}function K(t){return t.endsWith("%")}function V(){var t=this.gl,e=this.renderData;(0,a.isNull)(e)||(t.bindBuffer(t.ARRAY_BUFFER,e.quad),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLE_FAN,0,4))}function Z(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.textures,i=e.backgroundTexture,o=r.perturbance;t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.canvas.width,this.canvas.height),t.enable(t.BLEND),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),t.useProgram(e.renderProgram.id),Reflect.apply(u,this,[i,0]),Reflect.apply(u,this,[n[0],1]),t.uniform1f(e.renderProgram.locations.perturbance,o),t.uniform2fv(e.renderProgram.locations.topLeft,e.renderProgram.uniforms.topLeft),t.uniform2fv(e.renderProgram.locations.bottomRight,e.renderProgram.uniforms.bottomRight),t.uniform2fv(e.renderProgram.locations.containerRatio,e.renderProgram.uniforms.containerRatio),t.uniform1i(e.renderProgram.locations.samplerBackground,0),t.uniform1i(e.renderProgram.locations.samplerRipples,1),Reflect.apply(V,this,[]),t.disable(t.BLEND)}}function J(){var t=this.renderData;if(!(0,a.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function Q(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,l=e.bufferWriteIndex,s=e.bufferReadIndex,c=r.resolution;t.viewport(0,0,c,c),t.bindFramebuffer(t.FRAMEBUFFER,o[l]),Reflect.apply(u,this,[i[s]]),t.useProgram(n.id),Reflect.apply(V,this,[]),Reflect.apply(J,this,[])}}function tt(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)){var i=e.parentElement,o=n.isTransitioning,l=r.running,u=r.idleFluctuations,s=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply($,this,[]),l?(s||(r.lastRunningState=!0,this.show()),u&&this.raindropsFall(),o&&this.fade(),Reflect.apply(Q,this,[]),Reflect.apply(Z,this,[])):s&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(tt,t,[])}))}}function et(t,e,r){var n=this.renderData;if(!(0,a.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),l=parseInt(o.borderLeftWidth)||0,u=parseInt(o.borderTopWidth)||0,s=i.getBoundingClientRect(),c=t.clientX-s.left-l,f=t.clientY-s.top-u;this.drop(c,f,e,r)}}function rt(){var t=this,e=this.renderData,r=this.options;if(!(0,a.isNull)(e)){var n=e.parentElement,i=e.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(e.lastRaindropsFallTime=Date.now(),Reflect.apply(et,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)o(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)o(e[r])},i.mousedown=function(t){return o(t,!0)},Object.keys(i).forEach((function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})}))}}var nt="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function it(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.textureDelta;e.dropProgram=l(nt,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",t);var n=e.updateProgram=l(nt,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);t.uniform2fv(n.locations.delta,r),e.renderProgram=l("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function ot(){var t=this.gl,e=this.renderData;if(!(0,a.isNull)(e)){var r=e.backgroundTexture=t.createTexture();t.bindTexture(t.TEXTURE_2D,r),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)}}function at(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,a.isNull)(r)){var i=r.backgroundTexture,o=n.backgroundInfo,l=o.width,u=o.height,s=function(t){return(0,a.isZero)(t&t-1)},c=s(l)&&s(u)?e.REPEAT:e.CLAMP_TO_EDGE;e.bindTexture(e.TEXTURE_2D,i),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,c),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,c),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.resource)}}function lt(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,l=r.resolution,u=this.gl,s=1/l;e.textureDelta=new Float32Array([s,s]),this.config.extensions.forEach((function(t){return u.getExtension(t)}));for(var c=this.config.arrayType,f=c?new c(l*l*4):null,h=this.config,p=0;p<2;p++){var d=u.createTexture(),g=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,g),u.bindTexture(u.TEXTURE_2D,d),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,h.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,h.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,u.RGBA,l,l,0,u.RGBA,h.type,f),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,d,0),i.push(d),o.push(g)}e.quad=u.createBuffer(),u.bindBuffer(u.ARRAY_BUFFER,e.quad),u.bufferData(u.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),u.STATIC_DRAW),Reflect.apply(it,this,[]),Reflect.apply(ot,this,[]),Reflect.apply(B,this,[]),u.clearColor(0,0,0,0),u.blendFunc(u.SRC_ALPHA,u.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(rt,this,[]),Reflect.apply(at,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(tt,t,[])}))}}function ut(){var t=this.renderData,e=this.fadeData;if(!(0,a.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(B,this,[])}}function st(){var t=this.renderData,e=this.fadeData;(0,a.isNull)(t)||(t.destroy(),Object.keys(t).forEach((function(e){return t[e]=null})),this.renderData=null),e.destroy(),Object.keys(e).forEach((function(t){return e[t]=null})),this.fadeData=null,this.gl&&(this.gl=null)}function ct(t,e,r,n){var i=this.renderData,o=this.options,l=this.gl;if(!(0,a.isNull)(i)){var s=i.parentElement,c=i.dropProgram,f=i.textures,h=i.framebuffers,p=i.bufferWriteIndex,d=i.bufferReadIndex,g=o.resolution,m=s.offsetWidth,v=s.offsetHeight,y=Math.max(m,v);r/=y;var b=new Float32Array([(2*t-m)/y,(v-2*e)/y]);l.viewport(0,0,g,g),l.bindFramebuffer(l.FRAMEBUFFER,h[p]),Reflect.apply(u,this,[f[d]]),l.useProgram(c.id),l.uniform2fv(c.locations.center,b),l.uniform1f(c.locations.radius,r),l.uniform1f(c.locations.strength,n),Reflect.apply(V,this,[]),Reflect.apply(J,this,[])}}function ft(t){return ft="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},ft(t)}function ht(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,dt(n.key),n)}}function pt(t,e,r){return(e=dt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dt(t){var e=function(t){if("object"!=ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ft(e)?e:e+""}function gt(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}function mt(t,e){return t.get(yt(t,e))}function vt(t,e,r){return t.set(yt(t,e),r),r}function yt(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}var bt=new WeakMap,Et=new WeakMap,wt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,St=new WeakMap,Pt=new WeakMap,xt=function(){return t=function t(e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),gt(this,bt,E.accelerating),gt(this,Et,E.interactive),gt(this,wt,E.resolution),gt(this,Rt,E.perturbance),gt(this,Tt,E.dropRadius),pt(this,"imgUrl",E.imgUrl),gt(this,St,E.idleFluctuations),gt(this,Pt,E.raindropsTimeInterval),pt(this,"crossOrigin","no-cors"),pt(this,"visible",!1),pt(this,"running",!1),pt(this,"lastRunningState",!1),this.perturbance=e.perturbance,this.resolution=e.resolution,this.raindropsTimeInterval=e.raindropsTimeInterval,this.accelerating=e.accelerating,this.interactive=e.interactive,this.dropRadius=e.dropRadius,this.imgUrl=e.imgUrl,this.idleFluctuations=e.idleFluctuations,this.running=Boolean(null===(r=e.playingState)||void 0===r||r),this.crossOrigin=e.crossOrigin},(e=[{key:"accelerating",get:function(){return mt(bt,this)},set:function(t){t>100||t<2||vt(bt,this,t)}},{key:"interactive",get:function(){return mt(Et,this)},set:function(t){(0,a.isBoolean)(t)&&vt(Et,this,t)}},{key:"resolution",get:function(){return mt(wt,this)},set:function(t){t<100||t>550||vt(wt,this,t)}},{key:"perturbance",get:function(){return mt(Rt,this)},set:function(t){t<1e-4||t>1||vt(Rt,this,t)}},{key:"dropRadius",get:function(){return mt(Tt,this)},set:function(t){!isFinite(t)||t<10||vt(Tt,this,t)}},{key:"idleFluctuations",get:function(){return mt(St,this)},set:function(t){(0,a.isBoolean)(t)&&vt(St,this,t)}},{key:"raindropsTimeInterval",get:function(){return mt(Pt,this)},set:function(t){t<10||t>12e3||vt(Pt,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}}])&&ht(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function kt(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(kt,t,[]);"image"!==r.lastDrawImage.kind&&r.run()}),2*e.raindropsTimeInterval)}function _t(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,a.isNull)(t))return e.isTransitioning=!1,void Reflect.apply(kt,this,[]);if((0,a.isEmptyArray)(n))return e.isTransitioning=!1,void Reflect.apply(kt,this,[]);if(0===e.drawProgress&&n.forEach((function(t){})),e.drawProgress>1e3)if(e.isTransitioning=!1,e.lastDrawImage=n.shift(),Reflect.apply(at,this,[e.lastDrawImage]),(0,a.isEmptyArray)(n)){var i=t.lastUseStyle;(0,a.isNull)(r.imgUrl)&&s(i.backgroundColor)&&c(i.backgroundImage)&&(Reflect.apply(j,this,[!1]),Reflect.apply(kt,this,[]))}else Reflect.apply(kt,this,[]);else{var o=e.lastDrawImage,l=e.backgroundInfo;e.drawProgress+=18;var u=document.createElement("canvas"),f=u.getContext("2d");if(!((0,a.isNull)(f)||(0,a.isNull)(o.resource)||(0,a.isEmptyArray)(n))){var h=l.width,p=l.height;u.width=h,u.height=p,f.clearRect(0,0,h,p),f.drawImage(o.resource,0,0,h,p),f.globalAlpha=e.drawProgress/1e3,f.drawImage(n[0].resource,0,0,h,p),f.globalAlpha=1;var d={resource:u,width:h,height:p,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(at,this,[d]),n.length>1&&(e.lastDrawImage=d,n.shift(),e.drawProgress=0)}}}function Dt(t){return Dt="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},Dt(t)}function Ot(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,At(n.key),n)}}function It(t,e,r){return(e=At(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function At(t){var e=function(t){if("object"!=Dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dt(e)?e:e+""}var Ft=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),It(this,"backgroundInfo",{width:0,height:0}),It(this,"transparentId",setTimeout(Boolean)),It(this,"lastDrawImage",void 0),It(this,"toBeList",[]),It(this,"drawProgress",0),It(this,"isTransitioning",!1);var r,n,i=e.renderData;if((0,a.isNull)(i))r=10,n=10;else{var o=getComputedStyle(i.parentElement);r=parseInt(o.width),n=parseInt(o.height)}this.backgroundInfo={width:r,height:n},this.lastDrawImage={resource:U(r,n),width:r,height:n,kind:"default",tag:""}},(e=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){this.transparentId&&clearTimeout(this.transparentId)}}])&&Ot(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Ut(t){return Ut="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},Ut(t)}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach((function(e){Xt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wt(n.key),n)}}function Lt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lt=function(){return!!t})()}function Bt(t){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bt(t)}function Mt(t,e){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mt(t,e)}function Xt(t,e,r){return(e=Wt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wt(t){var e=function(t){if("object"!=Ut(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ut(e)?e:e+""}var Gt=new WeakMap,zt=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Xt(n=function(t,e,r){return e=Bt(e),function(t,e){if(e&&("object"==Ut(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Lt()?Reflect.construct(e,r||[],Bt(t).constructor):e.apply(t,r))}(this,e,[t]),"renderData",null),Xt(n,"options",void 0),Xt(n,"fadeData",void 0),Xt(n,"defaults",E),Xt(n,"initialized",!1),function(t,e,r){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,r)}(n,Gt,(0,y.debounce)(ut,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new xt(Ct(Ct({},n.defaults),r)),n.renderData=new Y(t,n.reloadBackground,n),n.fadeData=new Ft(n),(0,a.isFalse)(n.initState)||(0,a.isNull)(t.parentElement)||(0,a.isNull)(n.config)||(0,a.isNull)(n.gl)?n.initState=!1:(function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,(0,o.setStyle)(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(lt,n,[])),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)}(e,t),r=e,(n=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,a.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,l=e.dropRadius,u=Date.now();if(!(u-i<o)){t.lastRaindropsFallTime=u;var s=function(t){return(0,y.getRandomInt)(t)},c=n.width,f=n.height;this.drop(s(c),s(f),l,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(ct,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(_t,this,[])}},{key:"reloadBackground",value:function(){var t,e;(t=Gt,e=this,t.get(function(t,e,r){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}(t,e))).call(this)}},{key:"destroy",value:function(){Reflect.apply(st,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(M,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(W,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(B,this,[])):this.options[t]=e}}])&&Nt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(v);function Ht(t,e){var r=(0,i.useRef)(null);return(0,i.useEffect)((function(){if(!(0,a.isNull)(t.current))return r.current=new zt(t.current,e&&e.option),function(){var t,e;return null!==(t=null===(e=r.current)||void 0===e?void 0:e.destroy())&&void 0!==t?t:void 0}}),[]),r}module.exports.earthnut=n})();
|