(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d213ed7"],{af84:function(t,i,e){"use strict";e.r(i);var s=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("Tooltip",t._b({},"Tooltip",t.tooltipOptions,!1),[e(t.tag,{tag:"component",staticClass:"ibps-clipboard",class:{"is-disabled":t.disabled},attrs:{"data-clipboard-text":t.clipboardText,"data-clipboard-target":t.clipboardTarget,"data-clipboard-action":t.clipboardAction}},[t._t("default")],2)],1)},o=[],n=e("5530"),c=e("5c96"),a=e("b311"),p=e.n(a),r={name:"IbpsClipboard",components:{Tooltip:c["Tooltip"]},props:{tag:{type:String,default:"span"},text:{type:[String,Function]},target:{type:[String,Function]},action:{type:[String,Function]},message:[Boolean,Object],tooltip:[Object,Boolean],defaultTip:{type:String},successTip:{type:String},disabled:Boolean},data:function(){return{tip:this.defaultTip||this.$t("components.clipboard.copy")}},computed:{clipboardText:function(){return"string"===typeof this.text?this.text:null},clipboardTarget:function(){return"string"===typeof this.target?this.target:null},clipboardAction:function(){return"string"===typeof this.action?this.action:null},options:function(){var t={};return"function"===typeof this.text&&(t.text=this.text),"function"===typeof this.action&&(t.action=this.action),"function"===typeof this.target&&(t.target=this.target),t},tooltipOptions:function(){return Object(n["a"])(Object(n["a"])({content:this.tip,placement:"top"},this.tooltip||{}),{},{disabled:this.disabled||!this.tooltip})},messageOptions:function(){return Object(n["a"])({message:this.successTip||this.$t("components.clipboard.copy"),type:"success"},this.message||{})}},watch:{options:function(){var t=this;this.dispose(),this.$nextTick((function(){t.instance()}))},disabled:function(t){var i=this;this.dispose(),t&&this.$nextTick((function(){i.instance()}))}},mounted:function(){!this.disabled&&this.instance()},beforeDestroy:function(){this.dispose()},methods:{instance:function(){var t=this;this.clipboard=new p.a(this.$el,this.options),this.clipboard.on("success",(function(i){t.tooltipHandler(),t.messageHandler(),t.$emit("success",i),i.clearSelection()})),this.clipboard.on("error",(function(i){t.$emit("error",i)}))},dispose:function(){clearTimeout(this.timerId),this.clipboard&&this.clipboard.destroy(),this.clipboard=null},tooltipHandler:function(){var t=this;this.tip=this.successTip||this.$t("components.clipboard.successTip"),clearTimeout(this.timerId),this.timerId=setTimeout((function(){t.tip=t.defaultTip||t.$t("components.clipboard.copy")}),3e3)},messageHandler:function(){this.message&&(this.$message.closeAll(),this.$message(Object(n["a"])({},this.messageOptions)))},copy:function(){this.$el.click()}}},l=r,u=e("2877"),d=Object(u["a"])(l,s,o,!1,null,null,null);i["default"]=d.exports}}]);