!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["vue-element-ui-plus"]=e():t["vue-element-ui-plus"]=e()}(self,(()=>(()=>{"use strict";var t={1900:(t,e,n)=>{function o(t,e,n,o,r,i,s,l){var a,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=a):r&&(a=l?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),a)if(c.functional){c._injectStyles=a;var u=c.render;c.render=function(t,e){return a.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,a):[a]}return{exports:t,options:c}}n.d(e,{Z:()=>o})},4938:t=>{t.exports=require("throttle-debounce/throttle")}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var o={};return(()=>{n.d(o,{default:()=>c});var t=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"el-fade-in"}},[t.visible?n("div",{staticClass:"el-backtop",style:{right:t.styleRight,bottom:t.styleBottom},on:{click:function(e){return e.stopPropagation(),t.handleClick.apply(null,arguments)}}},[t._t("default",(function(){return[n("el-icon",{attrs:{name:"caret-top"}})]}))],2):t._e()])};t._withStripped=!0;var e=n(4938),r=n.n(e),i=function(t){return Math.pow(t,3)};const s={name:"ElBacktop",props:{visibilityHeight:{type:Number,default:200},target:[String],right:{type:Number,default:40},bottom:{type:Number,default:40}},data:function(){return{el:null,container:null,visible:!1}},computed:{styleBottom:function(){return"".concat(this.bottom,"px")},styleRight:function(){return"".concat(this.right,"px")}},mounted:function(){this.init(),this.throttledScrollHandler=r()(300,this.onScroll),this.container.addEventListener("scroll",this.throttledScrollHandler)},methods:{init:function(){if(this.container=document,this.el=document.documentElement,this.target){if(this.el=document.querySelector(this.target),!this.el)throw new Error("target is not existed: ".concat(this.target));this.container=this.el}},onScroll:function(){var t=this.el.scrollTop;this.visible=t>=this.visibilityHeight},handleClick:function(t){this.scrollToTop(),this.$emit("click",t)},scrollToTop:function(){var t=this.el,e=Date.now(),n=t.scrollTop,o=window.requestAnimationFrame||function(t){return setTimeout(t,16)};o((function r(){var s,l=(Date.now()-e)/500;l<1?(t.scrollTop=n*(1-((s=l)<.5?i(2*s)/2:1-i(2*(1-s))/2)),o(r)):t.scrollTop=0}))}},beforeDestroy:function(){this.container.removeEventListener("scroll",this.throttledScrollHandler)}};var l=(0,n(1900).Z)(s,t,[],!1,null,null,null);l.options.__file="packages/backtop/src/main.vue";const a=l.exports;a.install=function(t){t.component(a.name,a)};const c=a})(),o.default})()));