earthnut 0.0.0 → 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 -0
- package/BackgroundRipple/index.mjs +1 -0
- package/LICENSE +25 -0
- package/Layout/index.cjs +1 -0
- package/Layout/index.mjs +1 -0
- package/README.md +24 -5
- package/components/button/button.d.ts +5 -0
- package/components/button/index.d.ts +3 -0
- package/components/button/style/index.d.ts +1 -0
- package/components/index.d.ts +3 -0
- package/components/layout/content.d.ts +11 -0
- package/components/layout/footer.d.ts +16 -0
- package/components/layout/header.d.ts +18 -0
- package/components/layout/index.d.ts +2 -0
- package/components/layout/layout.d.ts +50 -0
- package/components/layout/sideBar.d.ts +24 -0
- package/components/layout/types.d.ts +71 -0
- package/components/menu/index.d.ts +0 -0
- package/components/menu/menu.d.ts +0 -0
- package/components/menu/style/index.d.ts +0 -0
- package/components/ripples/RipplesEle.d.ts +36 -0
- package/components/ripples/index.d.ts +4 -0
- package/components/ripples/style/index.d.ts +0 -0
- package/components/ripples/types.d.ts +11 -0
- package/components/ripples/useOptionUpdate.d.ts +5 -0
- package/customHooks/index.d.ts +5 -0
- package/customHooks/useAnimationFrame.d.ts +42 -0
- package/customHooks/useInputIsComposing.d.ts +46 -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/_createImageData.d.ts +7 -0
- package/customHooks/useRipples/buildBackground/default-background/circleDataList.d.ts +18 -0
- package/customHooks/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +2 -0
- package/customHooks/useRipples/buildBackground/default-background/createDefault.d.ts +2 -0
- package/customHooks/useRipples/buildBackground/default-background/index.d.ts +10 -0
- package/customHooks/useRipples/buildBackground/loadImage.d.ts +13 -0
- package/customHooks/useRipples/buildBackground/runSide.d.ts +9 -0
- package/customHooks/useRipples/buildBackground/type.d.ts +31 -0
- package/customHooks/useRipples/buildBackground/utils/bindImage.d.ts +4 -0
- package/customHooks/useRipples/buildBackground/utils/createCanvasElement.d.ts +3 -0
- package/customHooks/useRipples/buildBackground/utils/createImageBySrc.d.ts +2 -0
- package/customHooks/useRipples/buildBackground/utils/getBackgroundStyle.d.ts +3 -0
- package/customHooks/useRipples/buildBackground/utils/hideCssBackground.d.ts +10 -0
- package/customHooks/useRipples/buildBackground/utils/restore-css-background.d.ts +7 -0
- package/customHooks/useRipples/callback/destroy.d.ts +3 -0
- package/customHooks/useRipples/callback/drop.d.ts +3 -0
- package/customHooks/useRipples/callback/fade.d.ts +3 -0
- package/customHooks/useRipples/callback/reload-background.d.ts +6 -0
- package/customHooks/useRipples/callback/scale.d.ts +2 -0
- package/customHooks/useRipples/index.d.ts +40 -0
- package/customHooks/useRipples/init/index.d.ts +5 -0
- package/customHooks/useRipples/init/initEvent.d.ts +5 -0
- package/customHooks/useRipples/init/initShaders.d.ts +7 -0
- package/customHooks/useRipples/init/initTexture.d.ts +7 -0
- package/customHooks/useRipples/render/computeTextureBoundaries.d.ts +3 -0
- package/customHooks/useRipples/render/draw.d.ts +7 -0
- package/customHooks/useRipples/render/drawQuad.d.ts +7 -0
- package/customHooks/useRipples/render/dropAtPointer.d.ts +7 -0
- package/customHooks/useRipples/render/index.d.ts +6 -0
- package/customHooks/useRipples/render/swapBufferIndices.d.ts +5 -0
- package/customHooks/useRipples/render/update.d.ts +5 -0
- package/customHooks/useRipples/rippersData/defaultData.d.ts +5 -0
- package/customHooks/useRipples/rippersData/fadeData.d.ts +43 -0
- package/customHooks/useRipples/rippersData/index.d.ts +40 -0
- package/customHooks/useRipples/rippersData/loadConfig.d.ts +19 -0
- package/customHooks/useRipples/rippersData/renderData.d.ts +74 -0
- package/customHooks/useRipples/rippersData/useOptions.d.ts +81 -0
- package/customHooks/useRipples/rippersData/vertexSource.d.ts +28 -0
- package/customHooks/useRipples/ripple.html.d.ts +6 -0
- package/customHooks/useRipples/ripplesClass.d.ts +51 -0
- package/customHooks/useRipples/tools.d.ts +31 -0
- package/customHooks/useRipples/types.d.ts +192 -0
- package/customHooks/useTimeId.d.ts +55 -0
- package/dog.d.ts +3 -0
- package/index.cjs +1 -0
- package/index.d.ts +5 -0
- package/index.js.LICENSE.txt +79 -0
- package/index.mjs +1 -0
- package/package.json +86 -14
- package/styles/common.css +360 -0
- package/styles/common.scss +444 -0
- package/useAnimationFrame/index.cjs +1 -0
- package/useAnimationFrame/index.mjs +1 -0
- package/useInputIsComposing/index.cjs +1 -0
- package/useInputIsComposing/index.mjs +1 -0
- package/useRipples/index.cjs +1 -0
- package/useRipples/index.mjs +1 -0
- package/useTimeId/index.cjs +1 -0
- package/useTimeId/index.mjs +1 -0
- package/index.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t={56:(t,e,r)=>{t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},72:t=>{var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var o={},a=[],u=0;u<t.length;u++){var l=t[u],s=n.base?l[0]+n.base:l[0],c=o[s]||0,f="".concat(s," ").concat(c);o[s]=c+1;var p=r(f),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)e[p].references++,e[p].updater(d);else{var h=i(d,n);n.byIndex=u,e.splice(u,0,{identifier:f,updater:h,references:1})}a.push(f)}return a}function i(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var o=n(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var u=r(o[a]);e[u].references--}for(var l=n(t,i),s=0;s<o.length;s++){var c=r(o[s]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=l}}},109:(t,e,r)=>{r.d(e,{A:()=>u});var n=r(601),i=r.n(n),o=r(314),a=r.n(o)()(i());a.push([t.id,".en-ripple-container{width:100%;height:100%;position:relative;top:0px;left:0px;z-index:1}",""]);const u=a},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},308:(t,e,r)=>{r.d(e,{useRipples:()=>Gt});var n=r(953);const i=require("a-element-inline-style");var o=r(570);function a(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 a,u={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(u.id,i(r.VERTEX_SHADER,t)),r.attachShader(u.id,i(r.FRAGMENT_SHADER,e)),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=t+e,s=/uniform (\w+) (\w+)/g;!(0,o.isNull)(a=s.exec(l));){var c=a[2];u.locations[c]=r.getUniformLocation(u.id,c)}return u}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 l(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function s(t){return"none"===t||""===t}function c(){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(),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(t){return f="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},f(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,v(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 h(t,e,r){return(e=v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t){var e=function(t){if("object"!=f(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:e+""}var g=d((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),h(this,"canvas",void 0),h(this,"gl",void 0),h(this,"config",void 0),h(this,"initState",!0),this.canvas=e;var r=e.getContext("webgl");if((0,o.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(c,this,[])}));const m=require("a-js-tools");var y,b={imgUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function w(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,R(n.key),n)}}function R(t){var e=function(t){if("object"!=E(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==E(e)?e:e+""}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function S(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,P(n.key),n)}}function P(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}function x(t,e,r){return t.set(k(t,e),r),r}function O(t,e){return t.get(k(t,e))}function k(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 _(t){return function(t){if(Array.isArray(t))return D(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 D(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)?D(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 D(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(b),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(){}}])&&w(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 u=0;u<=i;u++)for(var l=u;l<=i;l++){var s=n[u][l],c=function(){return(0,m.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,m.getRandomInt)(120,180):(0,m.getRandomInt)(160,240)}for(var f=0;f<=i;f++)for(var p=0;p<=f;p++)n[f][p]=n[p][f];for(var d=i;d<r;d++)for(var h=0;h<=i;h++)n[d][h]=n[r-d][h];for(var v=0;v<i;v++)for(var g=i;g<r;g++)n[v][g]=n[v][r-g];for(var y=i;y<r;y++)for(var b=i;b<r;b++)n[y][b]=n[y][r-b];var E=t%r;return e.list=[].concat(_(n.slice(E)),_(n.slice(0,E))),e},I=new(y=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,y,1),e=this,r="data",n=A(),(r=P(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(){O(y,this)>100&&x(y,this,0),this.data=A(x(y,this,O(y,this)+3))}}])&&S(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function j(t,e){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),a=n.getContext("2d");return(0,o.isNull)(i)||(0,o.isNull)(a)?r:(r.width=n.width=t,r.height=n.height=e,i.clearRect(0,0,t,e),a.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=I.data,o=i.diameter,a=i.list,u=t*o,l=0;l<n.length;l+=4){var s=l/4%u,c=s%t%o,f=Math.floor(s/t),p=a[c][f];n[l]=p[0],n[l+1]=p[1],n[l+2]=p[2],n[l+3]=p[3]}return r}(t,e),0,0),a.fillStyle="#ffffff",a.fillRect(0,0,t,e),a.drawImage(r,0,0,t,e),a.globalCompositeOperation="source-over",n)}function F(){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,m.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});I.build(),n.push({resource:j(i,o),width:i,height:o,kind:"default",tag:a}),t&&e.run()}function U(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,o.isNull)(t))return Reflect.apply(F,this,[]);var n=t.originStyle;if(l(n.backgroundColor)&&(!(0,o.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(F,this,[]);var i=document.createElement("canvas"),a=i.getContext("2d");if((0,o.isNull)(a))return Reflect.apply(F,this,[]);var u=e.backgroundInfo,s=u.width,c=u.height;i.width=s,i.height=c,a.clearRect(0,0,s,c);var f=(0,o.isArray)(r.imgUrl)&&1===r.imgUrl.length&&r.imgUrl[0]||n.backgroundColor;a.beginPath(),a.fillStyle=f,a.fillRect(0,0,s,c),a.fill(),e.isTransitioning?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var p={resource:i,kind:"background-color",tag:f,width:s,height:c};e.toBeList.push(p),e.run()}function C(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,o.isNull)(e))return Reflect.apply(U,this,[]);var n=e.originStyle;if(!/linear-gradient\(.*\)/.test(n.backgroundImage)&&!(0,o.isArray)(r.imgUrl))return Reflect.apply(U,this,[]);var i=(0,o.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(U,this,[]);var a=document.createElement("canvas"),u=a.getContext("2d");if((0,o.isNull)(u))return Reflect.apply(U,this,[]);var l=t.backgroundInfo,s=l.width,c=l.height;a.width=s,a.height=c,u.fillStyle="#fff",u.fillRect(0,0,s,c);var f=u.createLinearGradient(0,0,0,c);i.forEach((function(t,e){return f.addColorStop(e/(i.length-1),t)})),u.fillStyle=f,u.fillRect(0,0,s,c),t.isTransitioning?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:a,kind:"linear-gradient",tag:i.join("_"),width:s,height:c}),t.run()}function N(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 L(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,o.isNull)(e))Reflect.apply(C,this,[]);else{var i,a,u=e.lastUseStyle,l=n.backgroundInfo,s=l.width,c=l.height,f=(0,o.isString)(r.imgUrl)&&r.imgUrl||(i=u.backgroundImage,a=/url\(["']?([^"']*)["']?\)/.exec(i),(0,o.isNull)(a)?null:a[1]);if(e.imageSource=f,f){var p=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(f,s,c);p.onload=function(){var t;clearTimeout(n.transparentId),n.isTransitioning?n.toBeList=[n.toBeList[0]].concat(function(t){if(Array.isArray(t))return N(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 N(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)?N(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:p,width:s,height:c,kind:"image",tag:f}),n.run()},p.onerror=function(){Reflect.apply(C,t,[])},p.crossOrigin=r.crossOrigin}else Reflect.apply(C,this,[])}}function B(){var t=this.renderData;if(!(0,o.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 M(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 X(){var t=this.renderData;if(!(0,o.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}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 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,H(n.key),n)}}function G(t,e,r){return(e=H(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function H(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+""}var q=function(){return t=function t(e,r,n){var i,a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),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=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(B,n,[]),this.originStyle=this.lastUseStyle=M(this.parentElement),this.mutationObserver=new MutationObserver((function(t){t.forEach((function(t){if(t.target===a.parentElement&&"attributes"===t.type&&n.options.visible){var e=Object.values(a.lastUseStyle),i=M(a.parentElement),u=Object.values(i);if((0,o.isEmptyArray)(m.enArr.difference(e,u)))return;var c=s(i.backgroundImage),f=l(i.backgroundColor);if(c&&f)return;a.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(B,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===a.parentElement){var e=M(a.parentElement);Math.abs(e.width-a.originStyle.width)<3&&Math.abs(e.height-a.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(X,{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 Y(){var t=this.renderData,e=this.fadeData;if(!(0,o.isNull)(t)){var r,n,i,a=t.parentElement,u=window.getComputedStyle(a),l=u.backgroundSize,s=u.backgroundAttachment,c=u.backgroundPosition,f=/\s+/.test(r=c)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):$(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=a.scrollWidth,p.height=a.scrollHeight);var d=e.backgroundInfo||{width:100,height:100},h=d.width,v=d.height;if("cover"===l){var g=Math.max(p.width/h,p.height/v);n=h*g,i=v*g}else if("contain"===l){var m=Math.min(p.width/h,p.height/v);n=h*m,i=v*m}else{var y=l.split(" ");n=y[0]||"",i=y[1]||n,$(n)?n=p.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),$(i)?i=p.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=h,i=v):("auto"===n&&(n=h*(Number(i)/v)),"auto"===i&&(i=v*(Number(n)/h)))}var b=f&&f[0]||"0%",E=f&&f[1]||"0%";b=$(b)?(p.left+(p.width-Number(n))*parseFloat(b)/100).toString():(p.left+parseFloat(b)).toString(),E=$(E)?(p.top+(p.height-Number(i))*parseFloat(E)/100).toString():(p.top+parseFloat(E)).toString(),t.renderProgram.uniforms.topLeft=new Float32Array([(a.offsetLeft-Number(b))/n,(a.offsetTop-Number(E))/i]),t.renderProgram.uniforms.bottomRight=new Float32Array([t.renderProgram.uniforms.topLeft[0]+a.clientWidth/n,t.renderProgram.uniforms.topLeft[1]+a.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 $(t){return t.endsWith("%")}function K(){var t=this.gl,e=this.renderData;(0,o.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 V(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,o.isNull)(e)){var n=e.textures,i=e.backgroundTexture,a=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,a),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(K,this,[]),t.disable(t.BLEND)}}function J(){var t=this.renderData;if(!(0,o.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function Z(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,o.isNull)(e)){var n=e.updateProgram,i=e.textures,a=e.framebuffers,l=e.bufferWriteIndex,s=e.bufferReadIndex,c=r.resolution;t.viewport(0,0,c,c),t.bindFramebuffer(t.FRAMEBUFFER,a[l]),Reflect.apply(u,this,[i[s]]),t.useProgram(n.id),Reflect.apply(K,this,[]),Reflect.apply(J,this,[])}}function Q(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,o.isNull)(e)){var i=e.parentElement,a=n.isTransitioning,u=r.running,l=r.idleFluctuations,s=r.lastRunningState,c=getComputedStyle(i);n.backgroundInfo={width:parseInt(c.width),height:parseInt(c.height)},Reflect.apply(Y,this,[]),u?(s||(r.lastRunningState=!0,this.show()),l&&this.raindropsFall(),a&&this.fade(),Reflect.apply(Z,this,[]),Reflect.apply(V,this,[])):s&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(Q,t,[])}))}}function tt(t,e,r){var n=this.renderData;if(!(0,o.isNull)(n)){var i=n.parentElement,a=window.getComputedStyle(i),u=parseInt(a.borderLeftWidth)||0,l=parseInt(a.borderTopWidth)||0,s=i.getBoundingClientRect(),c=t.clientX-s.left-u,f=t.clientY-s.top-l;this.drop(c,f,e,r)}}function et(){var t=this,e=this.renderData,r=this.options;if(!(0,o.isNull)(e)){var n=e.parentElement,i=e.events,a=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(tt,t,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(t){for(var e=r.accelerating;e--;)a(t)},i.touchmove=i.touchstart=function(t){for(var e=t.touches,r=0;r<e.length;r++)a(e[r])},i.mousedown=function(t){return a(t,!0)},Object.keys(i).forEach((function(t){return null==n?void 0:n.addEventListener(t,i[t],{passive:!0})}))}}var rt="\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 nt(){var t=this.gl,e=this.renderData;if(!(0,o.isNull)(e)){var r=e.textureDelta;e.dropProgram=a(rt,"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=a(rt,"\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=a("\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 it(){var t=this.gl,e=this.renderData;if(!(0,o.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 ot(t){var e=this.gl,r=this.renderData,n=this.fadeData;if(!(0,o.isNull)(r)){var i=r.backgroundTexture,a=n.backgroundInfo,u=a.width,l=a.height,s=function(t){return(0,o.isZero)(t&t-1)},c=s(u)&&s(l)?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 at(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,o.isNull)(e)&&this.config){var i=e.textures,a=e.framebuffers,u=r.resolution,l=this.gl,s=1/u;e.textureDelta=new Float32Array([s,s]),this.config.extensions.forEach((function(t){return l.getExtension(t)}));for(var c=this.config.arrayType,f=c?new c(u*u*4):null,p=this.config,d=0;d<2;d++){var h=l.createTexture(),v=l.createFramebuffer();l.bindFramebuffer(l.FRAMEBUFFER,v),l.bindTexture(l.TEXTURE_2D,h),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,f),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,h,0),i.push(h),a.push(v)}e.quad=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,e.quad),l.bufferData(l.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),l.STATIC_DRAW),Reflect.apply(nt,this,[]),Reflect.apply(it,this,[]),Reflect.apply(L,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(et,this,[]),Reflect.apply(ot,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(Q,t,[])}))}}function ut(){var t=this.renderData,e=this.fadeData;if(!(0,o.isNull)(t)){var r=t.parentElement,n=e.backgroundInfo,i=r.offsetWidth,a=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=a,Reflect.apply(L,this,[])}}function lt(){var t=this.renderData,e=this.fadeData;(0,o.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 st(t,e,r,n){var i=this.renderData,a=this.options,l=this.gl;if(!(0,o.isNull)(i)){var s=i.parentElement,c=i.dropProgram,f=i.textures,p=i.framebuffers,d=i.bufferWriteIndex,h=i.bufferReadIndex,v=a.resolution,g=s.offsetWidth,m=s.offsetHeight,y=Math.max(g,m);r/=y;var b=new Float32Array([(2*t-g)/y,(m-2*e)/y]);l.viewport(0,0,v,v),l.bindFramebuffer(l.FRAMEBUFFER,p[d]),Reflect.apply(u,this,[f[h]]),l.useProgram(c.id),l.uniform2fv(c.locations.center,b),l.uniform1f(c.locations.radius,r),l.uniform1f(c.locations.strength,n),Reflect.apply(K,this,[]),Reflect.apply(J,this,[])}}function ct(t){return ct="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},ct(t)}function ft(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"!=ct(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ct(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ct(e)?e:e+""}function ht(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 vt(t,e){return t.get(mt(t,e))}function gt(t,e,r){return t.set(mt(t,e),r),r}function mt(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 yt=new WeakMap,bt=new WeakMap,Et=new WeakMap,wt=new WeakMap,Rt=new WeakMap,Tt=new WeakMap,St=new WeakMap,Pt=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),ht(this,yt,b.accelerating),ht(this,bt,b.interactive),ht(this,Et,b.resolution),ht(this,wt,b.perturbance),ht(this,Rt,b.dropRadius),pt(this,"imgUrl",b.imgUrl),ht(this,Tt,b.idleFluctuations),ht(this,St,b.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 vt(yt,this)},set:function(t){t>100||t<2||gt(yt,this,t)}},{key:"interactive",get:function(){return vt(bt,this)},set:function(t){(0,o.isBoolean)(t)&>(bt,this,t)}},{key:"resolution",get:function(){return vt(Et,this)},set:function(t){t<100||t>550||gt(Et,this,t)}},{key:"perturbance",get:function(){return vt(wt,this)},set:function(t){t<1e-4||t>1||gt(wt,this,t)}},{key:"dropRadius",get:function(){return vt(Rt,this)},set:function(t){!isFinite(t)||t<10||gt(Rt,this,t)}},{key:"idleFluctuations",get:function(){return vt(Tt,this)},set:function(t){(0,o.isBoolean)(t)&>(Tt,this,t)}},{key:"raindropsTimeInterval",get:function(){return vt(St,this)},set:function(t){t<10||t>12e3||gt(St,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}}])&&ft(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function xt(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(xt,t,[]);"image"!==r.lastDrawImage.kind&&r.run()}),2*e.raindropsTimeInterval)}function Ot(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,o.isNull)(t))return e.isTransitioning=!1,void Reflect.apply(xt,this,[]);if((0,o.isEmptyArray)(n))return e.isTransitioning=!1,void Reflect.apply(xt,this,[]);if(0===e.drawProgress&&n.forEach((function(t){})),e.drawProgress>1e3)if(e.isTransitioning=!1,e.lastDrawImage=n.shift(),Reflect.apply(ot,this,[e.lastDrawImage]),(0,o.isEmptyArray)(n)){var i=t.lastUseStyle;(0,o.isNull)(r.imgUrl)&&l(i.backgroundColor)&&s(i.backgroundImage)&&(Reflect.apply(F,this,[!1]),Reflect.apply(xt,this,[]))}else Reflect.apply(xt,this,[]);else{var a=e.lastDrawImage,u=e.backgroundInfo;e.drawProgress+=18;var c=document.createElement("canvas"),f=c.getContext("2d");if(!((0,o.isNull)(f)||(0,o.isNull)(a.resource)||(0,o.isEmptyArray)(n))){var p=u.width,d=u.height;c.width=p,c.height=d,f.clearRect(0,0,p,d),f.drawImage(a.resource,0,0,p,d),f.globalAlpha=e.drawProgress/1e3,f.drawImage(n[0].resource,0,0,p,d),f.globalAlpha=1;var h={resource:c,width:p,height:d,kind:"mix",tag:"".concat(a.tag," >> ").concat(n[0].tag)};Reflect.apply(ot,this,[h]),n.length>1&&(e.lastDrawImage=h,n.shift(),e.drawProgress=0)}}}function kt(t){return kt="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},kt(t)}function _t(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 Dt(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"!=kt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kt(e)?e:e+""}var It=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),Dt(this,"backgroundInfo",{width:0,height:0}),Dt(this,"transparentId",setTimeout(Boolean)),Dt(this,"lastDrawImage",void 0),Dt(this,"toBeList",[]),Dt(this,"drawProgress",0),Dt(this,"isTransitioning",!1);var r,n,i=e.renderData;if((0,o.isNull)(i))r=10,n=10;else{var a=getComputedStyle(i.parentElement);r=parseInt(a.width),n=parseInt(a.height)}this.backgroundInfo={width:r,height:n},this.lastDrawImage={resource:j(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)}}])&&_t(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function jt(t){return jt="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},jt(t)}function Ft(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 Ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ft(Object(r),!0).forEach((function(e){Mt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ct(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,Xt(n.key),n)}}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nt=function(){return!!t})()}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function Bt(t,e){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bt(t,e)}function Mt(t,e,r){return(e=Xt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xt(t){var e=function(t){if("object"!=jt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jt(e)?e:e+""}var Wt=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),Mt(n=function(t,e,r){return e=Lt(e),function(t,e){if(e&&("object"==jt(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,Nt()?Reflect.construct(e,r||[],Lt(t).constructor):e.apply(t,r))}(this,e,[t]),"renderData",null),Mt(n,"options",void 0),Mt(n,"fadeData",void 0),Mt(n,"defaults",b),Mt(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,Wt,(0,m.debounce)(ut,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new Pt(Ut(Ut({},n.defaults),r)),n.renderData=new q(t,n.reloadBackground,n),n.fadeData=new It(n),(0,o.isFalse)(n.initState)||(0,o.isNull)(t.parentElement)||(0,o.isNull)(n.config)||(0,o.isNull)(n.gl)?n.initState=!1:(function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,(0,i.setStyle)(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(at,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&&Bt(t,e)}(e,t),r=e,n=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,o.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,a=e.raindropsTimeInterval,u=e.dropRadius,l=Date.now();if(!(l-i<a)){t.lastRaindropsFallTime=l;var s=function(t){return(0,m.getRandomInt)(t)},c=n.width,f=n.height;this.drop(s(c),s(f),u,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(st,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(Ot,this,[])}},{key:"reloadBackground",value:function(){var t,e;(t=Wt,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(lt,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(B,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(X,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(L,this,[])):this.options[t]=e}}],n&&Ct(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(g);function Gt(t,e){var r=(0,n.useRef)(null);return(0,n.useEffect)((function(){if(!(0,o.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}},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,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<t.length;s++){var c=[].concat(t[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)),e.push(c))}},e}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},570:t=>{t.exports=require("a-type-of-js")},601:t=>{t.exports=function(t){return t[1]}},659:t=>{var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);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)}},763:t=>{t.exports=require("xcn")},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,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))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},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]={id:n,exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},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})},r.nc=void 0;var n={};r.r(n),r.d(n,{BackgroundRipple:()=>k});var i=r(953),o=r.n(i),a=r(308),u=r(570),l=r(763),s=r(72),c=r.n(s),f=r(825),p=r.n(f),d=r(659),h=r.n(d),v=r(56),g=r.n(v),m=r(540),y=r.n(m),b=r(113),E=r.n(b),w=r(109),R={};function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}R.styleTagTransform=E(),R.setAttributes=g(),R.insert=h().bind(null,"head"),R.domAPI=p(),R.insertStyleElement=y(),c()(w.A,R),w.A&&w.A.locals&&w.A.locals;var S=["children","style"];function P(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 x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?P(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function O(t,e,r){return(e=function(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var k=(0,i.forwardRef)((function(t,e){var r=t.children,n=t.style,s=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,S),c=(0,i.useRef)(null),f=(0,a.useRipples)(c,s);return function(t,e){(0,i.useEffect)((function(){if(e.option&&t.current){var r=e.option;Object.keys(t.current.defaults).forEach((function(e){!(0,u.isUndefined)(r[e])&&t.current&&t.current.set(e,r[e])}))}}),[e.option])}(f,s),(0,i.useImperativeHandle)(e,(function(){return{toggleState:function(){var t;null===(t=f.current)||void 0===t||t.changePlayingState()},get state(){var t,e;return null!==(t=null===(e=f.current)||void 0===e?void 0:e.options.playingState)&&void 0!==t&&t},pause:function(){var t;null===(t=f.current)||void 0===t||t.pause()},set:function(t){if(!(0,u.isUndefined)(t))for(var e=Object.keys(t),r=0,n=e.length;r<n;r++){var i,o=e[r];null===(i=f.current)||void 0===i||i.set(o,t[o])}}}})),o().createElement("div",{className:(0,l.xcn)("en-ripple-container"),style:x({backgroundRepeat:"round"},n)},o().createElement("canvas",{ref:c,"data-earthnut-ui":"canvas"}),r)}));k.displayName="en-background-ripple",module.exports.earthnut=n})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"a-element-inline-style";import*as e 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:(t,e,r)=>{t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},72:t=>{var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var o={},a=[],u=0;u<t.length;u++){var l=t[u],s=n.base?l[0]+n.base:l[0],c=o[s]||0,f="".concat(s," ").concat(c);o[s]=c+1;var p=r(f),d={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)e[p].references++,e[p].updater(d);else{var h=i(d,n);n.byIndex=u,e.splice(u,0,{identifier:f,updater:h,references:1})}a.push(f)}return a}function i(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var o=n(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var u=r(o[a]);e[u].references--}for(var l=n(t,i),s=0;s<o.length;s++){var c=r(o[s]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=l}}},78:(r,n,i)=>{i.d(n,{n:()=>$t});var o=i(649);const a=(u={setStyle:()=>t.setStyle},l={},i.d(l,u),l);var u,l,s=i(362);function c(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,a={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(a.id,i(r.VERTEX_SHADER,t)),r.attachShader(a.id,i(r.FRAGMENT_SHADER,e)),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=t+e,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(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 p(t){return"rgba(0, 0, 0, 0)"===t||"#ffffffff"===t||"transport"===t}function d(t){return"none"===t||""===t}function h(){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(),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 v(t){return v="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},v(t)}function m(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,b(n.key),n)}}function g(t,e,r){return e&&m(t.prototype,e),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t){var e=function(t){if("object"!=v(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==v(e)?e:e+""}var E=g((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,"canvas",void 0),y(this,"gl",void 0),y(this,"config",void 0),y(this,"initState",!0),this.canvas=e;var r=e.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 w=(t=>{var e={};return i.d(e,t),e})({debounce:()=>e.debounce,enArr:()=>e.enArr,getRandomInt:()=>e.getRandomInt,getRandomString:()=>e.getRandomString});var R,T={imgUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};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 O(t){return O="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},O(t)}function k(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,A(n.key),n)}}function A(t){var e=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}function I(t,e,r){return t.set(_(t,e),r),r}function D(t,e){return t.get(_(t,e))}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")}function F(t){return function(t){if(Array.isArray(t))return j(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 j(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)?j(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 j(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(T),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(){}}])&&P(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}())({name:"earthnut",type:!1});var U=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 u=0;u<=i;u++)for(var l=u;l<=i;l++){var s=n[u][l],c=function(){return(0,w.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,w.getRandomInt)(120,180):(0,w.getRandomInt)(160,240)}for(var f=0;f<=i;f++)for(var p=0;p<=f;p++)n[f][p]=n[p][f];for(var d=i;d<r;d++)for(var h=0;h<=i;h++)n[d][h]=n[r-d][h];for(var v=0;v<i;v++)for(var m=i;m<r;m++)n[v][m]=n[v][r-m];for(var g=i;g<r;g++)for(var y=i;y<r;y++)n[g][y]=n[g][r-y];var b=t%r;return e.list=[].concat(F(n.slice(b)),F(n.slice(0,b))),e},C=new(R=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,R,1),e=this,r="data",n=U(),(r=A(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n},(e=[{key:"build",value:function(){D(R,this)>100&&I(R,this,0),this.data=U(I(R,this,D(R,this)+3))}}])&&k(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function N(t,e){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=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=C.data,o=i.diameter,a=i.list,u=t*o,l=0;l<n.length;l+=4){var s=l/4%u,c=s%t%o,f=Math.floor(s/t),p=a[c][f];n[l]=p[0],n[l+1]=p[1],n[l+2]=p[2],n[l+3]=p[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 L(){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,w.getRandomString)({length:8,includeNumbers:!0,includeUppercaseLetters:!0});C.build(),n.push({resource:N(i,o),width:i,height:o,kind:"default",tag:a}),t&&e.run()}function B(){var t=this.renderData,e=this.fadeData,r=this.options;if((0,s.isNull)(t))return Reflect.apply(L,this,[]);var n=t.originStyle;if(p(n.backgroundColor)&&(!(0,s.isArray)(r.imgUrl)||1!==r.imgUrl.length))return Reflect.apply(L,this,[]);var i=document.createElement("canvas"),o=i.getContext("2d");if((0,s.isNull)(o))return Reflect.apply(L,this,[]);var a=e.backgroundInfo,u=a.width,l=a.height;i.width=u,i.height=l,o.clearRect(0,0,u,l);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,u,l),o.fill(),e.isTransitioning?e.toBeList=[e.toBeList[0]]:e.toBeList=[];var f={resource:i,kind:"background-color",tag:c,width:u,height:l};e.toBeList.push(f),e.run()}function M(){var t=this.fadeData,e=this.renderData,r=this.options;if((0,s.isNull)(e))return Reflect.apply(B,this,[]);var n=e.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(t){return(t=t.trim()).endsWith(")")||(t+=")"),t})).filter((function(t){return t.startsWith("rgb")||t.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 u=t.backgroundInfo,l=u.width,c=u.height;o.width=l,o.height=c,a.fillStyle="#fff",a.fillRect(0,0,l,c);var f=a.createLinearGradient(0,0,0,c);i.forEach((function(t,e){return f.addColorStop(e/(i.length-1),t)})),a.fillStyle=f,a.fillRect(0,0,l,c),t.isTransitioning?t.toBeList=[t.toBeList[0]]:t.toBeList=[],t.toBeList.push({resource:o,kind:"linear-gradient",tag:i.join("_"),width:l,height:c}),t.run()}function X(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 W(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if((0,s.isNull)(e))Reflect.apply(M,this,[]);else{var i,o,a=e.lastUseStyle,u=n.backgroundInfo,l=u.width,c=u.height,f=(0,s.isString)(r.imgUrl)&&r.imgUrl||(i=a.backgroundImage,o=/url\(["']?([^"']*)["']?\)/.exec(i),(0,s.isNull)(o)?null:o[1]);if(e.imageSource=f,f){var p=function(t,e,r){var n=new Image(e,r);return n.width=e,n.height=r,n.src=t,n}(f,l,c);p.onload=function(){var t;clearTimeout(n.transparentId),n.isTransitioning?n.toBeList=[n.toBeList[0]].concat(function(t){if(Array.isArray(t))return X(t)}(t=n.toBeList.slice(1).filter((function(t){return"image"===t.kind&&(Math.abs(t.width-l)>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 X(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)?X(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:p,width:l,height:c,kind:"image",tag:f}),n.run()},p.onerror=function(){Reflect.apply(M,t,[])},p.crossOrigin=r.crossOrigin}else Reflect.apply(M,this,[])}}function z(){var t=this.renderData;if(!(0,s.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 G(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 H(){var t=this.renderData;if(!(0,s.isNull)(t)){var e=t.parentElement,r=t.originStyle;e.style.setProperty("background-image",r.inlineBackgroundImage),e.style.setProperty("background-color",r.inlineBackgroundColor)}}function Y(t){return Y="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},Y(t)}function q(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,Z(n.key),n)}}function $(t,e,r){return(e=Z(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z(t){var e=function(t){if("object"!=Y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Y(e)?e:e+""}var K=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),$(this,"quad",null),$(this,"lastRaindropsFallTime",0),$(this,"parentElement",void 0),$(this,"mutationObserver",void 0),$(this,"resizeObserver",void 0),$(this,"renderProgram",void 0),$(this,"imageSource",""),$(this,"dropProgram",void 0),$(this,"updateProgram",void 0),$(this,"textures",[]),$(this,"backgroundTexture",[]),$(this,"textureDelta",void 0),$(this,"framebuffers",[]),$(this,"bufferWriteIndex",0),$(this,"bufferReadIndex",1),$(this,"originStyle",void 0),$(this,"lastUseStyle",void 0),$(this,"events",{}),$(this,"animationFrameId",0),this.parentElement=null!==(i=e.parentElement)&&void 0!==i?i:document.body,Reflect.apply(z,n,[]),this.originStyle=this.lastUseStyle=G(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=G(o.parentElement),a=Object.values(i);if((0,s.isEmptyArray)(w.enArr.difference(e,a)))return;var u=d(i.backgroundImage),l=p(i.backgroundColor);if(u&&l)return;o.lastUseStyle=i,Reflect.apply(r,n,[]),Reflect.apply(z,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=G(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(H,{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&&q(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function V(){var t=this.renderData,e=this.fadeData;if(!(0,s.isNull)(t)){var r,n,i,o=t.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(" "):J(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"===l?(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 d=e.backgroundInfo||{width:100,height:100},h=d.width,v=d.height;if("cover"===u){var m=Math.max(p.width/h,p.height/v);n=h*m,i=v*m}else if("contain"===u){var g=Math.min(p.width/h,p.height/v);n=h*g,i=v*g}else{var y=u.split(" ");n=y[0]||"",i=y[1]||n,J(n)?n=p.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),J(i)?i=p.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=h,i=v):("auto"===n&&(n=h*(Number(i)/v)),"auto"===i&&(i=v*(Number(n)/h)))}var b=f&&f[0]||"0%",E=f&&f[1]||"0%";b=J(b)?(p.left+(p.width-Number(n))*parseFloat(b)/100).toString():(p.left+parseFloat(b)).toString(),E=J(E)?(p.top+(p.height-Number(i))*parseFloat(E)/100).toString():(p.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 J(t){return t.endsWith("%")}function Q(){var t=this.gl,e=this.renderData;(0,s.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 tt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,s.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(f,this,[i,0]),Reflect.apply(f,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(Q,this,[]),t.disable(t.BLEND)}}function et(){var t=this.renderData;if(!(0,s.isNull)(t)){var e=t.bufferWriteIndex,r=t.bufferReadIndex;t.bufferWriteIndex=1-e,t.bufferReadIndex=1-r}}function rt(){var t=this.gl,e=this.renderData,r=this.options;if(!(0,s.isNull)(e)){var n=e.updateProgram,i=e.textures,o=e.framebuffers,a=e.bufferWriteIndex,u=e.bufferReadIndex,l=r.resolution;t.viewport(0,0,l,l),t.bindFramebuffer(t.FRAMEBUFFER,o[a]),Reflect.apply(f,this,[i[u]]),t.useProgram(n.id),Reflect.apply(Q,this,[]),Reflect.apply(et,this,[])}}function nt(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,s.isNull)(e)){var i=e.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(V,this,[]),a?(l||(r.lastRunningState=!0,this.show()),u&&this.raindropsFall(),o&&this.fade(),Reflect.apply(rt,this,[]),Reflect.apply(tt,this,[])):l&&(r.lastRunningState=!1,this.hide()),e.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(nt,t,[])}))}}function it(t,e,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=t.clientX-l.left-a,f=t.clientY-l.top-u;this.drop(c,f,e,r)}}function ot(){var t=this,e=this.renderData,r=this.options;if(!(0,s.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(it,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 at="\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 ut(){var t=this.gl,e=this.renderData;if(!(0,s.isNull)(e)){var r=e.textureDelta;e.dropProgram=c(at,"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=c(at,"\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=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 }",t),t.uniform2fv(e.renderProgram.locations.delta,r)}}function lt(){var t=this.gl,e=this.renderData;if(!(0,s.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 st(t){var e=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(t){return(0,s.isZero)(t&t-1)},c=l(a)&&l(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 ct(){var t=this,e=this.renderData,r=this.options,n=this.fadeData;if(!(0,s.isNull)(e)&&this.config){var i=e.textures,o=e.framebuffers,a=r.resolution,u=this.gl,l=1/a;e.textureDelta=new Float32Array([l,l]),this.config.extensions.forEach((function(t){return u.getExtension(t)}));for(var c=this.config.arrayType,f=c?new c(a*a*4):null,p=this.config,d=0;d<2;d++){var h=u.createTexture(),v=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,v),u.bindTexture(u.TEXTURE_2D,h),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,p.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,p.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,p.type,f),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,h,0),i.push(h),o.push(v)}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(ut,this,[]),Reflect.apply(lt,this,[]),Reflect.apply(W,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(ot,this,[]),Reflect.apply(st,this,[n.lastDrawImage]),e.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(nt,t,[])}))}}function ft(){var t=this.renderData,e=this.fadeData;if(!(0,s.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(W,this,[])}}function pt(){var t=this.renderData,e=this.fadeData;(0,s.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 dt(t,e,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,p=i.framebuffers,d=i.bufferWriteIndex,h=i.bufferReadIndex,v=o.resolution,m=u.offsetWidth,g=u.offsetHeight,y=Math.max(m,g);r/=y;var b=new Float32Array([(2*t-m)/y,(g-2*e)/y]);a.viewport(0,0,v,v),a.bindFramebuffer(a.FRAMEBUFFER,p[d]),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(et,this,[])}}function ht(t){return ht="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},ht(t)}function vt(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,gt(n.key),n)}}function mt(t,e,r){return(e=gt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gt(t){var e=function(t){if("object"!=ht(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ht(e)?e:e+""}function yt(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 bt(t,e){return t.get(wt(t,e))}function Et(t,e,r){return t.set(wt(t,e),r),r}function wt(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 Rt=new WeakMap,Tt=new WeakMap,St=new WeakMap,Pt=new WeakMap,xt=new WeakMap,Ot=new WeakMap,kt=new WeakMap,At=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),yt(this,Rt,T.accelerating),yt(this,Tt,T.interactive),yt(this,St,T.resolution),yt(this,Pt,T.perturbance),yt(this,xt,T.dropRadius),mt(this,"imgUrl",T.imgUrl),yt(this,Ot,T.idleFluctuations),yt(this,kt,T.raindropsTimeInterval),mt(this,"crossOrigin","no-cors"),mt(this,"visible",!1),mt(this,"running",!1),mt(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 bt(Rt,this)},set:function(t){t>100||t<2||Et(Rt,this,t)}},{key:"interactive",get:function(){return bt(Tt,this)},set:function(t){(0,s.isBoolean)(t)&&Et(Tt,this,t)}},{key:"resolution",get:function(){return bt(St,this)},set:function(t){t<100||t>550||Et(St,this,t)}},{key:"perturbance",get:function(){return bt(Pt,this)},set:function(t){t<1e-4||t>1||Et(Pt,this,t)}},{key:"dropRadius",get:function(){return bt(xt,this)},set:function(t){!isFinite(t)||t<10||Et(xt,this,t)}},{key:"idleFluctuations",get:function(){return bt(Ot,this)},set:function(t){(0,s.isBoolean)(t)&&Et(Ot,this,t)}},{key:"raindropsTimeInterval",get:function(){return bt(kt,this)},set:function(t){t<10||t>12e3||Et(kt,this,t)}},{key:"playingState",get:function(){return this.running},set:function(t){this.running=Boolean(null==t||t)}}])&&vt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function It(){var t=this,e=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(It,t,[]);"image"!==r.lastDrawImage.kind&&r.run()}),2*e.raindropsTimeInterval)}function Dt(){var t=this.renderData,e=this.fadeData,r=this.options,n=e.toBeList;if((0,s.isNull)(t))return e.isTransitioning=!1,void Reflect.apply(It,this,[]);if((0,s.isEmptyArray)(n))return e.isTransitioning=!1,void Reflect.apply(It,this,[]);if(0===e.drawProgress&&n.forEach((function(t){})),e.drawProgress>1e3)if(e.isTransitioning=!1,e.lastDrawImage=n.shift(),Reflect.apply(st,this,[e.lastDrawImage]),(0,s.isEmptyArray)(n)){var i=t.lastUseStyle;(0,s.isNull)(r.imgUrl)&&p(i.backgroundColor)&&d(i.backgroundImage)&&(Reflect.apply(L,this,[!1]),Reflect.apply(It,this,[]))}else Reflect.apply(It,this,[]);else{var o=e.lastDrawImage,a=e.backgroundInfo;e.drawProgress+=18;var u=document.createElement("canvas"),l=u.getContext("2d");if(!((0,s.isNull)(l)||(0,s.isNull)(o.resource)||(0,s.isEmptyArray)(n))){var c=a.width,f=a.height;u.width=c,u.height=f,l.clearRect(0,0,c,f),l.drawImage(o.resource,0,0,c,f),l.globalAlpha=e.drawProgress/1e3,l.drawImage(n[0].resource,0,0,c,f),l.globalAlpha=1;var h={resource:u,width:c,height:f,kind:"mix",tag:"".concat(o.tag," >> ").concat(n[0].tag)};Reflect.apply(st,this,[h]),n.length>1&&(e.lastDrawImage=h,n.shift(),e.drawProgress=0)}}}function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}function Ft(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,Ut(n.key),n)}}function jt(t,e,r){return(e=Ut(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ut(t){var e=function(t){if("object"!=_t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_t(e)?e:e+""}var Ct=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),jt(this,"backgroundInfo",{width:0,height:0}),jt(this,"transparentId",setTimeout(Boolean)),jt(this,"lastDrawImage",void 0),jt(this,"toBeList",[]),jt(this,"drawProgress",0),jt(this,"isTransitioning",!1);var r,n,i=e.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:N(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)}}])&&Ft(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Nt(t){return Nt="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},Nt(t)}function Lt(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 Bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lt(Object(r),!0).forEach((function(e){Gt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Mt(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,Ht(n.key),n)}}function Xt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xt=function(){return!!t})()}function Wt(t){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wt(t)}function zt(t,e){return zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zt(t,e)}function Gt(t,e,r){return(e=Ht(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ht(t){var e=function(t){if("object"!=Nt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Nt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nt(e)?e:e+""}var Yt=new WeakMap,qt=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),Gt(n=function(t,e,r){return e=Wt(e),function(t,e){if(e&&("object"==Nt(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,Xt()?Reflect.construct(e,r||[],Wt(t).constructor):e.apply(t,r))}(this,e,[t]),"renderData",null),Gt(n,"options",void 0),Gt(n,"fadeData",void 0),Gt(n,"defaults",T),Gt(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,Yt,(0,w.debounce)(ft,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new At(Bt(Bt({},n.defaults),r)),n.renderData=new K(t,n.reloadBackground,n),n.fadeData=new Ct(n),(0,s.isFalse)(n.initState)||(0,s.isNull)(t.parentElement)||(0,s.isNull)(n.config)||(0,s.isNull)(n.gl)?n.initState=!1:(function(t){var e=t.parentElement;t.width=e.clientWidth,t.height=e.clientHeight,(0,a.setStyle)(t,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(ct,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&&zt(t,e)}(e,t),r=e,n=[{key:"raindropsFall",value:function(){var t=this.renderData,e=this.options,r=this.fadeData;if(!(0,s.isNull)(t)){var n=r.backgroundInfo,i=t.lastRaindropsFallTime,o=e.raindropsTimeInterval,a=e.dropRadius,u=Date.now();if(!(u-i<o)){t.lastRaindropsFallTime=u;var l=function(t){return(0,w.getRandomInt)(t)},c=n.width,f=n.height;this.drop(l(c),l(f),a,.03)}}}},{key:"drop",value:function(t,e,r,n){Reflect.apply(dt,this,[t,e,r,n])}},{key:"fade",value:function(){Reflect.apply(Dt,this,[])}},{key:"reloadBackground",value:function(){var t,e;(t=Yt,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(pt,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(z,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 t=this.options;t.running=!t.running}},{key:"set",value:function(t,e){"imgUrl"===t?(this.options.imgUrl=e,Reflect.apply(W,this,[])):this.options[t]=e}}],n&&Mt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(E);function $t(t,e){var r=(0,o.useRef)(null);return(0,o.useEffect)((function(){if(!(0,s.isNull)(t.current))return r.current=new qt(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}},109:(t,e,r)=>{r.d(e,{A:()=>u});var n=r(601),i=r.n(n),o=r(314),a=r.n(o)()(i());a.push([t.id,".en-ripple-container{width:100%;height:100%;position:relative;top:0px;left:0px;z-index:1}",""]);const u=a},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,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<t.length;s++){var c=[].concat(t[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)),e.push(c))}},e}},362:(t,e,n)=>{var i,o;t.exports=(i={isArray:()=>r.isArray,isBoolean:()=>r.isBoolean,isEmptyArray:()=>r.isEmptyArray,isFalse:()=>r.isFalse,isNull:()=>r.isNull,isString:()=>r.isString,isUndefined:()=>r.isUndefined,isZero:()=>r.isZero},o={},n.d(o,i),o)},411:(t,e,r)=>{var i,o;t.exports=(i={xcn:()=>n.xcn},o={},r.d(o,i),o)},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},601:t=>{t.exports=function(t){return t[1]}},649:(t,e,r)=>{var n,o;t.exports=(n={default:()=>i.default,forwardRef:()=>i.forwardRef,useEffect:()=>i.useEffect,useImperativeHandle:()=>i.useImperativeHandle,useRef:()=>i.useRef},o={},r.d(o,n),o)},659:t=>{var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);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:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,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))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}}},a={};function u(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={id:t,exports:{}};return o[t](r,r.exports,u),r.exports}u.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return u.d(e,{a:e}),e},u.d=(t,e)=>{for(var r in e)u.o(e,r)&&!u.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},u.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),u.nc=void 0;var l={};u.d(l,{z:()=>_});var s=u(649),c=u(78),f=u(362),p=u(411),d=u(72),h=u.n(d),v=u(825),m=u.n(v),g=u(659),y=u.n(g),b=u(56),E=u.n(b),w=u(540),R=u.n(w),T=u(113),S=u.n(T),P=u(109),x={};function O(t){return O="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},O(t)}x.styleTagTransform=S(),x.setAttributes=E(),x.insert=y().bind(null,"head"),x.domAPI=m(),x.insertStyleElement=R(),h()(P.A,x),P.A&&P.A.locals&&P.A.locals;var k=["children","style"];function A(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 I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach((function(e){D(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function D(t,e,r){return(e=function(t){var e=function(t){if("object"!=O(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==O(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _=(0,s.forwardRef)((function(t,e){var r=t.children,n=t.style,i=function(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;r[n]=t[n]}return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],-1===e.indexOf(r)&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}(t,k),o=(0,s.useRef)(null),a=(0,c.n)(o,i);return function(t,e){(0,s.useEffect)((function(){if(e.option&&t.current){var r=e.option;Object.keys(t.current.defaults).forEach((function(e){!(0,f.isUndefined)(r[e])&&t.current&&t.current.set(e,r[e])}))}}),[e.option])}(a,i),(0,s.useImperativeHandle)(e,(function(){return{toggleState:function(){var t;null===(t=a.current)||void 0===t||t.changePlayingState()},get state(){var t,e;return null!==(t=null===(e=a.current)||void 0===e?void 0:e.options.playingState)&&void 0!==t&&t},pause:function(){var t;null===(t=a.current)||void 0===t||t.pause()},set:function(t){if(!(0,f.isUndefined)(t))for(var e=Object.keys(t),r=0,n=e.length;r<n;r++){var i,o=e[r];null===(i=a.current)||void 0===i||i.set(o,t[o])}}}})),s.default.createElement("div",{className:(0,p.xcn)("en-ripple-container"),style:I({backgroundRepeat:"round"},n)},s.default.createElement("canvas",{ref:o,"data-earthnut-ui":"canvas"}),r)}));_.displayName="en-background-ripple";const F=l.z;export{F as BackgroundRipple};
|
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) <2025> <earthnut.dev>
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
|
|
17
|
+
# MIT 许可证
|
|
18
|
+
|
|
19
|
+
版权所有 (c) [2025] [花生亻]
|
|
20
|
+
|
|
21
|
+
特此免费授予任何获得本软件及相关文档文件(以下简称“软件”)副本的人不受限制地处置该软件的权利,包括不受限制地使用、复制、修改、合并、发布、分发、再许可和/或出售该软件副本的权利,并允许向其提供该软件的人这样做,但须遵守以下条件:
|
|
22
|
+
|
|
23
|
+
上述版权声明和本许可声明应包含在所有副本或软件的重要部分中。
|
|
24
|
+
|
|
25
|
+
软件按“原样”提供,不附带任何形式的明示或暗示的保证,包括但不限于适销性、特定用途适用性和不侵权的保证。在任何情况下,作者或版权持有人均不对因合同、侵权或其他方式引起的任何索赔、损害或其他责任负责,无论是在与软件或软件的使用或其他交易有关的任何诉讼中。
|
package/Layout/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e={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,a=0;a<t.length;a++)if(t[a].identifier===e){r=a;break}return r}function a(e,a){for(var o={},i=[],l=0;l<e.length;l++){var u=e[l],c=a.base?u[0]+a.base:u[0],s=o[c]||0,d="".concat(c," ").concat(s);o[c]=s+1;var y=r(d),h={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==y)t[y].references++,t[y].updater(h);else{var f=n(h,a);a.byIndex=l,t.splice(l,0,{identifier:d,updater:f,references:1})}i.push(d)}return i}function n(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,n){var o=a(e=e||[],n=n||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var l=r(o[i]);t[l].references--}for(var u=a(e,n),c=0;c<o.length;c++){var s=r(o[c]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}o=u}}},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))}}},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",a=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),a&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),a&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,a,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l<this.length;l++){var u=this[l][0];null!=u&&(i[u]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);a&&i[s[0]]||(void 0!==o&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=o),r&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=r):s[2]=r),n&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=n):s[4]="".concat(n)),t.push(s))}},t}},384:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(601),n=r.n(a),o=r(314),i=r.n(o)()(n());i.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)}',""]),i.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=i},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},570:e=>{e.exports=require("a-type-of-js")},601:e=>{e.exports=function(e){return e[1]}},659:e=>{var t={};e.exports=function(e,r){var a=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(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(r)}},763:e=>{e.exports=require("xcn")},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 a="";r.supports&&(a+="@supports (".concat(r.supports,") {")),r.media&&(a+="@media ".concat(r.media," {"));var n=void 0!==r.layer;n&&(a+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),a+=r.css,n&&(a+="}"),r.media&&(a+="}"),r.supports&&(a+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},953:e=>{e.exports=require("react")}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,exports:{}};return e[a](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},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})},r.nc=void 0;var a={};r.r(a),r.d(a,{EnLayout:()=>q,EnLayoutContent:()=>N,EnLayoutFooter:()=>T,EnLayoutHeader:()=>P,EnLayoutSideBar:()=>j,Layout:()=>q,LayoutContent:()=>N,LayoutFooter:()=>T,LayoutHeader:()=>P,LayoutSideBar:()=>j});var n=r(953),o=r.n(n),i=r(763),l=r(72),u=r.n(l),c=r(825),s=r.n(c),d=r(659),y=r.n(d),h=r(56),f=r.n(h),p=r(540),g=r.n(p),m=r(113),v=r.n(m),b=r(384),w={};w.styleTagTransform=v(),w.setAttributes=f(),w.insert=y().bind(null,"head"),w.domAPI=s(),w.insertStyleElement=g(),u()(b.A,w);const S=b.A&&b.A.locals?b.A.locals:void 0;var O=["className","children","height","noSticky"];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 a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},x.apply(null,arguments)}var P=o().forwardRef((function(e,t){var r=e.className,a=e.children,n=(e.height,e.noSticky,function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,O));return o().createElement("div",x({ref:t,className:(0,i.xcn)(S["en-layout-header"],r)},n,{"data-earthnut-ui":"layout-header"}),a)}));P.displayName="LayoutHeader";var E=["className","width","right","full"];function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},k.apply(null,arguments)}var j=o().forwardRef((function(e,t){var r=e.className,a=(e.width,e.right,e.full,function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,E));return o().createElement("div",k({className:(0,i.xcn)(S["en-layout-side"],r),ref:t},a,{"data-earthnut-ui":"layout-side-bar"}))}));j.displayName="LayoutSideBar";var A=["className"];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 a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},L.apply(null,arguments)}var N=o().forwardRef((function(e,t){var r=e.className,a=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,A);return o().createElement("main",L({ref:t,className:(0,i.xcn)(S["en-layout-main"],r)},a,{"data-earthnut-ui":"layout-content"}))}));N.displayName="LayoutContent";var D=["className","height"];function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Q.apply(null,arguments)}var T=o().forwardRef((function(e,t){var r=e.className,a=(e.height,function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,D));return o().createElement("div",Q({ref:t},a,{className:(0,i.xcn)(S["en-layout-footer"],r),"data-earthnut-ui":"layout-footer"}))}));T.displayName="LayoutFooter";var z=r(570);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)}var C=["className","children","style","width","height"];function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},G.apply(null,arguments)}function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return(t=function(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+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var q=n.forwardRef((function(e,t){var r,a,o,l,u=e.className,c=e.children,s=e.style,d=e.width,y=void 0===d?"100vw":d,h=e.height,f=void 0===h?"100vh":h,p=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,C),g="simple",m="",v=!1,b=!1,w=!1,O=!1,x=150,E="2.8rem",k="2rem",A=!1;n.Children.forEach(c,(function(e){if(n.isValidElement(e))if(v||e.type!==P)if(b||e.type!==j)w||e.type!==N?w||e.type!==q?O||e.type!==T||(k=e.props.height||k,l=e,O=!0):(o=n.createElement("main",{"data-earthnut-ui":"layout-content",className:(0,i.xcn)(S["en-layout-main"])},e),w=!0):(o=e,w=!0);else{var t=e.props;x=t.width||x,g=t.right&&t.full?"side-right-full":t.right?"side-right":t.full?"side-full":"simple",A=(0,z.isTrue)(t.full),a=e,b=!0}else{var u=e.props;E=u.height||E,m=u.noSticky?S["en-layout-header-no-sticky"]:"",r=e,v=!0}}));var L=v&&b&&w&&O&&S["en-layout-".concat(g,"-all")]||v&&w&&b&&S["en-layout-".concat(g,"-no-footer")]||b&&w&&O&&S["en-layout-".concat(g,"-no-header")]||w&&O&&S["en-layout-only-footer"]||w&&v&&S["en-layout-only-header"]||w&&b&&(A=!0)&&S["en-layout-".concat(g,"-only-side")]||"";return n.createElement("div",G({ref:t,className:(0,i.xcn)(S["en-layout"],A&&S["en-layout-side-full"],L,m,u),style:H({"--layout-width":X(y),"--layout-height":X(f),"--layout-side-bar-width":X(x),"--layout-header-height":X(E),"--layout-footer-height":X(k)},s)},p,{"data-earthnut-ui":"layout"}),/side.*full/.test(g)?n.createElement(n.Fragment,null,a,r,o,l):n.createElement(n.Fragment,null,r,O?n.createElement("div",{className:(0,i.xcn)(S["en-layout-content"]),"data-earthnut-ui":"layout-with-foot-content"},a,o):n.createElement(n.Fragment,null,a,o),l))}));function X(e){return(0,z.isNumber)(e)||parseInt(e)===Number(e)?e+"px":e||0}q.displayName="Layout",module.exports.earthnut=a})();
|
package/Layout/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"a-type-of-js";import*as t from"xcn";import*as r from"react";var a={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,a=0;a<t.length;a++)if(t[a].identifier===e){r=a;break}return r}function a(e,a){for(var o={},i=[],l=0;l<e.length;l++){var u=e[l],c=a.base?u[0]+a.base:u[0],s=o[c]||0,d="".concat(c," ").concat(s);o[c]=s+1;var y=r(d),h={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==y)t[y].references++,t[y].updater(h);else{var f=n(h,a);a.byIndex=l,t.splice(l,0,{identifier:d,updater:f,references:1})}i.push(d)}return i}function n(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,n){var o=a(e=e||[],n=n||{});return function(e){e=e||[];for(var i=0;i<o.length;i++){var l=r(o[i]);t[l].references--}for(var u=a(e,n),c=0;c<o.length;c++){var s=r(o[c]);0===t[s].references&&(t[s].updater(),t.splice(s,1))}o=u}}},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))}}},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",a=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),a&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),a&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,a,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(a)for(var l=0;l<this.length;l++){var u=this[l][0];null!=u&&(i[u]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);a&&i[s[0]]||(void 0!==o&&(void 0===s[5]||(s[1]="@layer".concat(s[5].length>0?" ".concat(s[5]):""," {").concat(s[1],"}")),s[5]=o),r&&(s[2]?(s[1]="@media ".concat(s[2]," {").concat(s[1],"}"),s[2]=r):s[2]=r),n&&(s[4]?(s[1]="@supports (".concat(s[4],") {").concat(s[1],"}"),s[4]=n):s[4]="".concat(n)),t.push(s))}},t}},362:(t,r,a)=>{var n,o;t.exports=(n={isNumber:()=>e.isNumber,isTrue:()=>e.isTrue},o={},a.d(o,n),o)},384:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(601),n=r.n(a),o=r(314),i=r.n(o)()(n());i.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)}',""]),i.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=i},411:(e,r,a)=>{var n,o;e.exports=(n={xcn:()=>t.xcn},o={},a.d(o,n),o)},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601:e=>{e.exports=function(e){return e[1]}},649:(e,t,a)=>{var n,o;e.exports=(n={Children:()=>r.Children,Fragment:()=>r.Fragment,createElement:()=>r.createElement,default:()=>r.default,forwardRef:()=>r.forwardRef,isValidElement:()=>r.isValidElement},o={},a.d(o,n),o)},659:e=>{var t={};e.exports=function(e,r){var a=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(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.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 a="";r.supports&&(a+="@supports (".concat(r.supports,") {")),r.media&&(a+="@media ".concat(r.media," {"));var n=void 0!==r.layer;n&&(a+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),a+=r.css,n&&(a+="}"),r.media&&(a+="}"),r.supports&&(a+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,exports:{}};return a[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nc=void 0;var i={};o.d(i,{wb:()=>W,Ht:()=>Q,zE:()=>R,n5:()=>A,AX:()=>L,PE:()=>W,A1:()=>Q,cZ:()=>R,KL:()=>A,nb:()=>L});var l=o(649),u=o(411),c=o(72),s=o.n(c),d=o(825),y=o.n(d),h=o(659),f=o.n(h),p=o(56),g=o.n(p),m=o(540),v=o.n(m),b=o(113),w=o.n(b),S=o(384),O={};O.styleTagTransform=w(),O.setAttributes=g(),O.insert=f().bind(null,"head"),O.domAPI=y(),O.insertStyleElement=v(),s()(S.A,O);const x=S.A&&S.A.locals?S.A.locals:void 0;var E=["className","children","height","noSticky"];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 a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},P.apply(null,arguments)}var A=l.default.forwardRef((function(e,t){var r=e.className,a=e.children,n=(e.height,e.noSticky,function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,E));return l.default.createElement("div",P({ref:t,className:(0,u.xcn)(x["en-layout-header"],r)},n,{"data-earthnut-ui":"layout-header"}),a)}));A.displayName="LayoutHeader";var k=["className","width","right","full"];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},j.apply(null,arguments)}var L=l.default.forwardRef((function(e,t){var r=e.className,a=(e.width,e.right,e.full,function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,k));return l.default.createElement("div",j({className:(0,u.xcn)(x["en-layout-side"],r),ref:t},a,{"data-earthnut-ui":"layout-side-bar"}))}));L.displayName="LayoutSideBar";var N=["className"];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 a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},D.apply(null,arguments)}var Q=l.default.forwardRef((function(e,t){var r=e.className,a=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,N);return l.default.createElement("main",D({ref:t,className:(0,u.xcn)(x["en-layout-main"],r)},a,{"data-earthnut-ui":"layout-content"}))}));Q.displayName="LayoutContent";var z=["className","height"];function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},T.apply(null,arguments)}var R=l.default.forwardRef((function(e,t){var r=e.className,a=(e.height,function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,z));return l.default.createElement("div",T({ref:t},a,{className:(0,u.xcn)(x["en-layout-footer"],r),"data-earthnut-ui":"layout-footer"}))}));R.displayName="LayoutFooter";var C=o(362);function G(e){return G="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},G(e)}var F=["className","children","style","width","height"];function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},H.apply(null,arguments)}function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _(e,t,r){return(t=function(e){var t=function(e){if("object"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var W=l.forwardRef((function(e,t){var r,a,n,o,i=e.className,c=e.children,s=e.style,d=e.width,y=void 0===d?"100vw":d,h=e.height,f=void 0===h?"100vh":h,p=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;r[a]=e[a]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,F),g="simple",m="",v=!1,b=!1,w=!1,S=!1,O=150,E="2.8rem",P="2rem",k=!1;l.Children.forEach(c,(function(e){if(l.isValidElement(e))if(v||e.type!==A)if(b||e.type!==L)w||e.type!==Q?w||e.type!==W?S||e.type!==R||(P=e.props.height||P,o=e,S=!0):(n=l.createElement("main",{"data-earthnut-ui":"layout-content",className:(0,u.xcn)(x["en-layout-main"])},e),w=!0):(n=e,w=!0);else{var t=e.props;O=t.width||O,g=t.right&&t.full?"side-right-full":t.right?"side-right":t.full?"side-full":"simple",k=(0,C.isTrue)(t.full),a=e,b=!0}else{var i=e.props;E=i.height||E,m=i.noSticky?x["en-layout-header-no-sticky"]:"",r=e,v=!0}}));var j=v&&b&&w&&S&&x["en-layout-".concat(g,"-all")]||v&&w&&b&&x["en-layout-".concat(g,"-no-footer")]||b&&w&&S&&x["en-layout-".concat(g,"-no-header")]||w&&S&&x["en-layout-only-footer"]||w&&v&&x["en-layout-only-header"]||w&&b&&(k=!0)&&x["en-layout-".concat(g,"-only-side")]||"";return l.createElement("div",H({ref:t,className:(0,u.xcn)(x["en-layout"],k&&x["en-layout-side-full"],j,m,i),style:Z({"--layout-width":q(y),"--layout-height":q(f),"--layout-side-bar-width":q(O),"--layout-header-height":q(E),"--layout-footer-height":q(P)},s)},p,{"data-earthnut-ui":"layout"}),/side.*full/.test(g)?l.createElement(l.Fragment,null,a,r,n,o):l.createElement(l.Fragment,null,r,S?l.createElement("div",{className:(0,u.xcn)(x["en-layout-content"]),"data-earthnut-ui":"layout-with-foot-content"},a,n):l.createElement(l.Fragment,null,a,n),o))}));function q(e){return(0,C.isNumber)(e)||parseInt(e)===Number(e)?e+"px":e||0}W.displayName="Layout";const Y=i.wb,V=i.Ht,I=i.zE,B=i.n5,K=i.AX,U=i.PE,J=i.A1,M=i.cZ,$=i.KL,ee=i.nb;export{Y as EnLayout,V as EnLayoutContent,I as EnLayoutFooter,B as EnLayoutHeader,K as EnLayoutSideBar,U as Layout,J as LayoutContent,M as LayoutFooter,$ as LayoutHeader,ee as LayoutSideBar};
|
package/README.md
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 花生亻 ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
嗯,姑且称之为 ui 吧
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 安装
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```sh
|
|
8
|
+
npm install --save earthnut
|
|
9
|
+
```
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
## 涟漪背景
|
|
12
|
+
|
|
13
|
+
由于当前组件的开发进度较缓慢,目前:
|
|
14
|
+
|
|
15
|
+
- 尽管接受所有的 style 属性,但是 `position` 还是期待是非 'static' 值,否则将影响涟漪背景的渲染位置和显示状态;
|
|
16
|
+
- 当前如果设置了 `background` 的话,有可能在恢复时使得其覆盖其他子属性;
|
|
17
|
+
- 当前期待使用 `background-color` 设置背景色,而不是在上面的 `background` 中设置背景色。譬如:`background-color: #f0f6;`
|
|
18
|
+
- 当前更期待使用配置参数 `option` 的 'imgUrl' 来配置目标背景图(请注意图源的跨域问题)。譬如:`imgUrl: 'background.png'`
|
|
19
|
+
- 当然,也可以使用标准的 `background-image` 配置符合要求的背景图片(目前仅支持单张图配置)。譬如:`background-image: url(background.png);`
|
|
20
|
+
- 当前可配置 `background-image` 为渐变色,但仅支持从上到下的线性渐变(仅支持单渐变)。譬如: `background-image: linear-gradient(black, transparent);`
|
|
21
|
+
- 在同时配置了 `imgUrl`、`background-image`、`background-color` 时仅会显示一个效果(混合效果暂时并未实现)。优先展示 `imgUrl`,然后是 `background-image`,之后是 `background-color` 。如果都未设置则会展示默认的老式地板砖背景图
|
|
22
|
+
- 尽量不要是使用透明色或是当前的主背景色,否则导致涟漪的效果不明显
|
|
23
|
+
|
|
24
|
+
切换背景最好不好通过设置
|
|
25
|
+
|
|
26
|
+
## 文档
|
|
27
|
+
|
|
28
|
+
参阅 [earthnut](https://earthnut.dev/)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.scss';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* layout content
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* @param {string} className 布局的类名
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
declare const InternalValueC: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { InternalValueC };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LayoutFooterProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* layout footer
|
|
6
|
+
*
|
|
7
|
+
* 布局底部
|
|
8
|
+
*
|
|
9
|
+
* @param className 自定义类名
|
|
10
|
+
* @param height 自定义高度
|
|
11
|
+
* @param props 其他属性
|
|
12
|
+
* @returns React.ReactElement
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
declare const InternalValueF: React.ForwardRefExoticComponent<LayoutFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { InternalValueF };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LayoutHeaderProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* layout header
|
|
6
|
+
*
|
|
7
|
+
* 布局头部
|
|
8
|
+
*
|
|
9
|
+
* @param className 自定义类名
|
|
10
|
+
* @param height 高度
|
|
11
|
+
* 缺省值为 2.8rem,当未在 `Layout` 中使用,该值不起作用
|
|
12
|
+
* @param noSticky 是否取消悬挂粘连
|
|
13
|
+
* 缺省值为 false
|
|
14
|
+
* @param props 其他属性
|
|
15
|
+
* @returns React.ReactElement
|
|
16
|
+
*/
|
|
17
|
+
declare const InternalValueH: React.ForwardRefExoticComponent<LayoutHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export { InternalValueH };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Layout, Layout as EnLayout, LayoutContent, LayoutContent as EnLayoutContent, LayoutHeader, LayoutHeader as EnLayoutHeader, LayoutFooter, LayoutFooter as EnLayoutFooter, LayoutSideBar, LayoutSideBar as EnLayoutSideBar, } from './layout';
|
|
2
|
+
export type { LayoutProps, LayoutSideBarProps, LayoutHeaderProps, LayoutFooterProps, } from './types';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { InternalValueH as LayoutHeader } from './header';
|
|
3
|
+
import { InternalValueS as LayoutSideBar } from './sideBar';
|
|
4
|
+
import { InternalValueC as LayoutContent } from './content';
|
|
5
|
+
import { InternalValueF as LayoutFooter } from './footer';
|
|
6
|
+
import { LayoutProps } from './types';
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* ## layout
|
|
10
|
+
*
|
|
11
|
+
* 布局组件,用于构建页面布局。
|
|
12
|
+
*
|
|
13
|
+
* ***为了照顾在 next.js 中的服务端组件中使用,在拥有 `side bar` 时 `Layout` 的 `height` 为百分比时会触发 side bar 滚动***
|
|
14
|
+
*
|
|
15
|
+
* @param {string} className 布局的类名
|
|
16
|
+
* @param {React.CSSProperties} style 布局的样式
|
|
17
|
+
* @param {string | number} width 布局的宽
|
|
18
|
+
* @param {string | number} height 布局的高
|
|
19
|
+
* @example
|
|
20
|
+
*
|
|
21
|
+
* ```jsx
|
|
22
|
+
* <Layout>
|
|
23
|
+
* <LayoutHeader> 头部 </LayoutHeader>
|
|
24
|
+
* <LayoutSideBar> 侧边栏 </LayoutSideBar>
|
|
25
|
+
* <LayoutContent> 内容区 </LayoutContent>
|
|
26
|
+
* <LayoutFooter> 页脚 </LayoutFooter>
|
|
27
|
+
* </Layout>
|
|
28
|
+
*
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* 该组件仅接受 `LayoutHeader`、`LayoutSideBar`、`LayoutContent` 和 `LayoutFooter` 作为(直接)子组件。
|
|
32
|
+
*
|
|
33
|
+
* 可任意搭配使用,但不推荐使用无 `LayoutContent` 使用。
|
|
34
|
+
*
|
|
35
|
+
* 目前已知当 `Layout` 嵌套 `Layout` 时,需要设定内部 `Layout` 的 `width` 和 `height`。
|
|
36
|
+
*
|
|
37
|
+
* ```jsx
|
|
38
|
+
* <Layout width="100%" height="100%">
|
|
39
|
+
* <Layout width="100%" height="100%">
|
|
40
|
+
* <LayoutSideBar width="150px"> 侧边栏 </LayoutSideBar>
|
|
41
|
+
* <LayoutContent> 内容区 </LayoutContent>
|
|
42
|
+
* </Layout>
|
|
43
|
+
* <LayoutFooter> 页脚 </LayoutFooter>
|
|
44
|
+
* </Layout>
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
declare const Layout: React.ForwardRefExoticComponent<LayoutProps & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
export { Layout, LayoutHeader, LayoutSideBar, LayoutContent, LayoutFooter };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LayoutSideBarProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* children side bar
|
|
6
|
+
*
|
|
7
|
+
* 侧边栏
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* @param children 子元素
|
|
11
|
+
* @param ref 组件引用
|
|
12
|
+
* @param props 组件属性
|
|
13
|
+
* @param className 自定义类名
|
|
14
|
+
* @param width 侧边栏的宽度
|
|
15
|
+
* 缺省值为 `150px`
|
|
16
|
+
* @param right 是否居右
|
|
17
|
+
* 缺省值为 `false`
|
|
18
|
+
* @param full 是否占用所有空间
|
|
19
|
+
* 缺省值为 `false`
|
|
20
|
+
* @returns `React.ReactElement`;
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
declare const InternalValueS: React.ForwardRefExoticComponent<LayoutSideBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export { InternalValueS };
|